/* №91: окно согласия на cookie (front/templates/cookies.blade.php). Компьютер — карточка внизу слева (справа у владельца мини-меню),
   телефон — над нижним меню. Окно не закрывает сайт. Кнопки «Принять все» и «Отклонить все» одинаковые: жёлтые с тёмным текстом,
   как кнопки сайта («Найти», «В корзину»); «Настроить» — белая с серой рамкой. Ничего красного. */
.ckc { position: fixed; z-index: 10001; left: 24px; bottom: 24px; width: min(640px, calc(100% - 48px)); font-family: inherit; }
.ckc[hidden], .ckc [hidden], .ckc-toast[hidden] { display: none !important; }
/* карточка не выше экрана: текст и настройки (.ckc-body) прокручиваются, кнопки (.ckc-btns) всегда видны внизу */
.ckc-card { position: relative; display: flex; flex-direction: column; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: hidden;
    border: 1px solid #E5E5E5; border-radius: 12px; background: #fff; box-shadow: 0 10px 34px rgba(48, 48, 48, .16); animation: ckc-in .22s ease-out; }
@keyframes ckc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ckc-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px 24px 0; }
.ckc--set .ckc-body { padding-bottom: 14px; }
.ckc-title { margin: 0 36px 8px 0; font-size: 18px; line-height: 24px; font-weight: 700; color: #222; outline: none; }
.ckc-text { margin: 0; font-size: 14px; line-height: 21px; color: #333; }
.ckc-text a { color: #222; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.ckc-x { position: absolute; z-index: 1; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
    padding: 0; border: 0; border-radius: 8px; background: #fff; cursor: pointer; }
.ckc-x svg { width: 14px; height: 14px; fill: none; stroke: #555; stroke-width: 1.7; stroke-linecap: round; }

/* кнопки: «Принять все» и «Отклонить все» — одинаковые */
.ckc-btns { flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 16px 24px 20px; }
.ckc--set .ckc-btns { padding-top: 14px; border-top: 1px solid #EEEEEE; }
.ckc-btn { height: 44px; margin: 0; padding: 0 12px; border: 1px solid #FEDC29; border-radius: 8px; background: #FEDC29; color: #222;
    font: inherit; font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; transition: background-color .15s, border-color .15s; }
.ckc-btn--light { border-color: #8C8C8C; background: #fff; font-weight: 600; }
.ckc-btn:focus-visible, .ckc-x:focus-visible, .ckc-text a:focus-visible { outline: 2px solid #222; outline-offset: 2px; }
/* наведение — только мышью: на телефоне после нажатия «Настроить» «Сохранить выбор» не остаётся серой */
@media (hover: hover) {
    .ckc-text a:hover { color: #000; }
    .ckc-x:hover { background: #F2F3F5; }
    .ckc-btn:hover { background: #F5D010; border-color: #F5D010; }
    .ckc-btn--light:hover { background: #F5F6F7; border-color: #6B6B6B; }
}

/* настройки: категории с пояснениями */
.ckc-set { display: grid; gap: 10px; margin-top: 14px; }
.ckc-cat { padding: 12px 14px; border: 1px solid #EAEAEA; border-radius: 10px; background: #FAFAFA; }
.ckc-cat-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 0;
    font-size: 15px; line-height: 20px; color: #222; cursor: pointer; }
.ckc-cat-head b { font-weight: 700; }
.ckc-cat p { margin: 6px 0 0; font-size: 13px; line-height: 19px; color: #4F4F4F; }
.ckc-always { flex: none; font-size: 13px; font-weight: 700; color: #2E7D32; }
.ckc-note { margin: 0; font-size: 13px; line-height: 19px; color: #4F4F4F; }
/* переключатель: настоящий флажок (работает с клавиатуры), видимая часть — рядом */
.ckc-sw { position: absolute; right: 0; top: 50%; width: 44px; height: 24px; margin: -12px 0 0; opacity: 0; cursor: pointer; }
.ckc-sw-ui { position: relative; flex: none; width: 44px; height: 24px; border-radius: 12px; background: #8C8C8C; transition: background-color .15s; }
.ckc-sw-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.ckc-sw:checked + .ckc-sw-ui { background: #303030; }
.ckc-sw:checked + .ckc-sw-ui::after { transform: translateX(20px); }
.ckc-sw:focus-visible + .ckc-sw-ui { outline: 2px solid #222; outline-offset: 2px; }

/* «Выбор сохранён» */
.ckc-toast { position: fixed; z-index: 10002; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 11px 18px;
    border-radius: 22px; background: #303030; color: #fff; font-size: 14px; line-height: 20px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }

/* телефон: над нижним меню, на всю ширину; «Принять все» и «Отклонить все» рядом, «Настроить» — строкой ниже */
@media (max-width: 1000px) {
    .ckc { left: 8px; right: 8px; bottom: calc(var(--mnav-h, 0px) + 8px); width: auto; }
    .ckc-card { max-height: calc(100vh - var(--mnav-h, 0px) - 24px); max-height: calc(100dvh - var(--mnav-h, 0px) - 24px); }
    .ckc-body { padding: 16px 16px 0; }
    .ckc--set .ckc-body { padding-bottom: 12px; }
    .ckc-title { font-size: 16px; line-height: 22px; margin-bottom: 6px; }
    .ckc-text { font-size: 13.5px; line-height: 20px; }
    .ckc-btns { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px 14px; }
    .ckc--set .ckc-btns { padding-top: 12px; }
    /* открыто окно «Каталог» / «Профиль» или клавиатура (печатают в поле) — окно cookie не мешает, потом снова видно */
    html.mnav-open .ckc, html.kb-open .ckc { display: none; }
    .ckc-btn--light { grid-column: 1 / -1; }
    .ckc-toast { bottom: calc(var(--mnav-h, 0px) + 16px); }
}
@media (prefers-reduced-motion: reduce) {
    .ckc-card { animation: none; }
    .ckc-btn, .ckc-sw-ui, .ckc-sw-ui::after { transition: none; }
}
