/* Cookie Consent – Modo CMS */

.cc {
    --cc-accent: #2563eb;
    --cc-bg: #ffffff;
    --cc-text: #111827;
    --cc-muted: #6b7280;
    --cc-border: rgba(17, 24, 39, 0.12);
    --cc-radius: 14px;
    --cc-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--cc-text);
}

.cc * { box-sizing: border-box; }

.cc-panel {
    background: var(--cc-bg);
    color: var(--cc-text);
    box-shadow: var(--cc-shadow);
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    padding: 20px 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.cc-body { flex: 1 1 420px; min-width: 260px; }

.cc-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: inherit; }
.cc-message { margin: 0 0 6px; color: inherit; }
.cc-links { margin: 4px 0 0; font-size: 12px; }
.cc-links a { color: var(--cc-accent); text-decoration: underline; }

/* Pozycje */
.cc-pos-bottom { top: auto; bottom: 0; }
.cc-pos-top { bottom: auto; top: 0; }

.cc-pos-bottom,
.cc-pos-top { padding: 14px; }

.cc-pos-bottom-left,
.cc-pos-bottom-right {
    top: auto;
    bottom: 16px;
    width: auto;
    max-width: 440px;
}
.cc-pos-bottom-left { left: 16px; right: auto; }
.cc-pos-bottom-right { right: 16px; left: auto; }

.cc-pos-bottom-left .cc-panel,
.cc-pos-bottom-right .cc-panel { flex-direction: column; align-items: stretch; padding: 20px; }
.cc-pos-bottom-left .cc-body,
.cc-pos-bottom-right .cc-body { flex: 1 1 auto; }

/* Układy */
.cc-layout-modal {
    top: 0; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 20px;
}
.cc-layout-modal .cc-panel { max-width: 640px; flex-direction: column; align-items: stretch; }

.cc-layout-card { padding: 16px; }

/* Kategorie */
.cc-categories {
    flex: 1 1 100%;
    display: grid;
    gap: 10px;
    padding-top: 6px;
}
.cc-cat {
    display: block;
    border: 1px solid var(--cc-border);
    border-radius: calc(var(--cc-radius) - 4px);
    padding: 12px 14px;
    cursor: pointer;
}
.cc-cat-necessary { cursor: default; opacity: 0.9; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-cat-name { font-weight: 600; }
.cc-cat-desc { display: block; margin-top: 4px; font-size: 12px; color: var(--cc-muted); }
.cc-badge {
    font-size: 11px; font-weight: 600;
    background: color-mix(in srgb, var(--cc-accent) 15%, transparent);
    color: var(--cc-accent);
    padding: 2px 8px; border-radius: 999px;
}

/* Przełącznik */
.cc-switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-slider {
    position: absolute; inset: 0; border-radius: 999px;
    background: #cbd5e1; transition: background 0.2s;
    pointer-events: none;
}
.cc-slider::before {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform 0.2s;
}
.cc-switch input:checked + .cc-slider { background: var(--cc-accent); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(18px); }
.cc-switch input:focus-visible + .cc-slider { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

/* Przyciski */
.cc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cc-btn {
    appearance: none; border: 1px solid transparent; cursor: pointer;
    font: inherit; font-weight: 600; padding: 10px 18px; border-radius: calc(var(--cc-radius) - 6px);
    transition: filter 0.15s, background 0.15s;
}
.cc-btn-primary { background: var(--cc-accent); color: #fff; }
.cc-btn-primary:hover { filter: brightness(0.94); }
.cc-btn-ghost { background: transparent; color: var(--cc-text); border-color: var(--cc-border); }
.cc-btn-ghost:hover { background: rgba(127, 127, 127, 0.12); }

/* Przycisk "Zmień zgodę" */
.cc-revoke {
    position: fixed; bottom: 16px;
    left: auto; right: auto;
    top: auto;
    width: auto; max-width: none;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--cc-bg); color: var(--cc-text);
    border: 1px solid var(--cc-border);
    border-radius: 999px; padding: 8px 14px; cursor: pointer;
    box-shadow: var(--cc-shadow); font: inherit; font-size: 13px; font-weight: 600;
}
.cc-revoke-right { right: 16px; }
.cc-revoke-left { left: 16px; }
.cc-revoke-text { white-space: nowrap; }

/* Motywy */
.cc-theme-light { --cc-bg: #ffffff; --cc-text: #111827; --cc-muted: #6b7280; --cc-border: rgba(17,24,39,0.12); }

.cc-theme-dark { --cc-bg: #0f172a; --cc-text: #f1f5f9; --cc-muted: #94a3b8; --cc-border: rgba(255,255,255,0.14); }

.cc-theme-glass {
    --cc-bg: rgba(255, 255, 255, 0.72);
    --cc-text: #0f172a; --cc-muted: #475569;
    --cc-border: rgba(255, 255, 255, 0.5);
}
.cc-theme-glass .cc-panel {
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.cc-theme-minimal {
    --cc-bg: #ffffff; --cc-text: #111827; --cc-muted: #6b7280;
    --cc-border: #e5e7eb; --cc-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.cc-theme-minimal .cc-btn-primary { border-radius: 6px; }
.cc-theme-minimal .cc-panel { border-radius: 8px; }

.cc-theme-gradient {
    --cc-bg: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
    --cc-text: #ffffff; --cc-muted: #cbd5e1;
    --cc-border: rgba(255,255,255,0.18);
}
.cc-theme-gradient .cc-panel { background: var(--cc-bg); }
.cc-theme-gradient .cc-btn-ghost { color: #fff; border-color: rgba(255,255,255,0.35); }

/* Blokada przewijania przy modalu */
.cc-lock { overflow: hidden; }

/* Responsywność */
@media (max-width: 640px) {
    .cc-pos-bottom-left, .cc-pos-bottom-right {
        left: 10px; right: 10px; bottom: 10px; max-width: none;
    }
    .cc-panel { padding: 16px; }
    .cc-actions { width: 100%; }
    .cc-actions .cc-btn { flex: 1 1 auto; }
    .cc-revoke-text { display: none; }
}

/* Drukowanie – nie pokazuj banera */
@media print {
    .cc, .cc-revoke { display: none !important; }
}