/**
 * Cookie Consent Styles
 * Apple-inspired glassmorphism design
 */

/* ========================================
   COOKIE BANNER
   ======================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 0 16px 16px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
    pointer-events: none;
}

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

.cookie-banner-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.12),
                0 -2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FFD93D 0%, #FF9F43 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-banner-icon svg {
    width: 28px;
    height: 28px;
    color: #1C1C1E;
}

.cookie-banner-text {
    flex: 1;
    min-width: 200px;
}

.cookie-banner-title {
    font-size: 17px;
    font-weight: 600;
    color: #1C1C1E;
    margin: 0 0 4px 0;
}

.cookie-banner-description {
    font-size: 14px;
    color: #6E6E73;
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.cookie-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #0071E3 0%, #007AFF 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.4);
}

.cookie-btn-accept:active {
    transform: translateY(0);
}

.cookie-btn-reject {
    background: rgba(142, 142, 147, 0.12);
    color: #1C1C1E;
}

.cookie-btn-reject:hover {
    background: rgba(142, 142, 147, 0.2);
}

.cookie-link {
    font-size: 14px;
    color: #0071E3;
    text-decoration: none;
    padding: 8px;
    transition: opacity 0.2s ease;
}

.cookie-link:hover {
    opacity: 0.7;
}

/* ========================================
   FOOTER COOKIE SETTINGS LINK
   ======================================== */

.cookie-footer-link {
    padding: 8px 0;
}

.cookie-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    color: #6E6E73;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-settings-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1C1C1E;
}

.cookie-emoji {
    font-size: 14px;
}

/* ========================================
   COOKIE SETTINGS MODAL
   ======================================== */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.cookie-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal.visible .cookie-modal-content {
    transform: scale(1) translateY(0);
}

.cookie-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.cookie-modal-close svg {
    width: 18px;
    height: 18px;
    color: #6E6E73;
}

.cookie-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1C1C1E;
    margin: 0 0 8px 0;
}

.cookie-modal-status {
    font-size: 14px;
    color: #6E6E73;
    margin: 0 0 24px 0;
}

.cookie-modal-status strong {
    color: #0071E3;
}

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

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    gap: 12px;
}

.cookie-option-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1C1C1E;
    margin: 0 0 4px 0;
}

.cookie-option-info p {
    font-size: 13px;
    color: #6E6E73;
    margin: 0;
    line-height: 1.4;
}

.cookie-option-badge {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-option-badge.always {
    background: rgba(0, 113, 227, 0.1);
    color: #0071E3;
}

.cookie-option-badge.active {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.cookie-option-badge.inactive {
    background: rgba(142, 142, 147, 0.15);
    color: #8E8E93;
}

.cookie-modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.cookie-modal-actions .cookie-btn {
    flex: 1;
}

.cookie-modal-link {
    display: block;
    text-align: center;
    font-size: 14px;
    color: #0071E3;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.cookie-modal-link:hover {
    opacity: 0.7;
}

/* ========================================
   DARK THEME
   ======================================== */

:root[data-theme="dark"] .cookie-banner-content {
    background: rgba(44, 44, 46, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .cookie-banner-title {
    color: #FFFFFF;
}

:root[data-theme="dark"] .cookie-banner-description {
    color: #AEAEB2;
}

:root[data-theme="dark"] .cookie-btn-reject {
    background: rgba(142, 142, 147, 0.2);
    color: #FFFFFF;
}

:root[data-theme="dark"] .cookie-btn-reject:hover {
    background: rgba(142, 142, 147, 0.3);
}

:root[data-theme="dark"] .cookie-settings-btn {
    color: #AEAEB2;
    border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .cookie-settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

:root[data-theme="dark"] .cookie-modal-content {
    background: #2C2C2E;
}

:root[data-theme="dark"] .cookie-modal-title {
    color: #FFFFFF;
}

:root[data-theme="dark"] .cookie-modal-status {
    color: #AEAEB2;
}

:root[data-theme="dark"] .cookie-modal-close {
    background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

:root[data-theme="dark"] .cookie-modal-close svg {
    color: #AEAEB2;
}

:root[data-theme="dark"] .cookie-option {
    background: rgba(255, 255, 255, 0.05);
}

:root[data-theme="dark"] .cookie-option-info h4 {
    color: #FFFFFF;
}

:root[data-theme="dark"] .cookie-option-info p {
    color: #AEAEB2;
}

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

@media (max-width: 640px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }

    .cookie-banner-icon {
        margin: 0 auto;
    }

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

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal-content {
        padding: 24px;
    }

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

    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .cookie-option-badge {
        align-self: flex-start;
        margin-top: 8px;
    }
}
