/* ==========================================================================
   ZTC Live Visitor Counter (Navbar)  -  Günlük / Aylık tekil ziyaretçi
   --------------------------------------------------------------------------
   - Tüm sınıflar "ztc-vc" önekiyle izole edilmiştir; mevcut stillerle çakışmaz.
   - 2 navbar durumu desteklenir:
       1) Normal  : açık cam (glass) header
       2) Scrolled: küçülen siyah header  (#header.scrolled)  -> kompakt mod
   - Mobil menü (drawer) için ayrı ".ztc-vc--drawer" varyantı.
   ========================================================================== */

.ztc-vc {
    --ztc-vc-h: 32px;
    --ztc-vc-icon: 24px;
    --ztc-vc-daily-a: #34C759;
    --ztc-vc-daily-b: #30B0C7;
    --ztc-vc-month-a: #5E5CE6;
    --ztc-vc-month-b: #BF5AF2;

    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-right: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
}

/* Sosyal ikonlarla arasında zarif ince ayırıcı */
.ztc-vc::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    width: 1px;
    height: 16px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.16), transparent);
    pointer-events: none;
}

/* ---------- Pill ---------- */
.ztc-vc-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: var(--ztc-vc-h);
    padding: 0 12px 0 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.5));
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        background 0.35s ease,
        border-color 0.35s ease,
        height 0.3s ease,
        padding 0.3s ease;
}

.ztc-vc-pill:hover {
    transform: translateY(-1px);
    box-shadow:
        0 8px 22px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Hareketli parıltı (sheen) */
.ztc-vc-sheen {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}
.ztc-vc-sheen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: 200% 0;
    animation: ztcVcSheen 7s ease-in-out infinite;
}
.ztc-vc-monthly .ztc-vc-sheen::before { animation-delay: 3.5s; }

@keyframes ztcVcSheen {
    0%, 70% { background-position: 200% 0; }
    100%    { background-position: -100% 0; }
}

/* ---------- İkon ---------- */
.ztc-vc-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--ztc-vc-icon);
    height: var(--ztc-vc-icon);
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    transition: width 0.3s ease, height 0.3s ease, font-size 0.3s ease;
}
.ztc-vc-daily .ztc-vc-icon {
    background: linear-gradient(135deg, var(--ztc-vc-daily-a), var(--ztc-vc-daily-b));
    box-shadow: 0 3px 8px rgba(52, 199, 89, 0.35);
}
.ztc-vc-monthly .ztc-vc-icon {
    background: linear-gradient(135deg, var(--ztc-vc-month-a), var(--ztc-vc-month-b));
    box-shadow: 0 3px 8px rgba(94, 92, 230, 0.35);
}
.ztc-vc-icon i { position: relative; z-index: 1; line-height: 1; }

/* Canlı nokta (günlük) */
.ztc-vc-live {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34C759;
    border: 1.5px solid #fff;
    z-index: 2;
}
.ztc-vc-live::after {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 50%;
    background: #34C759;
    animation: ztcVcPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ztcVcPing {
    0%        { transform: scale(1);   opacity: 0.75; }
    80%, 100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Metin ---------- */
.ztc-vc-body {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 26px;
}
.ztc-vc-label {
    font-size: 8.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8e8e93;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.3s ease, font-size 0.3s ease, opacity 0.3s ease, max-height 0.3s ease;
    max-height: 10px;
}
.ztc-vc-value {
    display: inline-flex;
    align-items: flex-start;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1c1c1e;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
    line-height: 1.2;
    white-space: nowrap;
    transition: color 0.3s ease, font-size 0.3s ease;
}

/* ---------- Odometer (kayan rakamlar) ---------- */
.ztc-odo-d {
    position: relative;
    display: inline-block;
    height: 1.2em;
    overflow: hidden;
    vertical-align: top;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0, #000 22%, #000 78%, transparent 100%);
}
.ztc-odo-s {
    display: block;
    transform: translateY(0);
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.ztc-odo-s > span {
    display: block;
    height: 1.2em;
    line-height: 1.2em;
    text-align: center;
}
.ztc-odo-sep {
    display: inline-block;
    height: 1.2em;
    line-height: 1.2em;
    opacity: 0.55;
    margin: 0 0.02em;
}

/* ---------- Yükleniyor (skeleton) ---------- */
.ztc-vc-pill.is-loading .ztc-vc-value {
    width: 30px;
    height: 10px;
    margin: 2px 0 1px;
    border-radius: 4px;
    color: transparent;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.08) 25%, rgba(0, 0, 0, 0.16) 50%, rgba(0, 0, 0, 0.08) 75%);
    background-size: 200% 100%;
    animation: ztcVcSkeleton 1.2s linear infinite;
}
@keyframes ztcVcSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- Artış animasyonu (+1) ---------- */
.ztc-vc-bump {
    position: absolute;
    top: -4px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0) scale(0.6);
    z-index: 5;
    white-space: nowrap;
}
.ztc-vc-daily .ztc-vc-bump   { background: linear-gradient(135deg, var(--ztc-vc-daily-a), var(--ztc-vc-daily-b)); box-shadow: 0 4px 10px rgba(52, 199, 89, 0.4); }
.ztc-vc-monthly .ztc-vc-bump { background: linear-gradient(135deg, var(--ztc-vc-month-a), var(--ztc-vc-month-b)); box-shadow: 0 4px 10px rgba(94, 92, 230, 0.4); }

