/* LitCookie — баннер согласия. Компактно, прямые углы, светлая и тёмная тема. */

.lc-root {
    --lc-accent: #e5a50a;
    --lc-accent-text: #111;
    --lc-bg: #ffffff;
    --lc-fg: #1d232a;
    --lc-muted: #5f6b76;
    --lc-border: #d5dbe1;
    --lc-soft: #f3f5f7;
    --lc-shadow: 0 6px 24px rgba(0, 0, 0, .14);
    font: 400 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--lc-fg);
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}
.lc-root *, .lc-root *::before, .lc-root *::after { box-sizing: border-box; }

.lc-theme-dark,
html[data-bs-theme="dark"] .lc-theme-auto,
html.dark .lc-theme-auto,
html.dark-theme .lc-theme-auto,
body.dark .lc-theme-auto,
body.dark-theme .lc-theme-auto {
    --lc-bg: #1b2026;
    --lc-fg: #e8ecef;
    --lc-muted: #9aa6b1;
    --lc-border: #343c45;
    --lc-soft: #242a31;
    --lc-shadow: 0 6px 24px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
    html:not([data-bs-theme="light"]):not(.light) .lc-theme-auto {
        --lc-bg: #1b2026;
        --lc-fg: #e8ecef;
        --lc-muted: #9aa6b1;
        --lc-border: #343c45;
        --lc-soft: #242a31;
        --lc-shadow: 0 6px 24px rgba(0, 0, 0, .5);
    }
}

.lc-title { font-weight: 700; font-size: 15px; margin: 0 0 4px; color: var(--lc-fg); }
.lc-text { color: var(--lc-muted); font-size: 13px; }
.lc-text p { margin: 0 0 8px; }
.lc-text p:last-child { margin-bottom: 0; }
.lc-link { color: var(--lc-fg); text-decoration: underline; text-underline-offset: 2px; }
.lc-link:hover { color: var(--lc-accent); }

/* --- Кнопки ------------------------------------------------------------ */
.lc-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    border: 1px solid var(--lc-border);
    border-radius: 0;
    background: transparent;
    color: var(--lc-fg);
    font: 600 13px/1.2 inherit;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.lc-btn:focus-visible { outline: 2px solid var(--lc-accent); outline-offset: 2px; }
.lc-btn-primary { background: var(--lc-accent); border-color: var(--lc-accent); color: var(--lc-accent-text); }
.lc-btn-primary:hover { filter: brightness(1.06); }
.lc-btn-secondary { background: var(--lc-soft); }
.lc-btn-secondary:hover, .lc-btn-ghost:hover { border-color: var(--lc-fg); }
.lc-btn-ghost { border-style: dashed; }

.lc-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lc-muted);
    font-size: 22px;
    line-height: 1;
}
.lc-close:hover { color: var(--lc-fg); }

/* --- Баннер ------------------------------------------------------------ */
.lc-banner {
    position: fixed;
    z-index: 2147483000;
    background: var(--lc-bg);
    border: 1px solid var(--lc-border);
    border-top: 3px solid var(--lc-accent);
    box-shadow: var(--lc-shadow);
    animation: lc-in .2s ease-out;
}
.lc-banner-in { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px 16px; }
.lc-banner-text { flex: 1 1 auto; min-width: 0; padding-right: 18px; }
.lc-banner-btns { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

.lc-layout-bar { left: 0; right: 0; bottom: 0; border-left: 0; border-right: 0; border-bottom: 0; }
.lc-layout-bar .lc-banner-in { max-width: 1200px; margin: 0 auto; }

.lc-layout-box { left: 16px; bottom: 16px; width: 380px; max-width: calc(100vw - 32px); }
.lc-layout-box .lc-banner-in { flex-direction: column; align-items: stretch; }
.lc-layout-box .lc-banner-btns { justify-content: stretch; }
.lc-layout-box .lc-banner-btns .lc-btn { flex: 1 1 auto; }

.lc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 14, 18, .55);
}
.lc-backdrop .lc-layout-center { position: relative; width: 520px; max-width: 100%; }
.lc-layout-center .lc-banner-in { flex-direction: column; align-items: stretch; padding: 18px; }
.lc-layout-center .lc-banner-btns { justify-content: stretch; }
.lc-layout-center .lc-banner-btns .lc-btn { flex: 1 1 auto; }

