/**
 * Ana sayfa — Viewport altında sabit nöbetçi şeridi (scroll ile kaymaz)
 * Marka renkleri şerit üzerinde tanımlı (html/body dışına taşınsa da çalışır)
 */

/* usak-nobetci-eczaneler.css body transform fixed öğeleri bozuyordu */
body.site-page--home {
    transform: none !important;
    will-change: auto !important;
}

.site-page {
    --nobet-sticky-height: 48px;
    --nobet-sticky-offset: calc(var(--nobet-sticky-height) + env(safe-area-inset-bottom, 0px));
}

#nobet-sticky-bar {
    --brand-maroon: #2b8fc7;
    --brand-maroon-dark: #1a6fa3;
    --brand-maroon-light: #5baee0;
    --brand-navy: #1e5f7a;
    --brand-navy-dark: #134559;
    --brand-gold: #6ec5f0;
    --brand-gold-light: #a8ddf7;
    --nobet-sticky-height: 48px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* Alt boşluk body yerine footer’da — footer ile şerit arasında gri çizgi kalmasın */
.site-page.nobet-sticky-active {
    padding-bottom: 0 !important;
}

#nobet-sticky-bar.nobet-sticky {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 100050 !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.22s ease,
                visibility 0.22s ease;
}

#nobet-sticky-bar.nobet-sticky--off {
    transform: translate3d(0, 100%, 0) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#nobet-sticky-bar.nobet-sticky.is-visible {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#nobet-sticky-bar .nobet-sticky__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem 1rem;
    min-height: var(--nobet-sticky-height, 48px);
    padding: 0.4rem 1rem;
    background: linear-gradient(90deg, #1a6fa3 0%, #2b8fc7 35%, #134559 100%);
    background: linear-gradient(90deg, var(--brand-maroon-dark, #1a6fa3) 0%, var(--brand-maroon, #2b8fc7) 35%, var(--brand-navy-dark, #134559) 100%);
    border-top: 2px solid var(--brand-gold, #c9a227);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
    color: #fff;
}

#nobet-sticky-bar .nobet-sticky__label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    padding-right: 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

#nobet-sticky-bar .nobet-sticky__pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
    animation: nobetStickyPulse 2s ease infinite;
}

@keyframes nobetStickyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

#nobet-sticky-bar .nobet-sticky__label-text {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}

#nobet-sticky-bar .nobet-sticky__track {
    overflow: hidden;
    min-width: 0;
    mask-image: linear-gradient(90deg, transparent, #000 1.5%, #000 98.5%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.5%, #000 98.5%, transparent);
}

#nobet-sticky-bar .nobet-sticky__rail {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: max-content;
    animation: nobetStickyMarquee 45s linear infinite;
}

#nobet-sticky-bar .nobet-sticky__track:hover .nobet-sticky__rail {
    animation-play-state: paused;
}

@keyframes nobetStickyMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

#nobet-sticky-bar a.nobet-sticky__item,
#nobet-sticky-bar .nobet-sticky__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    text-decoration: none;
    color: #fff !important;
    padding: 0.2rem 0.35rem;
    border-radius: 6px;
    transition: background 0.15s ease;
}

#nobet-sticky-bar a.nobet-sticky__item:hover,
#nobet-sticky-bar .nobet-sticky__item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

#nobet-sticky-bar .nobet-sticky__item--empty {
    font-size: 0.75rem;
    opacity: 0.9;
    gap: 0.4rem;
    color: #fff;
}

#nobet-sticky-bar .nobet-sticky__item--empty a {
    color: #e4c65a !important;
    font-weight: 600;
}

#nobet-sticky-bar .nobet-sticky__icon {
    flex-shrink: 0;
    border-radius: 4px;
    background: #fff;
    padding: 2px;
    object-fit: contain;
}

#nobet-sticky-bar .nobet-sticky__item-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    color: #fff;
}

#nobet-sticky-bar .nobet-sticky__item-text strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

#nobet-sticky-bar .nobet-sticky__item-text em {
    font-size: 0.68rem;
    font-style: normal;
    opacity: 0.75;
    color: rgba(255, 255, 255, 0.85);
}

#nobet-sticky-bar .nobet-sticky__phone {
    font-size: 0.72rem;
    font-weight: 600;
    color: #e4c65a;
}

#nobet-sticky-bar .nobet-sticky__phone::before {
    content: '·';
    margin-right: 0.35rem;
    opacity: 0.6;
}

#nobet-sticky-bar .nobet-sticky__aside {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

#nobet-sticky-bar .nobet-sticky__clock {
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: #e4c65a;
}

#nobet-sticky-bar .nobet-sticky__weather {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.92;
    color: #fff;
}

#nobet-sticky-bar .nobet-sticky__weather i {
    color: #e4c65a;
    font-size: 0.75rem;
}

#nobet-sticky-bar a.nobet-sticky__all {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e4c65a !important;
    text-decoration: none;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

#nobet-sticky-bar a.nobet-sticky__all:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
}

@media (max-width: 991px) {
    .site-page,
    #nobet-sticky-bar {
        --nobet-sticky-height: 52px;
    }

    #nobet-sticky-bar .nobet-sticky__inner {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 0.35rem 0.65rem;
        padding: 0.4rem 0.75rem;
        min-height: 52px;
    }

    #nobet-sticky-bar .nobet-sticky__label {
        grid-row: 1;
        grid-column: 1;
        border-right: none;
        padding-right: 0;
    }

    #nobet-sticky-bar .nobet-sticky__aside {
        grid-row: 1;
        grid-column: 2;
        justify-content: flex-end;
        border-left: none;
        padding-left: 0;
        gap: 0.5rem;
    }

    #nobet-sticky-bar .nobet-sticky__track {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    #nobet-sticky-bar a.nobet-sticky__all {
        display: none;
    }

    #nobet-sticky-bar .nobet-sticky__item-text em {
        display: none;
    }
}

@media (max-width: 575px) {
    #nobet-sticky-bar .nobet-sticky__weather {
        display: none;
    }
}

/* Mobil cihazlarda alt sabit nöbet şeridini tamamen kapat */
@media (max-width: 767px) {
    #nobet-sticky-bar,
    #nobet-sticky-bar.nobet-sticky,
    #nobet-sticky-bar.nobet-sticky.is-visible,
    #nobet-sticky-bar.nobet-sticky--off {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translate3d(0, 120%, 0) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    #nobet-sticky-bar .nobet-sticky__rail {
        animation: none;
    }

    #nobet-sticky-bar .nobet-sticky__pulse {
        animation: none;
    }
}
