/* Cookie-консент: баннер + модалка настроек. */

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    max-width: 1180px;
    margin: 0 auto;
    background: rgba(17, 20, 23, 0.98);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: "Onest", sans-serif;
}
.cookie-banner.is-visible { opacity: 1; transform: translateY(0); }
.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
}

.cookie-banner__content { flex: 1; min-width: 0; }

.cookie-banner__title {
    font-family: "Halvar Breitschrift", "Onest", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.cookie-banner__text {
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

.cookie-banner__text a {
    color: #008dd2;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-banner__btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: #fff;
    font-family: "Onest", sans-serif;
    font-size: 13px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 12px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
    white-space: nowrap;
}
.cookie-banner__btn:focus-visible {
    outline: 2px solid #008dd2;
    outline-offset: 2px;
}

.cookie-banner__btn--primary {
    background: #008dd2;
    border-color: #008dd2;
}
.cookie-banner__btn--primary:hover { background: #0078b8; border-color: #0078b8; }

.cookie-banner__btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.cookie-banner__btn--secondary:hover { background: rgba(255, 255, 255, 0.12); }

.cookie-banner__btn--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.cookie-banner__btn--ghost:hover { border-color: #008dd2; color: #fff; }

@media (max-width: 900px) {
    .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px; }
    .cookie-banner__actions { justify-content: stretch; }
    .cookie-banner__actions .cookie-banner__btn { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 480px) {
    .cookie-banner { left: 8px; right: 8px; bottom: 8px; border-radius: 10px; }
    .cookie-banner__title { font-size: 16px; }
    .cookie-banner__text { font-size: 13px; }
    .cookie-banner__btn { padding: 11px 14px; font-size: 12px; }
}

/* Модалка настроек */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.cookie-modal.is-visible { opacity: 1; }
.cookie-modal[hidden] { display: none; }

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 13, 17, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 640px;
    background: #fff;
    color: #101317;
    border-radius: 14px;
    padding: 28px;
    font-family: "Onest", sans-serif;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.cookie-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(17, 20, 23, 0.06);
    color: #101317;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease;
}
.cookie-modal__close:hover { background: rgba(17, 20, 23, 0.12); }

.cookie-modal__header { margin-bottom: 18px; padding-right: 32px; }

.cookie-modal__title {
    font-family: "Halvar Breitschrift", "Onest", sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.cookie-modal__subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(16, 19, 23, 0.7);
    margin: 0;
}

.cookie-modal__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.cookie-modal__item {
    border: 1px solid rgba(17, 20, 23, 0.1);
    border-radius: 10px;
    padding: 16px 18px;
    background: #fafbfc;
}

.cookie-modal__item-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.cookie-modal__item-info { flex: 1; min-width: 0; }
.cookie-modal__item-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #101317;
}
.cookie-modal__item-descr {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(16, 19, 23, 0.7);
}

.cookie-modal__switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}
.cookie-modal__switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.cookie-modal__switch-track {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: rgba(17, 20, 23, 0.18);
    transition: background-color 0.2s ease;
}
.cookie-modal__switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}
.cookie-modal__switch input:checked + .cookie-modal__switch-track { background: #008dd2; }
.cookie-modal__switch input:checked + .cookie-modal__switch-track .cookie-modal__switch-thumb {
    transform: translateX(18px);
}

.cookie-modal__switch--locked {
    cursor: default;
    opacity: 0.85;
}
.cookie-modal__switch--locked .cookie-modal__switch-track { background: #008dd2; }
.cookie-modal__switch--locked .cookie-modal__switch-thumb { transform: translateX(18px); }

.cookie-modal__switch-label {
    font-size: 12px;
    color: rgba(16, 19, 23, 0.6);
}

.cookie-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.cookie-modal__footer .cookie-banner__btn {
    color: #101317;
    border-color: rgba(17, 20, 23, 0.14);
}
.cookie-modal__footer .cookie-banner__btn--primary {
    color: #fff;
    border-color: #008dd2;
}
.cookie-modal__footer .cookie-banner__btn--secondary {
    background: rgba(17, 20, 23, 0.06);
}
.cookie-modal__footer .cookie-banner__btn--secondary:hover {
    background: rgba(17, 20, 23, 0.1);
}
.cookie-modal__footer .cookie-banner__btn--ghost {
    background: transparent;
    border-color: rgba(17, 20, 23, 0.22);
}
.cookie-modal__footer .cookie-banner__btn--ghost:hover {
    border-color: #008dd2;
    color: #008dd2;
}

@media (max-width: 560px) {
    .cookie-modal__dialog { padding: 22px 18px; }
    .cookie-modal__title { font-size: 18px; }
    .cookie-modal__item-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .cookie-modal__footer { justify-content: stretch; }
    .cookie-modal__footer .cookie-banner__btn { flex: 1 1 auto; text-align: center; }
}

/* Кнопка-ссылка «Настройки cookies» в подвале */
.cookie-settings-link {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    opacity: 0.7;
    transition: opacity 0.18s ease, color 0.18s ease;
}
.cookie-settings-link:hover { opacity: 1; color: #008dd2; }
