/**
 * Cookie Consent Banner Styles
 *
 * GDPR/nDSG/CCPA compliant cookie consent banner
 * Glassmorphism design matching COEUS design system
 *
 * @created 2025-12-11
 * @version 1.0.0
 */

/* ============================================ */
/*          BANNER OVERLAY                      */
/* ============================================ */

.cookie-consent-banner {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    padding: 1em;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.cookie-consent-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================ */
/*          BANNER CONTAINER                    */
/* ============================================ */

.cookie-consent-container {
    max-width: 50em;
    margin: 0 auto;
    padding: 1.5em;
    background: rgba(20, 20, 20, 0.92) !important;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/*          HEADER                              */
/* ============================================ */

.cookie-consent-header {
    margin-bottom: 1em;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
}

/* ============================================ */
/*          BODY                                */
/* ============================================ */

.cookie-consent-body {
    margin-bottom: 1.25em;
}

.cookie-consent-description {
    margin: 0 0 1em 0;
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--text-secondary, rgba(255, 255, 255, 0.75));
}

/* ============================================ */
/*          OPTIONS                             */
/* ============================================ */

.cookie-consent-options {
    margin: 1em 0;
    padding: 1em;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
}

.cookie-option {
    padding: 0.75em 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.cookie-option:first-child {
    padding-top: 0;
}

.cookie-option-header {
    display: flex;
    align-items: center;
}

.cookie-option-label {
    display: flex;
    align-items: center;
    gap: 0.75em;
    cursor: pointer;
    flex: 1;
}

.cookie-option-label input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: #ff6600;
    cursor: pointer;
}

.cookie-option-label input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-option-title {
    font-weight: 500;
    color: var(--text-primary, rgba(255, 255, 255, 0.95));
}

.cookie-option-required {
    font-size: 0.75em;
    padding: 0.2em 0.5em;
    background: #ff6600;
    color: var(--text-primary);
    border-radius: 4px;
    margin-left: auto;
}

.cookie-option-desc {
    margin: 0.5em 0 0 2em;
    font-size: 0.85em;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.55));
    line-height: 1.4;
}

/* ============================================ */
/*          LINKS                               */
/* ============================================ */

.cookie-consent-links {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.cookie-consent-links a {
    color: #ff6600;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.cookie-consent-links a:hover {
    color: #ff8533;
    text-decoration: underline;
}

.cookie-consent-links .separator {
    color: var(--text-quaternary, rgba(255, 255, 255, 0.35));
    font-size: 0.8em;
}

/* ============================================ */
/*          ACTIONS                             */
/* ============================================ */

.cookie-consent-actions {
    display: flex;
    gap: 0.75em;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cookie-actions-customize {
    justify-content: center;
}

/* ============================================ */
/*          BUTTONS                             */
/* ============================================ */

.cookie-btn {
    padding: 0.65em 1.25em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #ff6600 0%, #ff8533 100%);
    border-color: #ff6600;
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, #ff7722 0%, #ff9955 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.5);
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

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

.cookie-btn-outline {
    background: transparent;
    color: var(--text-primary);
}

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

/* ============================================ */
/*          RESPONSIVE                          */
/* ============================================ */

@media (max-width: 40em) {
    .cookie-consent-banner {
        padding: 0.5em;
    }

    .cookie-consent-container {
        padding: 1.25em;
        border-radius: var(--radius-md, 16px);
    }

    .cookie-consent-header h3 {
        font-size: 1.1em;
    }

    .cookie-consent-description {
        font-size: 0.9em;
    }

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

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

    .cookie-option-desc {
        margin-left: 0;
        margin-top: 0.5em;
    }
}

/* ============================================ */
/*          LIGHT THEME ADJUSTMENTS             */
/* ============================================ */

[data-theme="light"] .cookie-consent-container {
    background: rgba(40, 40, 40, 0.95) !important;
}

[data-theme="light"] .cookie-consent-header h3,
[data-theme="light"] .cookie-option-title {
    color: var(--text-primary);
}

[data-theme="light"] .cookie-consent-description,
[data-theme="light"] .cookie-option-desc {
    color: var(--text-secondary);
}

/* ============================================ */
/*          ANIMATIONS                          */
/* ============================================ */

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

.cookie-consent-banner.visible {
    animation: slideUp 0.3s ease forwards;
}

/* ============================================ */
/*          PRINT - HIDE BANNER                 */
/* ============================================ */

@media print {
    .cookie-consent-banner {
        display: none !important;
    }
}
