/* Баннер согласия на cookie (js/cookie-consent.js) */
:root {
    /* цвета и форма взяты из newstyle.css */
    --cc-bg: #666666;          /* фон плашки — тёмно-серый сайта (--gray2) */
    --cc-text: #ffffff;        /* текст на плашке */
    --cc-accent: #f28020;      /* кнопка «Согласен» — оранжевый сайта (--orange) */
    --cc-accent-text: #333333; /* текст на кнопке «Согласен» — тёмный, белый на оранжевом плохо читается */
    --cc-light: #eeefed;       /* ссылка и обводка «Отменить» — светло-серый сайта (--gray) */
    --cc-radius: 7px;          /* скругление плашки, как у заголовков колонок */
    --cc-btn-radius: 15px;     /* скругление кнопок, как у кнопок и поиска сайта */
}

.cookie-consent {
    position: fixed;
    left: 50%;
    bottom: 16px;
    z-index: 2147483000; /* поверх кнопок онлайн-чатов */
    display: flex;
    align-items: center;
    gap: 24px;
    box-sizing: border-box;
    width: min(1160px, calc(100% - 32px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    margin: 0;
    padding: 14px 22px;
    border: 0;
    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: "Golos Text", Arial, sans-serif;
    font-size: 16px;
    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;
    padding: 0;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--cc-text);
}

/* в стилях сайта у div, p, a и др. задан font-size и шрифт — ссылка должна быть как текст */
.cookie-consent__text * {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

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

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

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

.cookie-consent__btn {
    min-width: 132px;
    margin: 0;
    padding: 7px 16px;
    border: 2px solid var(--cc-accent);
    border-radius: var(--cc-btn-radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-shadow: none;
    box-shadow: none;
    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);
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.35);
}
.cookie-consent__btn--accept:hover { box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.45); }

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

/* в newstyle.css у button:focus стоит outline: none !important — возвращаем рамку для клавиатуры */
.cookie-consent__btn:focus-visible,
.cookie-consent__text a:focus-visible {
    outline: 2px solid var(--cc-text) !important;
    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: 0.75rem; line-height: 1.4; }
}

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