.ztc-vc-pill.is-bump .ztc-vc-bump { animation: ztcVcBump 3.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.ztc-vc-daily.is-bump   { animation: ztcVcGlowDaily 3.2s ease-out; }
.ztc-vc-monthly.is-bump { animation: ztcVcGlowMonth 3.2s ease-out; }

@keyframes ztcVcBump {
    0%   { opacity: 0; transform: translateY(4px) scale(0.6); }
    8%   { opacity: 1; transform: translateY(-10px) scale(1); }
    85%  { opacity: 1; transform: translateY(-14px) scale(1); }
    100% { opacity: 0; transform: translateY(-22px) scale(0.9); }
}
@keyframes ztcVcGlowDaily {
    0%   { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); }
    100% { box-shadow: 0 0 0 10px rgba(52, 199, 89, 0); }
}
@keyframes ztcVcGlowMonth {
    0%   { box-shadow: 0 0 0 0 rgba(94, 92, 230, 0.55); }
    100% { box-shadow: 0 0 0 10px rgba(94, 92, 230, 0); }
}

/* ---------- Tooltip ---------- */
.ztc-vc-tip {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    min-width: 168px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(28, 28, 30, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    color: #fff;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
    z-index: 10001;
    white-space: nowrap;
}
.ztc-vc-tip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(28, 28, 30, 0.92);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px 0 0 0;
}
.ztc-vc-tip strong {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: -0.005em;
    margin-bottom: 3px;
}
.ztc-vc-tip small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.62);
}
.ztc-vc-tip small::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #34C759;
    box-shadow: 0 0 6px rgba(52, 199, 89, 0.8);
    flex-shrink: 0;
}
.ztc-vc-pill:hover .ztc-vc-tip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   SCROLLED (Küçülen siyah navbar) -> Kompakt & koyu tema
   Sadece masaüstü sosyal alanındaki sayaçları etkiler (drawer etkilenmez)
   ========================================================================== */
#header.scrolled .desktop-social-links .ztc-vc {
    --ztc-vc-h: 28px;
    --ztc-vc-icon: 20px;
    gap: 5px;
}
#header.scrolled .desktop-social-links .ztc-vc::after {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}
#header.scrolled .desktop-social-links .ztc-vc-pill {
    gap: 6px;
    padding: 0 10px 0 4px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
#header.scrolled .desktop-social-links .ztc-vc-pill:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.2);
}
#header.scrolled .desktop-social-links .ztc-vc-sheen::before {
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
    background-size: 250% 100%;
}
#header.scrolled .desktop-social-links .ztc-vc-icon { font-size: 9px; }
#header.scrolled .desktop-social-links .ztc-vc-live { border-color: #111; }

/* Kompakt: etiket gizlenir, sadece ikon + sayı (etiket tooltip'te görünür) */
#header.scrolled .desktop-social-links .ztc-vc-label {
    opacity: 0;
    max-height: 0;
    font-size: 0;
    overflow: hidden;
}
#header.scrolled .desktop-social-links .ztc-vc-body { gap: 0; min-width: 18px; }
#header.scrolled .desktop-social-links .ztc-vc-value {
    color: #ffffff;
    font-size: 11.5px;
}
#header.scrolled .desktop-social-links .ztc-vc-pill.is-loading .ztc-vc-value {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.08) 75%);
    background-size: 200% 100%;
}
#header.scrolled .desktop-social-links .ztc-vc-tip {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.06);
    color: #1c1c1e;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
#header.scrolled .desktop-social-links .ztc-vc-tip::before {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.06);
}
#header.scrolled .desktop-social-links .ztc-vc-tip small { color: #6e6e73; }

/* ==========================================================================
   MOBİL MENÜ (Drawer) Varyantı
   ========================================================================== */
.ztc-vc--drawer { display: none; }

@media (max-width: 991px) {
    #nav .ztc-vc--drawer {
        display: flex !important;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin: auto 0 0 0;
        padding-top: 18px;
    }
    #nav .ztc-vc--drawer::after { display: none; }
    /* Sayaç, sosyal medya linklerinin hemen üstünde dursun */
    #nav .ztc-vc--drawer + .mobile-social-links { margin-top: 14px; }

    #nav .ztc-vc--drawer .ztc-vc-pill {
        --ztc-vc-h: 38px;
        --ztc-vc-icon: 26px;
        flex: 1 1 0;
        max-width: 140px;
        padding: 0 12px 0 6px;
        background: rgba(0, 0, 0, 0.03);
        border-color: rgba(0, 0, 0, 0.05);
        box-shadow: none;
    }
    #nav .ztc-vc--drawer .ztc-vc-label { font-size: 8.5px; }
    #nav .ztc-vc--drawer .ztc-vc-value { font-size: 13.5px; }
    #nav .ztc-vc--drawer .ztc-vc-tip { display: none; }
}

/* Masaüstünde sosyal alandaki sayaç, mobilde gizli kalır (alan zaten gizli) */
@media (min-width: 992px) {
    .ztc-vc--drawer { display: none !important; }
}

/* Orta genişlikte biraz daha sıkı */
@media (min-width: 992px) and (max-width: 1199px) {
    .desktop-social-links .ztc-vc-pill { padding-right: 10px; }
    .desktop-social-links .ztc-vc-label { letter-spacing: 0.06em; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    .ztc-vc-sheen::before,
    .ztc-vc-live::after,
    .ztc-vc-pill.is-loading .ztc-vc-value { animation: none !important; }
    .ztc-odo-s { transition: none !important; }
}
