/*
 * Ust bar (announcement bar) - en ustte sticky degil, normal akista 3 slot
 * rotation seridi. Mobil + masaustu birlikte calisir, kampanya sayaci
 * son N saat altinda kirmizi temaya gecer.
 *
 * Sprint UST-1 - 2026-05-12
 */

.topbar {
    background: #0c0c0c;
    color: #ffffff;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    position: relative;
    transition: background-color 0.4s ease;
}

/* Son N saatte kirmizi tema - urgent flag */
.topbar.topbar--urgent {
    background: #991b1b;
}

.topbar__track {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 14px;
    transition: opacity 0.22s ease;
}

.topbar__slot {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__slot:hover {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.92;
}

.topbar__icon {
    color: #FAC775;
    font-size: 14px;
    flex-shrink: 0;
}

.topbar--urgent .topbar__icon {
    color: #fde68a;
}

.topbar__title {
    font-weight: 500;
}

.topbar__detay {
    opacity: 0.92;
}

.topbar__premium,
.topbar__shipping {
    font-weight: 400;
}

/* Premium slot icindeki "Premium" kelimesi ve "+%5" vurgusu - JS render'da
 * <strong> ile sarilir, ona da altin renk uygula. */
.topbar__slot strong {
    color: #FAC775;
    font-weight: 500;
}

.topbar--urgent .topbar__slot strong {
    color: #fde68a;
}

.topbar__sep {
    opacity: 0.35;
    margin: 0 6px;
    font-weight: 300;
}

.topbar__sayac {
    color: #FAC775;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.topbar__sayac-rakam {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.topbar--urgent .topbar__sayac {
    color: #fde68a;
}

.topbar--urgent .topbar__sayac-rakam {
    /* Son saatlerde hafif pulse - dikkat ceksin ama rahatsiz etmesin */
    animation: topbar-pulse 1.6s ease-in-out infinite;
}

@keyframes topbar-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

/* Dots indicator - alt orta nokta */
.topbar__dots {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 5px;
    align-items: center;
}

.topbar__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: background-color 0.2s ease, width 0.2s ease;
}

.topbar__dot.is-active {
    background: #FAC775;
    width: 14px;
    border-radius: 3px;
}

.topbar--urgent .topbar__dot.is-active {
    background: #fde68a;
}

/* Desktop ayarlari */
@media (min-width: 768px) {
    .topbar__track {
        min-height: 38px;
        padding: 7px 20px;
    }
    .topbar__slot {
        font-size: 13.5px;
        gap: 10px;
    }
    .topbar__icon {
        font-size: 15px;
    }
    .topbar__sep {
        margin: 0 8px;
    }
    .topbar__dots {
        display: flex;
    }
}

/* Reduce motion - animation yok */
@media (prefers-reduced-motion: reduce) {
    .topbar__track,
    .topbar--urgent .topbar__sayac-rakam {
        transition: none;
        animation: none;
    }
}