/* --- Модальное окно ---------------------------------------------------- */
.lc-modal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 600px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    background: var(--lc-bg);
    border: 1px solid var(--lc-border);
    border-top: 3px solid var(--lc-accent);
    box-shadow: var(--lc-shadow);
    outline: 0;
    animation: lc-in .18s ease-out;
}
.lc-modal-head { position: relative; padding: 14px 44px 10px 16px; border-bottom: 1px solid var(--lc-border); }
.lc-modal-body { padding: 12px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lc-modal-foot { display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--lc-border); background: var(--lc-soft); }
.lc-modal-foot .lc-btn { flex: 1 1 0; }

.lc-cats { margin-top: 12px; border-top: 1px solid var(--lc-border); }
.lc-cat { padding: 10px 0; border-bottom: 1px solid var(--lc-border); }
.lc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lc-cat-title { font-weight: 600; color: var(--lc-fg); cursor: pointer; margin: 0; }
.lc-cat-desc { margin-top: 4px; color: var(--lc-muted); font-size: 13px; }
.lc-cat-prov { margin-top: 4px; color: var(--lc-muted); font-size: 12px; font-style: italic; }
.lc-always { font-size: 12px; font-weight: 600; color: var(--lc-muted); text-transform: uppercase; letter-spacing: .03em; }

/* Квадратный переключатель */
.lc-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 auto; margin: 0; cursor: pointer; }
.lc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.lc-switch span { position: absolute; inset: 0; background: var(--lc-soft); border: 1px solid var(--lc-border); transition: background .15s, border-color .15s; }
.lc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--lc-muted); transition: transform .15s, background .15s; }
.lc-switch input:checked + span { background: var(--lc-accent); border-color: var(--lc-accent); }
.lc-switch input:checked + span::after { transform: translateX(18px); background: var(--lc-accent-text); }
.lc-switch input:focus-visible + span { outline: 2px solid var(--lc-accent); outline-offset: 2px; }

/* --- Плавающий виджет -------------------------------------------------- */
.lc-widget {
    position: fixed;
    z-index: 2147482999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--lc-border);
    border-radius: 0;
    background: var(--lc-bg);
    color: var(--lc-fg);
    box-shadow: var(--lc-shadow);
    cursor: pointer;
    opacity: .85;
    transition: opacity .15s, color .15s, border-color .15s;
}
.lc-widget:hover, .lc-widget:focus-visible { opacity: 1; color: var(--lc-accent); border-color: var(--lc-accent); }
.lc-widget svg { width: 18px; height: 18px; fill: currentColor; }

/* --- Заглушка вместо заблокированного iframe --------------------------- */
.lc-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 180px;
    padding: 16px;
    background: var(--lc-soft);
    border: 1px dashed var(--lc-border);
    text-align: center;
}
.lc-ph-in { max-width: 420px; }
.lc-ph-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

html.lc-modal-open { overflow: hidden; }

@keyframes lc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- Телефон ----------------------------------------------------------- */
@media (max-width: 767px) {
    .lc-banner-in { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
    .lc-banner-text { padding-right: 22px; }
    .lc-banner-btns { display: grid; grid-template-columns: 1fr 1fr; }
    .lc-banner-btns .lc-btn-primary { grid-column: 1 / -1; order: -1; }
    .lc-layout-box { left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-left: 0; border-right: 0; border-bottom: 0; }
    .lc-backdrop { padding: 0; align-items: flex-end; }
    .lc-modal { width: 100%; max-height: 92vh; border-left: 0; border-right: 0; border-bottom: 0; }
    .lc-modal-foot { flex-wrap: wrap; }
    .lc-modal-foot .lc-btn-primary { flex-basis: 100%; order: -1; }
    .lc-widget-desktop { display: none; }
    .lc-text { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .lc-banner, .lc-modal { animation: none; }
}

@media print {
    .lc-banner, .lc-widget, .lc-backdrop { display: none !important; }
}
