/* Baner zgody na cookies - niezależny od Bootstrapa (działa w starym i nowym layoucie).
   Kolory z motywu, jeśli strona go ma (nowy front / admin), w przeciwnym razie neutralne zapasowe.
   "Akceptuję" i "Odrzucam" celowo wyglądają identycznie - bez nakłaniania do zgody. */
.cc {
    --cc-bg: var(--mag-paper, #ffffff);
    --cc-ink: var(--mag-ink, #1c2430);
    --cc-muted: var(--mag-muted, #5d6672);
    --cc-rule: var(--mag-rule, #e3e6ea);
    --cc-accent: var(--ins-primary, #d7141a);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    font-family: var(--ins-font-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
    font-size: 15px;
    line-height: 1.55;
    pointer-events: none;
}
.cc[hidden] { display: none !important; }
.cc-box {
    pointer-events: auto;
    max-width: 760px;
    margin: 0 auto;
    background: var(--cc-bg);
    color: var(--cc-ink);
    border: 1px solid var(--cc-rule);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    padding: 20px 22px;
}
.cc-title {
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    color: var(--cc-ink);
    margin: 0 0 6px;
}
.cc-title:focus { outline: none; }
.cc-text { margin: 0; color: var(--cc-muted); }
.cc-text a,
.cc-link {
    color: var(--cc-ink);
    text-decoration: underline;
    text-decoration-color: var(--cc-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.cc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}
.cc-btn {
    min-width: 132px;
    padding: 10px 18px;
    border: 1px solid var(--cc-ink);
    border-radius: 6px;
    background: var(--cc-ink);
    color: var(--cc-bg);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.cc-btn:hover { opacity: 0.88; }
.cc-link {
    border: 0;
    background: none;
    padding: 10px 4px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.cc-btn:focus-visible,
.cc-link:focus-visible,
.cc-switch:focus-visible,
.cc-text a:focus-visible {
    outline: 2px solid var(--cc-accent);
    outline-offset: 3px;
}
.cc-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cc-rule);
}
.cc-option-name { display: block; font-weight: 600; margin: 0 0 2px; color: var(--cc-ink); }
.cc-option-desc { margin: 0; color: var(--cc-muted); font-size: 14px; }

/* Przełącznik */
.cc-switch {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    margin-top: 2px;
    border-radius: 999px;
    background: var(--cc-rule);
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease;
}
.cc-switch::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, 0.25);
    transition: transform 0.15s ease;
}
.cc-switch:checked { background: var(--cc-accent); }
.cc-switch:checked::after { transform: translateX(20px); }
.cc-switch:disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 575.98px) {
    .cc { padding-inline: 8px; }
    .cc-box { padding: 16px; }
    .cc-btn { flex: 1 1 40%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .cc-switch, .cc-switch::after { transition: none; }
}
