/* Баннер и настройки cookie. Отдельный файл: подключается и в публичном, и в админском макете. */
.cc-banner,
.cc-dialog {
    --cc-bg: #ffffff;
    --cc-ink: #15171c;
    --cc-ink-2: #3a3e47;
    --cc-muted: #737781;
    --cc-line: #e4e1d9;
    --cc-accent: #f2651c;
    --cc-accent-ink: #c2490b;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--cc-ink);
}

.cc-banner[hidden] { display: none; }
.cc-banner {
    position: fixed; z-index: 1000;
    left: 16px; right: 16px; bottom: 16px;
    max-width: 1080px; margin: 0 auto;
    display: flex; align-items: center; gap: 20px;
    padding: 18px 22px;
    background: var(--cc-bg);
    border: 1px solid var(--cc-line);
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(21, 23, 28, .05), 0 14px 36px rgba(21, 23, 28, .16);
}
.cc-banner__text { flex: 1; font-size: 14px; line-height: 1.5; color: var(--cc-ink-2); }
.cc-banner a, .cc-dialog a { color: var(--cc-accent-ink); text-decoration: underline; }
.cc-banner__actions { display: flex; gap: 8px; flex-shrink: 0; }

.cc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 0 16px;
    border-radius: 999px; border: 1px solid transparent;
    font: 700 14px/1 inherit; font-family: inherit;
    cursor: pointer; white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}
.cc-btn--primary { background: var(--cc-accent); color: #fff; }
.cc-btn--primary:hover { background: var(--cc-accent-ink); }
.cc-btn--ghost { background: transparent; color: var(--cc-ink); border-color: var(--cc-line); }
.cc-btn--ghost:hover { border-color: var(--cc-ink); }
.cc-btn:focus-visible, .cc-switch input:focus-visible + .cc-switch__track { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

.cc-dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0; border: 0; border-radius: 16px;
    background: var(--cc-bg);
    box-shadow: 0 24px 64px rgba(21, 23, 28, .25);
}
.cc-dialog::backdrop { background: rgba(21, 23, 28, .45); }
.cc-dialog__body { padding: 24px; margin: 0; }
.cc-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cc-dialog__head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.cc-dialog__close { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--cc-muted); padding: 4px 8px; }
.cc-dialog__intro { font-size: 14px; line-height: 1.55; color: var(--cc-ink-2); margin: 0 0 12px; }
.cc-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }

.cc-option { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--cc-line); }
.cc-option__text { flex: 1; font-size: 14px; line-height: 1.5; }
.cc-option__text b { display: block; font-size: 15px; margin-bottom: 2px; }
.cc-option__text span { color: var(--cc-muted); }

.cc-switch { position: relative; flex-shrink: 0; width: 44px; height: 26px; margin-top: 2px; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch__track { position: absolute; inset: 0; border-radius: 999px; background: #cfccc4; transition: background .2s; pointer-events: none; }
.cc-switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s;
}
.cc-switch input:checked + .cc-switch__track { background: var(--cc-accent); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(18px); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + .cc-switch__track { opacity: .55; }

.cc-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.cc-link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

@media (max-width: 760px) {
    .cc-banner { flex-direction: column; align-items: stretch; gap: 14px; left: 8px; right: 8px; bottom: 8px; padding: 16px; }
    .cc-banner__actions { flex-wrap: wrap; }
    .cc-banner__actions .cc-btn { flex: 1 1 auto; }
    .cc-banner__actions .cc-btn--primary { order: -1; flex-basis: 100%; }
    .cc-dialog__actions .cc-btn { flex: 1 1 100%; }
}
