/* ============================================
   Cookie Consent Banner — AVG/GDPR Compliant
   BespaarIsolatie
   ============================================ */

/* Overlay */
.cc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
    backdrop-filter: blur(2px);
}
.cc-overlay.active { display: block; }

/* Banner */
.cc-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 99999;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    border-top: 3px solid #27ae60;
    font-family: 'Outfit', 'DM Sans', -apple-system, sans-serif;
    animation: ccSlideUp 0.4s ease;
}
.cc-banner.active { display: block; }

@keyframes ccSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cc-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 28px;
}

/* Header */
.cc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.cc-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2332;
}
.cc-cookie-icon {
    font-size: 1.4rem;
}

.cc-text {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
    margin-bottom: 16px;
}
.cc-text a {
    color: #27ae60;
    text-decoration: underline;
}
.cc-text a:hover {
    color: #1a8a4a;
}

/* Buttons row */
.cc-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.cc-btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.cc-btn-accept {
    background: #27ae60;
    color: #fff;
}
.cc-btn-accept:hover {
    background: #219a52;
    box-shadow: 0 2px 12px rgba(39,174,96,0.3);
}

.cc-btn-reject {
    background: #f0f2f5;
    color: #4a5568;
}
.cc-btn-reject:hover {
    background: #e2e6ea;
}

.cc-btn-settings {
    background: transparent;
    color: #27ae60;
    border: 1px solid #27ae60;
}
.cc-btn-settings:hover {
    background: #f0faf4;
}

/* ============================================
   Settings Modal
   ============================================ */
.cc-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    z-index: 100000;
    width: 92%;
    max-width: 580px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,0.2);
    animation: ccFadeIn 0.3s ease;
}
.cc-modal.active { display: block; }

@keyframes ccFadeIn {
    from { opacity: 0; transform: translate(-50%, -48%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.cc-modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid #e8ecf1;
}
.cc-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a2332;
}
.cc-modal-header p {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #6b7b8d;
}

.cc-modal-body {
    padding: 20px 28px;
}

/* Cookie category */
.cc-category {
    padding: 16px 0;
    border-bottom: 1px solid #f0f2f5;
}
.cc-category:last-child {
    border-bottom: none;
}

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

.cc-category-info {
    flex: 1;
}
.cc-category-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a2332;
}
.cc-category-info p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #6b7b8d;
    line-height: 1.4;
}

/* Toggle switch */
.cc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.cc-toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.cc-toggle input:checked + .cc-toggle-slider {
    background: #27ae60;
}
.cc-toggle input:checked + .cc-toggle-slider::before {
    transform: translateX(20px);
}
.cc-toggle input:disabled + .cc-toggle-slider {
    background: #27ae60;
    opacity: 0.6;
    cursor: not-allowed;
}

.cc-required-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7b8d;
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Modal footer */
.cc-modal-footer {
    padding: 16px 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #e8ecf1;
}

/* Small "cookie settings" link in page footer */
.cc-footer-link {
    cursor: pointer;
    color: inherit;
    text-decoration: underline;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}
.cc-footer-link:hover {
    color: #27ae60;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
    .cc-inner {
        padding: 18px 16px;
    }
    .cc-buttons {
        flex-direction: column;
    }
    .cc-btn {
        width: 100%;
        text-align: center;
    }
    .cc-modal {
        width: 96%;
        max-height: 90vh;
    }
    .cc-modal-header, .cc-modal-body, .cc-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    .cc-modal-footer {
        flex-direction: column;
    }
    .cc-modal-footer .cc-btn {
        width: 100%;
        text-align: center;
    }
}
