/* =============================================================
   DLW Lighting Polska — Cookie Consent CSS
   Izolowane selektory z prefiksem .cc- / #cc-
   Zbudowane na tokenach design-systemu z style.css
============================================================= */

/* -------------------------------------------------------
   1. BANER (sticky bottom)
------------------------------------------------------- */

#cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    background: rgba(18, 18, 26, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 180, 216, 0.2);
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.6);
    padding: 20px 24px;

    /* Animacja wjazdu od dołu */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#cc-banner[hidden] {
    display: none;
}

#cc-banner.cc-visible {
    transform: translateY(0);
    opacity: 1;
}

.cc-banner-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cc-banner-text {
    flex: 1;
    min-width: 240px;
}

.cc-banner-text p {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    color: #a0a0b8;
    line-height: 1.6;
    margin: 0;
}

.cc-banner-text a {
    color: #00b4d8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cc-banner-text a:hover {
    color: #48cae4;
}

.cc-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* -------------------------------------------------------
   2. PRZYCISKI BANERA
------------------------------------------------------- */

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    line-height: 1;
}

/* Akceptuj wszystkie — akcent */
.cc-btn-accept {
    background: linear-gradient(135deg, #0077b6, #00b4d8, #48cae4);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.35);
}

.cc-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
}

/* Odrzuć wszystkie — ghost */
.cc-btn-reject {
    background: transparent;
    color: #a0a0b8;
    border: 1px solid rgba(160, 160, 184, 0.3);
}

.cc-btn-reject:hover {
    background: rgba(160, 160, 184, 0.08);
    color: #e8e8f0;
    border-color: rgba(160, 160, 184, 0.5);
}

/* Zarządzaj — subtle outline */
.cc-btn-manage {
    background: transparent;
    color: #00b4d8;
    border: 1px solid rgba(0, 180, 216, 0.4);
}

.cc-btn-manage:hover {
    background: rgba(0, 180, 216, 0.08);
    border-color: #00b4d8;
}

/* -------------------------------------------------------
   3. OVERLAY
------------------------------------------------------- */

#cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

#cc-overlay.cc-visible {
    opacity: 1;
}

/* -------------------------------------------------------
   4. MODAL
------------------------------------------------------- */

#cc-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%);
    z-index: 9200;
    width: min(580px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #12121a;
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7),
                0 0 0 1px rgba(0, 180, 216, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 180, 216, 0.3) transparent;
}

#cc-modal[hidden] {
    display: none;
}

#cc-modal.cc-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

#cc-modal::-webkit-scrollbar {
    width: 4px;
}

#cc-modal::-webkit-scrollbar-track {
    background: transparent;
}

#cc-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 180, 216, 0.3);
    border-radius: 4px;
}

/* -------------------------------------------------------
   5. NAGŁÓWEK MODALA
------------------------------------------------------- */

.cc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 28px 28px 20px;
    border-bottom: 1px solid #2a2a3e;
    position: sticky;
    top: 0;
    background: #12121a;
    z-index: 1;
}

.cc-modal-header h2 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #e8e8f0;
    margin: 0;
    line-height: 1.3;
}

.cc-modal-header p {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8125rem;
    color: #6c6c80;
    margin: 4px 0 0;
    line-height: 1.5;
}

.cc-modal-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #6c6c80;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.cc-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e8e8f0;
}

/* -------------------------------------------------------
   6. KATEGORIE
------------------------------------------------------- */

.cc-modal-body {
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-category {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 18px 20px;
    transition: border-color 0.2s;
}

.cc-category:hover {
    border-color: rgba(0, 180, 216, 0.25);
}

.cc-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cc-category-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e8e8f0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-category-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
}

.cc-badge-required {
    background: rgba(0, 180, 216, 0.12);
    color: #00b4d8;
    border: 1px solid rgba(0, 180, 216, 0.25);
}

.cc-category-desc {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8125rem;
    color: #6c6c80;
    line-height: 1.55;
    margin: 0;
}

/* -------------------------------------------------------
   7. TOGGLE SWITCH
------------------------------------------------------- */

.cc-toggle-wrap {
    flex-shrink: 0;
    position: relative;
    width: 44px;
    height: 24px;
}

.cc-toggle-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-toggle-track {
    display: block;
    width: 44px;
    height: 24px;
    background: #2a2a3e;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.25s ease;
    position: relative;
}

.cc-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #6c6c80;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.cc-toggle-wrap input:checked + .cc-toggle-track {
    background: #00b4d8;
}

.cc-toggle-wrap input:checked + .cc-toggle-track::after {
    transform: translateX(20px);
    background: #fff;
}

/* Toggle zablokowany (Niezbędne) */
.cc-toggle-wrap input:disabled + .cc-toggle-track {
    background: rgba(0, 180, 216, 0.4);
    cursor: not-allowed;
    opacity: 0.7;
}

.cc-toggle-wrap input:disabled + .cc-toggle-track::after {
    transform: translateX(20px);
    background: rgba(255, 255, 255, 0.8);
}

/* Focus visible dla dostępności */
.cc-toggle-wrap input:focus-visible + .cc-toggle-track {
    outline: 2px solid #00b4d8;
    outline-offset: 2px;
}

/* -------------------------------------------------------
   8. STOPKA MODALA
------------------------------------------------------- */

.cc-modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border-top: 1px solid #2a2a3e;
}

.cc-modal-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cc-modal-links a {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    color: #6c6c80;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.cc-modal-links a:hover {
    color: #00b4d8;
}

.cc-btn-save {
    background: linear-gradient(135deg, #0077b6, #00b4d8);
    color: #fff;
    padding: 11px 24px;
    font-size: 0.9375rem;
    box-shadow: 0 4px 14px rgba(0, 180, 216, 0.3);
}

.cc-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.45);
}

/* -------------------------------------------------------
   9. RESPONSYWNOŚĆ
------------------------------------------------------- */

@media (max-width: 640px) {
    #cc-banner {
        padding: 16px;
    }

    .cc-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .cc-banner-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cc-btn-accept {
        grid-column: 1 / -1;
    }

    .cc-modal-header,
    .cc-modal-body,
    .cc-modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .cc-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .cc-btn-save {
        width: 100%;
        justify-content: center;
    }

    .cc-modal-links {
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .cc-banner-actions {
        grid-template-columns: 1fr;
    }
}
