/* Баннер согласия на cookie (js/cookie-consent.js) */
:root {
    /* цвета и форма из css/style.css */
    --cc-bg: #08377D;          /* фон плашки — тёмно-синий, как подвал сайта */
    --cc-text: #ffffff;        /* текст на плашке */
    --cc-accent: #F48120;      /* оранжевый акцент — кнопка «Согласен», обводка «Отменить» */
    --cc-accent-text: #ffffff; /* текст на оранжевой кнопке, как у кнопок сайта */
    --cc-link: #FFD16C;        /* ссылка на политику — светло-жёлтый сайта, читается на синем */
    --cc-radius: 16px;         /* скругление плашки, как у карточек сайта */
    --cc-btn-radius: 30px;     /* скругление кнопок, как у .btn сайта */
}

.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 2147483000; /* поверх кнопки онлайн-чата Verbox */
    display: flex;
    align-items: center;
    gap: 24px;
    width: min(1160px, calc(100% - 32px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 14px 22px;
    border-radius: var(--cc-radius);
    background: var(--cc-bg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    color: var(--cc-text);
    font-family: "Montserrat", sans-serif;
    text-align: left;
    opacity: 0;
    transform: translate(-50%, 20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-consent.is-shown { opacity: 1; transform: translate(-50%, 0); }
.cookie-consent.is-hidden { opacity: 0; transform: translate(-50%, 20px); }

.cookie-consent__text {
    flex: 1;
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--cc-text);
}

/* если в стилях сайта у всех элементов задан font-size — ссылка должна быть как текст */
.cookie-consent__text * {
    font-size: inherit;
    line-height: inherit;
}

.cookie-consent__text a {
    color: var(--cc-link);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__text a:hover { color: var(--cc-text); }

.cookie-consent__buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.cookie-consent__btn {
    min-width: 140px;
    margin: 0;
    padding: 8px 18px;
    border: 2px solid var(--cc-accent);
    border-radius: var(--cc-btn-radius);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cookie-consent__btn--accept { background: var(--cc-accent); color: var(--cc-accent-text); }
.cookie-consent__btn--accept:hover { box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }

.cookie-consent__btn--decline { background: transparent; color: var(--cc-text); }
.cookie-consent__btn--decline:hover { background: rgba(255, 255, 255, 0.12); }

.cookie-consent__btn:focus-visible,
.cookie-consent__text a:focus-visible {
    outline: 2px solid var(--cc-text);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .cookie-consent {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 16px;
    }
    .cookie-consent__buttons { flex-direction: row; }
    .cookie-consent__btn { flex: 1; min-width: 0; }
}

@media (max-height: 700px) and (min-width: 701px) {
    .cookie-consent { bottom: 8px; padding: 10px 18px; }
    .cookie-consent__text { font-size: 12px; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent { transition: none; }
}

/* Версия для слабовидящих: чёрно-белый баннер.
   Сайт ставит на body класс цветовой схемы, а на страницах с body id="wrapper" — ещё и .bad-see.
   !important — потому что скрипт слабовидящих красит элементы инлайн-стилями. */
#wrapper.bad-see .cookie-consent,
body.whiteAndBlack .cookie-consent,
body.blackAndWhite .cookie-consent,
body.blueAndBlue .cookie-consent,
body.yellowAndGray .cookie-consent,
body.brownAndGreen .cookie-consent {
    top: 16px;     /* внизу экрана в этом режиме закреплена панель настроек — не перекрываем её */
    bottom: auto;
    border: 2px solid #000 !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #000 !important;
}
#wrapper.bad-see .cookie-consent *,
body.whiteAndBlack .cookie-consent *,
body.blackAndWhite .cookie-consent *,
body.blueAndBlue .cookie-consent *,
body.yellowAndGray .cookie-consent *,
body.brownAndGreen .cookie-consent * {
    background-color: transparent !important;
    color: #000 !important;
}
#wrapper.bad-see .cookie-consent__btn,
body.whiteAndBlack .cookie-consent__btn,
body.blackAndWhite .cookie-consent__btn,
body.blueAndBlue .cookie-consent__btn,
body.yellowAndGray .cookie-consent__btn,
body.brownAndGreen .cookie-consent__btn {
    border-color: #000 !important;
    background: #fff !important;
}
