/* =========================================================
   Cookie-согласие these-guys.ru — двухуровневая модель.
   Mobile-first: базовые стили = мобильный (<640px),
   @media (min-width: 640px) = планшет/десктоп.
   Визуальный язык прежнего баннера сохранён (жёлтый #FFCE00,
   чёрный #0A0A0A, Manrope/Inter, скруглas 12–20px).
   ========================================================= */

.cookie-consent-root,
.cookie-consent-root *,
.cookie-consent-root *::before,
.cookie-consent-root *::after {
    box-sizing: border-box;
}
.cookie-consent-root[hidden] { display: none; }

/* ===================== Баннер (нижний лист) ===================== */
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    z-index: 1010;
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    max-height: 82vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-visible {
    animation: cookieBannerIn 350ms cubic-bezier(.34, 1.56, .64, 1) both;
}
.cookie-banner.is-closing {
    animation: cookieBannerOut 200ms ease-out both;
    pointer-events: none;
}

.cookie-banner__title {
    margin: 0 36px 10px 0; /* место под крестик */
    font-family: 'Manrope', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #0A0A0A;
}

.cookie-banner__text { margin: 0; }
.cookie-banner__text p {
    margin: 0 0 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.55;
    color: #1C1F24;
}
.cookie-banner__text p:last-child { margin-bottom: 0; }

.cookie-banner__link {
    color: #0A0A0A;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity .15s ease;
}
.cookie-banner__link:hover { opacity: .75; text-decoration: underline; }

.cookie-banner__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

