/*
 * Согласие на cookie — баннер (вариант 2 «Карточка», владелец 08.11.2026),
 * окно настроек, заглушка карты Google и ссылка в подвале.
 * Палитра — токены инфо-страниц (info.css): синий, без чёрного.
 * «Принять все» и «Отклонить все» — одного вида: отказаться так же просто.
 */
.cc, .cc-dialog, .cc-map, .cc-footer-link {
    --cc-navy: #033E8C; --cc-blue: #0B4FA8; --cc-ink: #0A2B4A; --cc-text: #3A4A60;
    --cc-soft: #EEF4FF; --cc-line: #E3EAF6; --cc-green: #419047;
    font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.cc *, .cc-dialog *, .cc-map * { box-sizing: border-box; }
.cc[hidden] { display: none !important; }

/* Баннер — карточка в левом нижнем углу, над полосой заявки и чатами. */
.cc {
    position: fixed; left: 20px; bottom: 20px; z-index: 1000000002;
    width: 380px; max-width: calc(100vw - 24px);
    display: grid; gap: 12px; padding: 18px;
    background: #fff; color: var(--cc-ink);
    border: 1px solid var(--cc-line); border-radius: 20px;
    box-shadow: 0 18px 40px rgba(3, 40, 100, .16);
    animation: cc-rise .35s cubic-bezier(.2, .7, .2, 1) both;
}
.cc__head { display: flex; align-items: center; gap: 10px; }
.cc__ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--cc-soft); color: var(--cc-navy); }
.cc__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--cc-ink); }
.cc__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cc-text); }
.cc__text a { color: var(--cc-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.cc__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc__btn {
    min-height: 42px; padding: 8px 12px; border-radius: 12px;
    border: 1.5px solid var(--cc-navy); background: #fff; color: var(--cc-navy);
    font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer;
    transition: background-color .15s, box-shadow .15s;
}
.cc__btn:hover { background: var(--cc-soft); }
.cc__btn:focus-visible, .cc__link:focus-visible, .cc-switch:focus-visible, .cc-dialog__x:focus-visible, .cc-footer-link:focus-visible {
    outline: 2px solid var(--cc-blue); outline-offset: 2px;
}
.cc__link {
    justify-self: start; padding: 0; border: 0; background: none; cursor: pointer;
    /* Тема задаёт кнопкам высоту — ссылке-кнопке она не нужна. */
    height: auto; min-height: 0; line-height: 1.4;
    font: inherit; font-size: 13px; font-weight: 600; color: var(--cc-blue); text-decoration: none;
}
.cc__link:hover { text-decoration: underline; }

/* Окно настроек — нативный <dialog>: фокус внутри, Esc закрывает. */
.cc-dialog {
    width: 480px; max-width: calc(100vw - 24px); max-height: calc(100vh - 32px);
    padding: 0; border: 0; border-radius: 20px; background: #fff; color: var(--cc-ink);
    box-shadow: 0 24px 48px rgba(3, 40, 100, .2); overflow: auto; overscroll-behavior: contain;
}
.cc-dialog::backdrop { background: rgba(10, 43, 74, .32); }
.cc-dialog__box { display: grid; gap: 14px; padding: 20px; }
.cc-dialog__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-dialog__title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.cc-dialog__x { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--cc-soft); color: var(--cc-navy); display: grid; place-items: center; cursor: pointer; }
.cc-dialog__lead { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cc-text); }
.cc-cat { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--cc-line); margin: 0; font-weight: 400; cursor: pointer; }
.cc-cat:first-of-type { cursor: default; }
.cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat__name { font-size: 14px; font-weight: 600; color: var(--cc-ink); }
.cc-cat__text { display: block; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--cc-text); }
.cc-cat__always { font-size: 12px; font-weight: 600; color: var(--cc-green); white-space: nowrap; }

/* Переключатель — настоящий checkbox (читается диктором и клавиатурой). */
.cc-switch {
    appearance: none; -webkit-appearance: none; flex: none; margin: 0;
    width: 46px; height: 28px; border-radius: 999px; background: #C3D0E6; position: relative; cursor: pointer;
    transition: background-color .2s;
}
.cc-switch::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgba(10, 43, 74, .25); transition: transform .2s;
}
.cc-switch:checked { background: var(--cc-green); }
.cc-switch:checked::after { transform: translateX(18px); }

/* Заглушка карты: размер берёт у окна, которое заменяет (класс окна). */
.cc-map {
    display: grid; place-items: center; text-align: center; padding: 16px;
    width: 100%; min-height: 200px; border-radius: 16px;
    background: linear-gradient(135deg, #EEF4FF, #F3F6FC); border: 1px solid var(--cc-line);
}
.info-map .cc-map { position: absolute; inset: 0; min-height: 0; border: 0; border-radius: 0; }
/* На «Контактах» шире 1000 px карта — фон сцены: слева стеклянная панель
   (min(480px, 46%), info.css), справа внизу карточка офиса. Текст и кнопку
   заглушки — в свободную часть справа сверху, иначе панель их закрывала. */
@media (min-width: 1001px) {
    .info-map .cc-map { padding: 24px 24px 120px calc(min(480px, 46%) + 24px); }
}
/* У окна карты на карточке клиники свой display: block (site.css) — заглушке
   с тем же классом нужна её сетка, иначе текст прижимается к верху. */
.loc__mapwrap .cc-map { display: grid; place-items: center; }
.cc-map__ph { display: grid; gap: 10px; justify-items: center; max-width: 340px; }
.cc-map__ph p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--cc-text); }
.cc-map__ph .cc__btn { padding: 8px 16px; }

/* Ссылка «Настройки cookie» в подвале — выглядит как ссылки рядом. */
.cc-footer-link {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; opacity: .85;
}
.cc-footer-link:hover { opacity: 1; }

@keyframes cc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Телефон: баннер компактнее — без значка, текст мельче, кнопки рядом
   (на 320 px «Отклонить все» помещается при 13,5 px). Цель — не больше
   двух пятых экрана. */
@media (max-width: 575px) {
    .cc { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; padding: 14px 16px; gap: 10px; }
    .cc__ic { display: none; }
    .cc__title { font-size: 14px; }
    .cc__text { font-size: 12.5px; line-height: 1.45; }
    .cc__btn { min-height: 40px; padding: 8px; font-size: 13.5px; }
    .cc-dialog { width: 100%; max-width: 100%; max-height: calc(100vh - 40px); margin: auto 0 0; border-radius: 20px 20px 0 0; }
    .cc-dialog__box { padding: 18px 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .cc { animation: none; }
    .cc-switch, .cc-switch::after, .cc__btn { transition: none; }
}
