/* GDPR cookie consent – initial prompt as modal */
.cookie-consent-banner {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cookie-consent-banner.cookie-consent-visible {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-banner-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.cookie-consent-banner-content {
    position: relative;
    max-width: 560px;
    width: 100%;
    background: #0f172a;
    border: 2px solid var(--primary-color, #2563eb);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.cookie-consent-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #fff);
}

.cookie-consent-banner-content .cookie-consent-desc {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.6;
}

.cookie-consent-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    margin-bottom: 1rem;
    line-height: 1.5;
}

.cookie-consent-desc a {
    color: var(--primary-color, #2563eb);
    text-decoration: underline;
}

.cookie-consent-desc a:hover {
    color: #FF3333;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-consent-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cookie-consent-btn-accept {
    background: var(--primary-color, #2563eb);
    color: #fff;
}

.cookie-consent-btn-accept:hover {
    background: var(--primary-dark, #1e40af);
}

.cookie-consent-btn-reject,
.cookie-consent-btn-customise {
    background: transparent;
    color: var(--text-primary, #fff);
    border: 1px solid var(--border-color, rgba(255,255,255,0.2));
}

.cookie-consent-btn-reject:hover,
.cookie-consent-btn-customise:hover {
    background: rgba(255,255,255,0.08);
}

/* Modal */
.cookie-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.cookie-consent-modal.cookie-consent-modal-visible {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(53, 69, 111, 0.6);
}

.cookie-consent-modal-content {
    position: relative;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #0f172a;
    border: 2px solid var(--primary-color, #2563eb);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.cookie-consent-modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary, #fff);
}

.cookie-consent-modal-desc {
    font-size: 0.875rem;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.cookie-consent-category {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.1));
}

.cookie-consent-category:last-of-type {
    border-bottom: none;
}

.cookie-consent-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.cookie-consent-category-name {
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.cookie-consent-category-badge {
    font-size: 0.75rem;
    color: var(--text-secondary, rgba(255,255,255,0.7));
}

.cookie-consent-category-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    line-height: 1.45;
}

/* Toggle */
.cookie-consent-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.cookie-consent-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-consent-toggle-slider {
    width: 44px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    transition: background 0.2s;
}

.cookie-consent-toggle-slider::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle-slider {
    background: var(--primary-color, #2563eb);
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-consent-toggle input:focus-visible + .cookie-consent-toggle-slider {
    outline: 2px solid #FF3333;
    outline-offset: 2px;
}

.cookie-consent-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.cookie-consent-btn-primary {
    background: var(--primary-color, #2563eb);
    color: #fff;
}

.cookie-consent-btn-primary:hover {
    background: var(--primary-dark, #1e40af);
}

.cookie-consent-btn-secondary {
    background: transparent;
    color: var(--text-primary, #fff);
    border: 1px solid var(--border-color, rgba(255,255,255,0.2));
}

.cookie-consent-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
}

.cookie-consent-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary, rgba(255,255,255,0.8));
    cursor: pointer;
    border-radius: 4px;
}

.cookie-consent-modal-close:hover {
    color: var(--text-primary, #fff);
    background: rgba(255,255,255,0.1);
}

@media (max-width: 640px) {
    .cookie-consent-actions {
        flex-direction: column;
    }
    .cookie-consent-btn {
        width: 100%;
    }
}
