/* GDPR Cookie Consent Banner Styles */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-surface, #1a1a1a);
    border-top: 1px solid var(--color-border, #333);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

#cookie-consent-banner.cookie-consent-visible {
    transform: translateY(0);
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.cookie-consent-icon {
    flex-shrink: 0;
    color: var(--color-accent, #3b82f6);
    margin-top: 0.25rem;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--color-text-primary, #ffffff);
}

.cookie-consent-description {
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    color: var(--color-text-secondary, #a3a3a3);
}

.cookie-consent-description a {
    color: var(--color-accent, #3b82f6);
    text-decoration: underline;
}

.cookie-consent-description a:hover {
    color: var(--color-accent-hover, #2563eb);
}

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

.cookie-consent-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.cookie-consent-btn-primary {
    background: var(--color-accent, #3b82f6);
    color: white;
}

.cookie-consent-btn-primary:hover {
    background: var(--color-accent-hover, #2563eb);
    transform: translateY(-1px);
}

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

.cookie-consent-btn-secondary:hover {
    background: var(--color-surface-elevated, #222);
    border-color: var(--color-border-light, #444);
}

/* Customize Modal */
#cookie-customize-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#cookie-customize-modal.cookie-modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.cookie-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    background: var(--color-bg-secondary, #111);
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border, #333);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border, #333);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-text-primary, #ffffff);
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: var(--color-text-secondary, #a3a3a3);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: var(--color-surface, #1a1a1a);
    color: var(--color-text-primary, #ffffff);
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-intro {
    margin: 0 0 1.5rem 0;
    color: var(--color-text-secondary, #a3a3a3);
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-surface, #1a1a1a);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border, #333);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.cookie-category-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-category-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary, #ffffff);
}

.cookie-category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: var(--color-accent, #3b82f6);
    color: white;
    border-radius: 0.25rem;
    font-weight: 500;
}

.cookie-category-description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text-muted, #737373);
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--color-border, #333);
    transition: 0.3s;
    border-radius: 26px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: var(--color-accent, #3b82f6);
}

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

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-slider-disabled {
    background-color: var(--color-accent, #3b82f6) !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border, #333);
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-consent-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .cookie-modal-header {
        padding: 1.25rem;
    }

    .cookie-modal-body {
        padding: 1.25rem;
    }

    .cookie-modal-footer {
        padding: 1.25rem;
    }

    .cookie-modal-footer .cookie-consent-btn {
        width: 100%;
    }
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) #cookie-consent-banner {
        background: #ffffff;
        border-top-color: #e5e7eb;
    }

    :root:not([data-theme="dark"]) .cookie-consent-title {
        color: #111827;
    }

    :root:not([data-theme="dark"]) .cookie-consent-description {
        color: #6b7280;
    }

    :root:not([data-theme="dark"]) .cookie-modal-content {
        background: #ffffff;
        border-color: #e5e7eb;
    }

    :root:not([data-theme="dark"]) .cookie-modal-header {
        border-bottom-color: #e5e7eb;
    }

    :root:not([data-theme="dark"]) .cookie-modal-header h2 {
        color: #111827;
    }

    :root:not([data-theme="dark"]) .cookie-modal-intro {
        color: #6b7280;
    }

    :root:not([data-theme="dark"]) .cookie-category {
        background: #f9fafb;
        border-color: #e5e7eb;
    }

    :root:not([data-theme="dark"]) .cookie-category-info h4 {
        color: #111827;
    }

    :root:not([data-theme="dark"]) .cookie-category-description {
        color: #6b7280;
    }
}