/* ---------- Крестик ---------- */
.cookie-banner__close {
    position: absolute;
    top: 12px; right: 12px;
    width: 44px; height: 44px;
    padding: 0; margin: 0;
    border: none; background: none;
    color: #292929;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .15s ease, color .15s ease;
}
.cookie-banner__close:hover,
.cookie-banner__close:focus { background: rgba(10, 10, 10, 0.06); color: #0A0A0A; }
.cookie-banner__close:focus-visible { outline: 2px solid #0A0A0A; outline-offset: 2px; }
.cookie-banner__close svg { width: 16px; height: 16px; display: block; }

/* ===================== Кнопки (общие) ===================== */
.cookie-btn {
    flex: 0 0 auto;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 13px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .04em;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    text-align: center;
    transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.cookie-btn:focus-visible { outline: 3px solid #0A0A0A; outline-offset: 3px; }
.cookie-btn:disabled { opacity: .4; cursor: not-allowed; }

.cookie-btn--primary { background: #FFCE00; color: #000; border: none; }
.cookie-btn--primary:not(:disabled):hover {
    background: #FED501; transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 206, 0, 0.28);
}
.cookie-btn--primary:not(:disabled):active { transform: translateY(0); }

.cookie-btn--secondary { background: #FFFFFF; color: #0A0A0A; border: 2px solid #0A0A0A; }
.cookie-btn--secondary:not(:disabled):hover { background: #0A0A0A; color: #FFFFFF; transform: translateY(-1px); }
.cookie-btn--secondary:not(:disabled):active { transform: translateY(0); }

.cookie-btn--ghost {
    background: transparent; color: #0A0A0A; border: 2px solid transparent;
    text-transform: none; font-weight: 700; letter-spacing: 0;
    text-decoration: underline; text-underline-offset: 3px;
}
.cookie-btn--ghost:hover { opacity: .7; }

/* ===================== Панель настроек ===================== */
.cookie-panel { position: fixed; inset: 0; z-index: 1020; }
.cookie-panel[hidden] { display: none; }
.cookie-panel__backdrop {
    position: absolute; inset: 0;
    background: rgba(10, 10, 10, 0.45);
    opacity: 0; transition: opacity .2s ease;
}
.cookie-panel.is-open .cookie-panel__backdrop { opacity: 1; }

.cookie-panel__card {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #FFFFFF;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.14);
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.34, 1.1, .64, 1);
    outline: none;
}
.cookie-panel.is-open .cookie-panel__card { transform: translateY(0); }

.cookie-panel__close {
    position: absolute; top: 14px; right: 14px;
    width: 44px; height: 44px;
    border: none; background: none; color: #292929;
    border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .15s ease, color .15s ease;
}
.cookie-panel__close:hover, .cookie-panel__close:focus { background: rgba(10, 10, 10, 0.06); color: #0A0A0A; }
.cookie-panel__close:focus-visible { outline: 2px solid #0A0A0A; outline-offset: 2px; }
.cookie-panel__close svg { width: 18px; height: 18px; display: block; }

.cookie-panel__title {
    margin: 0 44px 12px 0;
    font-family: 'Manrope', 'Inter', sans-serif;
    font-weight: 800; font-size: 20px; line-height: 1.2;
    letter-spacing: -0.01em; color: #0A0A0A;
}
.cookie-panel__status {
    margin: 0 0 20px;
    padding: 12px 14px;
    background: #F5F5F3;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 12.5px; line-height: 1.5; color: #1C1F24;
}

.cookie-group { padding: 18px 0; border-top: 1px solid #ECECEC; }
.cookie-group:first-of-type { border-top: none; padding-top: 0; }
.cookie-group__title {
    margin: 0 0 8px;
    font-family: 'Manrope', 'Inter', sans-serif;
    font-weight: 800; font-size: 15px; line-height: 1.25; color: #0A0A0A;
}
.cookie-group__text {
    margin: 0 0 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px; line-height: 1.55; color: #40454C;
}
.cookie-group__actions { display: flex; flex-direction: column; gap: 10px; }
.cookie-group__note {
    margin: 10px 0 0;
    font-family: 'Inter', sans-serif;
    font-size: 12px; line-height: 1.45; color: #6A6F76;
}
.cookie-panel__foot {
    margin: 20px 0 0;
    font-family: 'Inter', sans-serif; font-size: 12.5px; line-height: 1.5;
}

/* ===================== Триггер в футере ===================== */
.footer__link--cookie {
    background: none; border: none; padding: 0; margin: 0;
    cursor: pointer; font: inherit; color: inherit; text-align: left;
}

/* ===================== Анимации ===================== */
@keyframes cookieBannerIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cookieBannerOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
    @keyframes cookieBannerIn { from { opacity: 0; } to { opacity: 1; } }
    .cookie-banner.is-visible { animation: cookieBannerIn 200ms ease-out both; }
    .cookie-banner.is-closing { animation: none; }
    .cookie-panel__card, .cookie-panel__backdrop { transition: none; }
    .cookie-btn:hover, .cookie-btn:active { transform: none; }
}

/* ===================== Планшет / десктоп (>= 640px) ===================== */
@media (min-width: 640px) {
    .cookie-banner {
        left: 24px; right: auto; bottom: 24px;
        width: calc(100% - 48px);
        max-width: 420px;
        border-radius: 20px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        padding: 24px;
        max-height: calc(100vh - 48px);
    }
    .cookie-banner__title { font-size: 18px; }
    .cookie-banner__text p { font-size: 13.5px; }
    .cookie-banner__buttons { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .cookie-banner__buttons .cookie-btn { flex: 1 1 auto; width: auto; }
    .cookie-banner__close { top: 16px; right: 16px; }

    .cookie-panel__card {
        left: 50%; right: auto; bottom: auto; top: 50%;
        width: calc(100% - 48px); max-width: 480px;
        border-radius: 20px;
        transform: translate(-50%, -50%) scale(.96);
        opacity: 0;
        transition: transform .22s cubic-bezier(.34, 1.1, .64, 1), opacity .22s ease;
        padding: 28px;
    }
    .cookie-panel.is-open .cookie-panel__card { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .cookie-group__actions { flex-direction: row; flex-wrap: wrap; }
    .cookie-group__actions .cookie-btn { flex: 1 1 auto; width: auto; }
}

@media (min-width: 640px) and (prefers-reduced-motion: reduce) {
    .cookie-panel__card { transition: opacity .18s ease; transform: translate(-50%, -50%) scale(1); }
}
