/*
 * Єдина шапка й футер для всіх публічних сторінок.
 * Еталон — головна сторінка: Onest, повітряні відступи, прозора шапка,
 * смуга контенту 1160px. Локальний Kyivstar-preview адаптер перевизначав
 * ці правила тільки на сторінках із body.kyivstar-reference, тому тут
 * повертаємо еталонний вигляд, не зачіпаючи вміст сторінок.
 */

body.kyivstar-reference :is(header.viktor-header, footer.wrap.soft) {
    --chrome-ink: #f2f8fa;
    --chrome-header-ink: #e6f4f5;
    --chrome-muted: #abc1cc;
    --chrome-accent: #54d6e0;
    --chrome-nav-muted: #9cc2c7;
    --chrome-nav-accent: #41f0ec;
    color: var(--chrome-ink);
    font-family: "Onest", "Segoe UI", system-ui, sans-serif !important;
    font-size: 17px;
    line-height: 1.6;
}

:root[data-theme="light"] body.kyivstar-reference :is(header.viktor-header, footer.wrap.soft),
:root[data-theme=""] body.kyivstar-reference :is(header.viktor-header, footer.wrap.soft) {
    --chrome-ink: #142e3d;
    --chrome-header-ink: #222936;
    --chrome-muted: #526b78;
    --chrome-accent: #087e8b;
    --chrome-nav-muted: #515c70;
    --chrome-nav-accent: #0b5fd1;
}

:root[data-theme="ivory"] body.kyivstar-reference :is(header.viktor-header, footer.wrap.soft) {
    --chrome-ink: #1d1a15;
    --chrome-header-ink: #1d1a15;
    --chrome-muted: #625a4b;
    --chrome-accent: #8a6212;
    --chrome-nav-muted: #625a4b;
    --chrome-nav-accent: #8a6212;
}

/* Шапка: геометрія й фон як на головній. */
body.kyivstar-reference header.viktor-header.top {
    width: min(1160px, calc(100% - 40px)) !important;
    max-width: none !important;
    margin-inline: auto !important;
    padding: 24px 0 !important;
    gap: 18px !important;
    row-gap: 8px;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none;
    z-index: 1030;
    color: var(--chrome-ink);
}

body.kyivstar-reference header.viktor-header :is(a, button, span, b, small, input) {
    font-family: inherit !important;
}

body.kyivstar-reference header.viktor-header a:not(.vine-navbar__brand) {
    color: var(--chrome-nav-muted) !important;
}

body.kyivstar-reference header.viktor-header .vine-navbar__brand {
    color: var(--chrome-header-ink) !important;
}

body.kyivstar-reference header.viktor-header .pill a {
    min-height: 44px;
    padding: 8px 12px;
}

body.kyivstar-reference header.viktor-header .pill a[aria-current="page"] {
    color: var(--chrome-nav-accent) !important;
}

body.kyivstar-reference header.viktor-header .nb {
    min-width: 46px;
    min-height: 0;
    height: 46px;
    padding: 0 16px;
    border: 0 !important;
    border-radius: 17px;
    background: var(--bg) !important;
    background-image: linear-gradient(145deg, var(--g1), var(--g2)) !important;
    box-shadow: var(--up-s) !important;
    color: var(--ink) !important;
    font-family: var(--fb) !important;
    font-size: 15px;
}

body.kyivstar-reference header.viktor-header .nb:hover,
body.kyivstar-reference header.viktor-header .pill a:hover {
    color: var(--chrome-nav-accent) !important;
}

/* Футер: та сама смуга 1160px і ті самі вертикальні відступи. */
body.kyivstar-reference footer.wrap.soft {
    --ft-ink: var(--chrome-ink);
    --ft-muted: var(--chrome-muted);
    --ft-accent: var(--chrome-accent);
    width: min(1160px, calc(100% - 40px)) !important;
    max-width: none !important;
    margin: 40px auto 0 !important;
    padding: 56px 0 40px !important;
    color: var(--chrome-ink);
}

body.kyivstar-reference footer.wrap.soft :is(a, button, span, b, small, p) {
    font-family: inherit !important;
}

body.kyivstar-reference footer.wrap.soft a {
    color: var(--chrome-ink) !important;
}

body.kyivstar-reference footer.wrap.soft .ios-t,
body.kyivstar-reference footer.wrap.soft .legal {
    color: var(--chrome-muted) !important;
}

body.kyivstar-reference footer.wrap.soft .ios a:hover,
body.kyivstar-reference footer.wrap.soft .ios a:focus-visible,
body.kyivstar-reference footer.wrap.soft .soc a:hover,
body.kyivstar-reference footer.wrap.soft .soc a:focus-visible,
body.kyivstar-reference footer.wrap.soft .legal a {
    color: var(--chrome-accent) !important;
}

@media (max-width: 1179px) {
    body.kyivstar-reference header.viktor-header.top {
        gap: 10px !important;
        row-gap: 8px !important;
    }

    /* Три пункти меню на вузькому екрані — окремі кнопки, але без втрати навігації. */
    header.viktor-header .pill {
        flex-wrap: wrap;
        justify-content: center;
        overflow: visible;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        box-sizing: border-box;
    }

    header.viktor-header .pill a {
        display: inline-flex;
        flex: 0 1 auto;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        padding: 8px 12px;
        border-radius: 14px;
        background-image: linear-gradient(145deg, var(--g1), var(--g2));
        box-shadow: var(--up-s);
        color: var(--mu);
        font-family: var(--fb) !important;
        font-size: 13px;
        line-height: 1.2;
        white-space: nowrap;
    }

    header.viktor-header .pill a:hover,
    header.viktor-header .pill a:focus-visible,
    header.viktor-header .pill a[aria-current="page"] {
        color: var(--blue) !important;
    }

    body.kyivstar-reference header.viktor-header .pill a:hover,
    body.kyivstar-reference header.viktor-header .pill a:focus-visible,
    body.kyivstar-reference header.viktor-header .pill a[aria-current="page"] {
        background-image: linear-gradient(145deg, var(--g1), var(--g2)) !important;
        box-shadow: var(--up-s) !important;
    }
}

@media (max-width: 650px) {
    body.kyivstar-reference header.viktor-header.top,
    body.kyivstar-reference footer.wrap.soft {
        width: calc(100% - 32px) !important;
    }

    body.kyivstar-reference footer.wrap.soft {
        padding: 40px 0 28px !important;
        margin-top: 28px !important;
    }
}

@media (max-width: 420px) {
    body.kyivstar-reference header.viktor-header.top,
    body.kyivstar-reference footer.wrap.soft {
        width: calc(100% - 24px) !important;
    }

    header.viktor-header .pill a {
        padding: 8px 10px;
    }
}
