/* ---- Базовый контейнер ---- */
.cookie_banner {
    font-family: var(--font-family);
    color: var(--color-dark);
    z-index: 900;
    box-sizing: border-box;
}
.cookie_banner * { box-sizing: border-box; }
.cookie_banner.is-dismissed { display: none !important; }

/* ---- Кнопки (.button / .button-gray берём из main.css) ---- */
.cookie_banner .button {
    border: 0;
    font-family: var(--font-family);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    cursor: pointer;
}
.cookie_banner .button:hover { background: #afc500; }
.cookie_banner .button.button-gray:hover { background: #eceff5; }

/* ---- Заголовок и текст ---- */
.cookie_banner_title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.cookie_banner_text { font-size: 14px; line-height: 1.45; margin: 0; color: #4a4f5c; }
.cookie_banner_text a { color: var(--color-blue); }
.cookie_banner_actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Блок настроек (раскрывается по «Настроить») ---- */
.cookie_banner_settings { display: none; border-top: 1px solid #eceff4; }
.cookie_banner.is-settings-open .cookie_banner_settings { display: block; }

.cookie_cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; }
.cookie_cat + .cookie_cat { border-top: 1px solid #f4f6f9; }
.cookie_cat_name { font-size: 13px; font-weight: 600; }
.cookie_cat_desc { font-size: 12px; color: #9497a3; margin-top: 2px; }
.cookie_cat_lockmark { font-size: 11px; color: #9497a3; margin-top: 4px; }

.cookie_switch { width: 24px; height: 14px; background: #EAEDF1; padding: 2px; border-radius: 18px; box-sizing: border-box; cursor: pointer; flex: 0 0 auto; margin-top: 2px; transition: background 0.15s ease; }
.cookie_switch.is-on { background: #156CE1; }
.cookie_switch > span { width: 10px; height: 10px; border-radius: 50%; background: #fff; display: block; transition: margin 0.15s ease; }
.cookie_switch.is-on > span { margin-left: auto; }
.cookie_switch.is-locked { cursor: not-allowed; }

/* ---- Кнопки внутри настроек (наше добавление: «Только необходимые / Сохранить») ---- */
.cookie_banner_settings_actions { display: flex; gap: 8px; margin-top: 14px; }
.cookie_banner_settings_actions .button { flex: 1 1 auto; }

/* ====== Вариант «Уголок» ====== */
.cookie_banner_corner {
    position: fixed;
    left: 24px; bottom: 24px;
    width: 380px; max-width: calc(100vw - 48px);
    background: #fff;
    border: 1px solid #eceff4;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(31, 45, 71, 0.18);
    padding: 20px;
}
.cookie_banner_corner .cookie_banner_title { font-size: 13px; }
.cookie_banner_corner .cookie_banner_text { font-size: 13px; margin-bottom: 16px; }
.cookie_banner_corner .cookie_banner_actions { flex-wrap: nowrap; gap: 8px; }
.cookie_banner_corner.is-settings-open .cookie_banner_actions { margin-bottom: 12px; }
.cookie_banner_corner .button { font-size: 13px; padding: 0 14px; height: 32px; line-height: 32px; }

/* ====== Адаптив (768 / 480 — как в боевом дизайне 2023) ====== */
@media (max-width: 768px) {
    .cookie_banner_corner {
        left: 8px; right: 8px; bottom: 8px;
        width: auto; max-width: none;
        border-radius: 10px;
        padding: 16px;
    }
}
@media (max-width: 480px) {
    .cookie_banner .cookie_banner_actions { flex-wrap: wrap; gap: 8px; }
    .cookie_banner .cookie_banner_actions .button { flex: 1 1 auto; height: 32px; line-height: 32px; }
}
