/* ============================================
   PH Yazılım - Bottom Dock (macOS tarzı)
   Desktop: ikon yerinde kalır, hover'da yukarı büyür + üstünde etiket
   Mobil  : ikon + yazı dikey, her zaman sabit
   ============================================ */

.ph-dock {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 1040;
    pointer-events: none;
    animation: phDockIn 0.7s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes phDockIn {
    from { opacity: 0; transform: translateX(-50%) translateY(80px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.ph-dock-bar {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    border-radius: 24px;
    box-shadow:
        0 14px 44px rgba(15, 23, 42, 0.18),
        0 4px 12px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.dark-theme .ph-dock-bar {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 14px 44px rgba(0, 0, 0, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ════════════════════════════════════════════
   DESKTOP — ikon yerinde, hover'da yukarı büyür
   ════════════════════════════════════════════ */

.ph-dock-item {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    position: relative;
    text-decoration: none;
    display: block;
}

/* İkon kutusu */
.ph-dock-item .ph-dock-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--dock-color, #0d6efd);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    position: relative;
    overflow: hidden;
    transform-origin: center bottom;     /* yukarı doğru büyüsün */
    transform: translateY(0) scale(1);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    will-change: transform;
}

    /* Parlaklık katmanı */
    .ph-dock-item .ph-dock-icon::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, transparent 55%);
        pointer-events: none;
        border-radius: inherit;
    }

/* HOVER — ikon yukarı doğru büyür */
.ph-dock-item:hover .ph-dock-icon {
    transform: translateY(-16px) scale(1.4);
    box-shadow:
        0 16px 30px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ph-dock-item:active .ph-dock-icon {
    transform: translateY(-12px) scale(1.34);
    transition: transform 0.1s ease;
}

/* ── ETİKET — ikonun ÜSTÜNDE (macOS gibi) ── */
.ph-dock-item .ph-dock-label {
    position: absolute;
    bottom: calc(100% + 28px);          /* büyüyen ikonun üstünde */
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: opacity 0.22s ease 0.05s,
                transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s;
}

    /* Tooltip ok ucu — aşağı bakar */
    .ph-dock-item .ph-dock-label::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
        width: 8px;
        height: 8px;
        background: rgba(15, 23, 42, 0.92);
    }

.ph-dock-item:hover .ph-dock-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Aktif sayfa noktası — ikonun altında */
.ph-dock-item .ph-dock-dot {
    position: absolute;
    bottom: -7px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(15, 23, 42, 0.55);
    border-radius: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.ph-dock-item.is-active .ph-dock-dot { opacity: 1; }

body.dark-theme .ph-dock-item .ph-dock-dot { background: rgba(255, 255, 255, 0.8); }


/* ════════════════════════════════════════════
   MOBİL — ikon + yazı her zaman dikey görünür
   ════════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .ph-dock {
        bottom: 10px;
        left: 8px;
        right: 8px;
        transform: none;
        display: flex;
        justify-content: center;
        animation: phDockInMobile 0.7s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }

    @keyframes phDockInMobile {
        from { opacity: 0; transform: translateY(80px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .ph-dock-bar {
        gap: 4px;
        padding: 8px 8px 6px;
        border-radius: 18px;
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-items: stretch;
    }

        .ph-dock-bar::-webkit-scrollbar { display: none; }

    .ph-dock-item {
        width: auto;
        height: auto;
        min-width: 60px;
        padding: 4px 4px 3px;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        transition: background 0.18s ease;
    }

        .ph-dock-item:active { background: rgba(15, 23, 42, 0.06); }

    body.dark-theme .ph-dock-item:active { background: rgba(255, 255, 255, 0.08); }

    /* Mobilde ikon — sabit, hover/scale yok */
    .ph-dock-item .ph-dock-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        border-radius: 11px;
        transform: none !important;
    }

    /* Etiket — mobilde her zaman görünür, ikonun altında düz yazı */
    .ph-dock-item .ph-dock-label {
        position: static;
        transform: none;
        opacity: 1;
        background: transparent;
        backdrop-filter: none;
        color: #475569;
        font-size: 0.64rem;
        font-weight: 600;
        letter-spacing: 0;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        line-height: 1.1;
        text-align: center;
        transition: none;
    }

        .ph-dock-item .ph-dock-label::after { display: none; }

    body.dark-theme .ph-dock-item .ph-dock-label { color: rgba(255, 255, 255, 0.78); }

    .ph-dock-item.is-active .ph-dock-label { color: var(--dock-color); }

    .ph-dock-item .ph-dock-dot {
        position: static;
        transform: none;
        margin-top: 2px;
        background: var(--dock-color, #0d6efd);
    }
}

@media (max-width: 380px) {
    .ph-dock-item { min-width: 54px; }
    .ph-dock-item .ph-dock-icon { width: 36px; height: 36px; font-size: 1rem; }
    .ph-dock-item .ph-dock-label { font-size: 0.6rem; }
}

/* ════════════════════════════════════════════
   WhatsApp float ile çakışmasın
   ════════════════════════════════════════════ */
@media (min-width: 768px) {
    .whatsapp-float { bottom: 105px !important; }
}

@media (max-width: 767.98px) {
    .whatsapp-float { bottom: 95px !important; }
}
