/* =============================================================================
   LokalScore Cookie Consent (CMP) — wspólny asset serwowany przez nginx.
   Tokeny designu LokalScore (kolory #080D18, #111A2E, #00E5FF, #F8FAFC, #94A3B8;
   czcionki Inter/Outfit). Wszystkie selektory są zagnieżdżone pod #lsc-cc-root,
   aby nie kolidować ze stylami aplikacji (landing/docs/portal).
   ============================================================================= */

#lsc-cc-root {
    /* Reset lokalny — nie wpływa na aplikację hosta */
    all: initial;
}

#lsc-cc-root *,
#lsc-cc-root *::before,
#lsc-cc-root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#lsc-cc-root {
    font-family: "Inter", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #f8fafc;
    font-size: 14px;
    line-height: 1.5;
}

body.lsc-cc-no-scroll {
    overflow: hidden;
}

/* ── Przyciski ────────────────────────────────────────────────────────────── */
#lsc-cc-root .lsc-cc-btn {
    appearance: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 18px;
    border-radius: 10px;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

#lsc-cc-root .lsc-cc-btn:focus-visible {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}

#lsc-cc-root .lsc-cc-btn-primary {
    background: #00e5ff;
    color: #080d18;
}

#lsc-cc-root .lsc-cc-btn-primary:hover {
    background: #33ebff;
    box-shadow: 0 4px 18px rgba(0, 229, 255, 0.35);
}

#lsc-cc-root .lsc-cc-btn-secondary {
    background: transparent;
    border-color: #334155;
    color: #f8fafc;
}

#lsc-cc-root .lsc-cc-btn-secondary:hover {
    border-color: #475569;
    background: rgba(255, 255, 255, 0.05);
}

#lsc-cc-root .lsc-cc-btn-ghost {
    background: transparent;
    color: #94a3b8;
}

#lsc-cc-root .lsc-cc-btn-ghost:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}

/* ── Baner (dół ekranu) ──────────────────────────────────────────────────── */
#lsc-cc-root .lsc-cc-banner-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    display: flex;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

#lsc-cc-root .lsc-cc-banner {
    pointer-events: auto;
    position: relative;
    width: 100%;
    max-width: 1120px;
    background: rgba(17, 26, 46, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    padding: 20px 24px;
    animation: lscCcSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lscCcSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#lsc-cc-root .lsc-cc-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

#lsc-cc-root .lsc-cc-banner-copy {
    flex: 1 1 380px;
    min-width: 260px;
}

#lsc-cc-root .lsc-cc-title {
    font-family: "Outfit", "Inter", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

#lsc-cc-root .lsc-cc-text {
    font-size: 13px;
    color: #94a3b8;
}

/* Linki do polityk — zawsze w osobnej linii pod treścią */
#lsc-cc-root .lsc-cc-links {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #94a3b8;
}

#lsc-cc-root .lsc-cc-text a,
#lsc-cc-root .lsc-cc-links a {
    color: #00e5ff;
    text-decoration: none;
    font-weight: 500;
}

#lsc-cc-root .lsc-cc-text a:hover,
#lsc-cc-root .lsc-cc-links a:hover {
    text-decoration: underline;
}

#lsc-cc-root .lsc-cc-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#lsc-cc-root .lsc-cc-banner-close {
    margin-left: 2px;
    color: #64748b;
}

#lsc-cc-root .lsc-cc-banner-close:hover {
    color: #f8fafc;
}

/* ── Modal „Zarządzaj zgodami" ───────────────────────────────────────────── */
#lsc-cc-root .lsc-cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    background: rgba(5, 8, 15, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#lsc-cc-root .lsc-cc-overlay[hidden] {
    display: none;
}

#lsc-cc-root .lsc-cc-modal {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #111a2e;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
    padding: 24px 26px;
    color: #f8fafc;
}

#lsc-cc-root .lsc-cc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

#lsc-cc-root .lsc-cc-modal-header h2 {
    font-family: "Outfit", "Inter", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
}

#lsc-cc-root .lsc-cc-close {
    appearance: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

#lsc-cc-root .lsc-cc-close:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.06);
}

#lsc-cc-root .lsc-cc-modal-intro {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 16px;
}

#lsc-cc-root .lsc-cc-modal-cats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

#lsc-cc-root .lsc-cc-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    background: rgba(8, 13, 24, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.6);
    border-radius: 12px;
}

#lsc-cc-root .lsc-cc-cat-info {
    flex: 1 1 auto;
}

#lsc-cc-root .lsc-cc-cat-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #f8fafc;
    cursor: pointer;
}

#lsc-cc-root .lsc-cc-cat-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 999px;
}

#lsc-cc-root .lsc-cc-cat-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

#lsc-cc-root .lsc-cc-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Przełącznik (toggle) ────────────────────────────────────────────────── */
#lsc-cc-root .lsc-cc-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

#lsc-cc-root .lsc-cc-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#lsc-cc-root .lsc-cc-slider {
    position: absolute;
    inset: 0;
    background: #334155;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

#lsc-cc-root .lsc-cc-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #f8fafc;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

#lsc-cc-root .lsc-cc-switch input:checked+.lsc-cc-slider {
    background: #00e5ff;
}

#lsc-cc-root .lsc-cc-switch input:checked+.lsc-cc-slider::before {
    transform: translateX(20px);
    background: #080d18;
}

#lsc-cc-root .lsc-cc-switch input:focus-visible+.lsc-cc-slider {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}

#lsc-cc-root .lsc-cc-switch-disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

/* ── RWD ─────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    #lsc-cc-root .lsc-cc-banner-wrap {
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }

    #lsc-cc-root .lsc-cc-banner {
        padding: 18px 16px 16px;
        border-radius: 14px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    #lsc-cc-root .lsc-cc-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    #lsc-cc-root .lsc-cc-banner-copy {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        padding-right: 28px;
    }

    #lsc-cc-root .lsc-cc-banner-actions {
        width: 100%;
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
    }

    #lsc-cc-root .lsc-cc-banner-actions .lsc-cc-btn {
        width: 100%;
        text-align: center;
        white-space: normal;
        padding: 12px 14px;
    }

    /* Najważniejszy przycisk „Zaakceptuj wszystkie" na górze */
    #lsc-cc-root .lsc-cc-banner-actions .lsc-cc-btn-primary {
        order: 3;
    }

    #lsc-cc-root .lsc-cc-banner-actions .lsc-cc-btn-secondary {
        order: 2;
    }

    #lsc-cc-root .lsc-cc-banner-actions .lsc-cc-btn-ghost {
        order: 1;
        padding: 8px 14px;
    }

    #lsc-cc-root .lsc-cc-banner-close {
        position: absolute;
        top: 14px;
        right: 14px;
        margin: 0;
    }

    #lsc-cc-root .lsc-cc-overlay {
        padding: 12px;
    }

    #lsc-cc-root .lsc-cc-modal {
        padding: 18px;
        width: 100%;
        max-height: 90vh;
    }

    #lsc-cc-root .lsc-cc-modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    #lsc-cc-root .lsc-cc-modal-footer .lsc-cc-btn {
        width: 100%;
        text-align: center;
    }
}

/* Respektuj preferencję ograniczenia ruchu (upraszcza animacje) */
@media (prefers-reduced-motion: reduce) {
    #lsc-cc-root * {
        transition: none !important;
    }
}