/* ═══════════════════════════════════════════
   COOKIE CONSENT BANNER
═══════════════════════════════════════════ */
.cc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    border-top: 1px solid #dde3f0;
    box-shadow: 0 -8px 28px rgba(16, 24, 40, 0.14);
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif;
    color: #1f2937;
}

.cc-banner.cc-visible {
    transform: translateY(0);
}

.cc-banner-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 1rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.cc-banner-content {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    flex: 1 1 auto;
}

.cc-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef1fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    color: #1a2860;
}

.cc-banner-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1a2860;
    margin: 0 0 0.2rem;
}

.cc-banner-desc {
    font-size: 0.84rem;
    color: #495057;
    margin: 0;
    line-height: 1.45;
}

.cc-banner-desc a {
    color: #4f6ef7;
    font-weight: 600;
    text-decoration: none;
}

.cc-banner-desc a:hover {
    color: #2e40a0;
    text-decoration: underline;
}

.cc-banner-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 0 auto;
}

/* ── Buttons ── */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.84rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.cc-btn:hover {
    transform: translateY(-1px);
}

.cc-btn:active {
    transform: translateY(0);
}

.cc-btn-accept {
    background: #1a2860;
    color: #fff;
}

.cc-btn-accept:hover {
    background: #2e40a0;
    box-shadow: 0 4px 12px rgba(26, 40, 96, 0.25);
}

.cc-btn-reject {
    background: #f0f2f8;
    color: #495057;
    border: 1px solid #dee2e6;
}

.cc-btn-reject:hover {
    background: #e4e7f0;
    border-color: #cdd0da;
}

.cc-btn-manage {
    background: transparent;
    color: #4f6ef7;
    border: 1px solid #4f6ef7;
}

.cc-btn-manage:hover {
    background: #eef1fa;
}

/* ═══════════════════════════════════════════
   COOKIE PREFERENCES MODAL
═══════════════════════════════════════════ */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(17, 24, 39, 0.28);
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    font-family: 'Inter', sans-serif;
}

.cc-modal-overlay.cc-visible {
    opacity: 1;
    visibility: visible;
}

.cc-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-modal-overlay.cc-visible .cc-modal {
    transform: translateY(0);
}

.cc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e8eaf0;
}

.cc-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2860;
    margin: 0;
}

.cc-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f0f2f8;
    color: #6c757d;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.cc-modal-close:hover {
    background: #e4e7f0;
    color: #1a2860;
}

.cc-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cc-modal-intro {
    font-size: 0.88rem;
    color: #495057;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.cc-modal-footer {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e8eaf0;
}

/* ── Category toggle ── */
.cc-pref-category {
    border: 1px solid #e8eaf0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.65rem;
    background: #fafbfd;
}

.cc-pref-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cc-pref-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    color: #1a2860;
    user-select: none;
}

.cc-pref-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #4f6ef7;
    cursor: pointer;
}

.cc-pref-checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cc-pref-label-text {
    font-weight: 600;
}

.cc-required-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #198754;
    background: #d4eddf;
    border-radius: 12px;
    padding: 1px 8px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cc-pref-toggle-details {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    font-size: 0.75rem;
    transition: color 0.15s;
}

.cc-pref-toggle-details:hover {
    color: #1a2860;
}

.cc-pref-desc {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0.4rem 0 0;
    line-height: 1.5;
}

.cc-pref-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cc-pref-details.cc-details-open {
    max-height: 500px;
    margin-top: 0.5rem;
}

/* ── Cookie table ── */
.cc-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.cc-cookie-table th {
    background: #eef1fa;
    color: #1a2860;
    font-weight: 600;
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid #dde3f0;
}

.cc-cookie-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #e8eaf0;
    color: #495057;
}

.cc-cookie-table td code {
    background: #eef1fa;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #2d2d44;
}

.cc-cat-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.cc-cat-necessary       { background: #d4eddf; color: #0a3622; }
.cc-cat-authentication  { background: #dbeafe; color: #1e3a8a; }
.cc-cat-analytics       { background: #fff3cd; color: #664d03; }
.cc-cat-preferences     { background: #e8eef9; color: #3d4a7a; }

/* ── Scan section ── */
.cc-scan-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e8eaf0;
}

.cc-scan-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a2860;
    margin-bottom: 0.35rem;
}

.cc-scan-desc {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 0.8rem;
}

.cc-scan-table-wrap {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #e8eaf0;
    border-radius: 8px;
}

.cc-scan-table {
    margin: 0;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .cc-banner-inner {
        padding: 1rem;
        align-items: stretch;
        flex-direction: column;
        gap: 0.85rem;
    }

    .cc-banner-content {
        align-items: flex-start;
    }

    .cc-banner-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .cc-btn {
        flex: 1 1 180px;
        justify-content: center;
    }

    .cc-modal {
        width: 95%;
        max-height: 90vh;
    }

    .cc-cookie-table th,
    .cc-cookie-table td {
        padding: 5px 6px;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .cc-banner-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .cc-banner-title {
        font-size: 0.92rem;
    }

    .cc-banner-desc {
        font-size: 0.8rem;
    }
}
