/* === TOPBAR BANNER === */
.topbar-banner {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: 'Inter', sans-serif;
    opacity: 1;
}

.topbar-banner-inner {
    max-width: 1440px;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    position: relative;
}

/* === ICON === */
.topbar-icon {
    display: flex;
    align-items: center;
}

.topbar-icon img {
    width: 16px;
    height: 16px;
    display: block;
}

/* === TEXT 1 + TEXT 3 === */
.topbar-text1,
.topbar-text3 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;

    display: flex;
    align-items: center;
}

/* === BADGE (TEXT 2) === */
.topbar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 18px;
    padding: 2px 6px;

    border-radius: 100px;

    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 14px;
    letter-spacing: 0.01em;
    text-transform: uppercase;

    white-space: nowrap;
}

/* === LINK === */
.topbar-banner-link {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 100%;
    width: 100%;
    max-width: 1440px;

    text-decoration: none;
    color: inherit;
    position: relative;
}

/* === CLOSE BUTTON === */
.topbar-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 2;
}

.topbar-close svg {
    width: 16px;
    height: 16px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .topbar-banner {
        height: auto;
        padding: 6px 8px;
    }

    .topbar-banner-inner {
        /*flex-wrap: wrap;*/
        justify-content: center;
        text-align: center;
    }

    .topbar-close {
        top: 6px;
        right: 6px;
        inset: auto;
    }
}

/* === FIX CENTERING ON HOME PAGE === */
.common-home .topbar-banner-inner {
    padding-left: 12px;
    padding-right: 12px;
}

/* =========================
   MOBILE TOPBAR BANNER ONLY
   ========================= */
@media (max-width: 768px) {

    /* === BAR === */
    .topbar-banner {
        height: 28px;
        padding: 4px 8px;
    }

    .topbar-banner-inner {
        height: 100%;
        justify-content: center;
        gap: 8px;
    }

    /* === ICON === */
    .topbar-icon img {
        width: 14px;
        height: 14px;
    }

    /* === TEXTS === */
    .topbar-text1,
    .topbar-text3 {
        font-size: 11px;
        line-height: 14px;
        letter-spacing: 0.04em;
    }

    /* === BADGE === */
    .topbar-badge {
        height: 18px;
        min-width: 41px;
        padding: 2px 4px;

        font-size: 12px;
        line-height: 14px;
        letter-spacing: 0.04em;
        border-radius: 100px;
    }

    /* === LINK WRAPPER === */
    .topbar-banner-link {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-right: 28px; /* щоб текст не ліз під close */
    }

    /* === CLOSE BUTTON === */
    .topbar-close {
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
    }

    .topbar-close svg {
        width: 16px;
        height: 16px;
    }
}

/* Mobile: smooth hide/show topbar banner on scroll */
@media (max-width: 767px) {
    .topbar-banner {
        height: 32px !important;
        max-height: 32px !important;
        opacity: 1;
        transform: translateY(0);
        overflow: hidden;
        transition:
            height .35s ease,
            max-height .35s ease,
            opacity .25s ease,
            transform .35s ease,
            margin .35s ease;
        will-change: height, max-height, opacity, transform;
    }

    .topbar-banner.mobile-scroll-hidden {
        height: 0 !important;
        max-height: 0 !important;
        opacity: 0 !important;
        transform: translateY(-8px) !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
    }

    .topbar-banner.mobile-scroll-hidden .topbar-banner-inner,
    .topbar-banner.mobile-scroll-hidden .topbar-banner-link,
    .topbar-banner.mobile-scroll-hidden .topbar-close {
        opacity: 0 !important;
    }
}
