/* Cookie Consent Banner - Glassmorphism Design */
/* Apple-inspired liquid glass aesthetic with smooth animations */

.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    max-width: 560px;
    width: calc(100% - 40px);
    z-index: 99999;
    
    /* Enhanced Glassmorphism effect - Crystal clear glass */
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(40px) saturate(220%) brightness(1.1);
    -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(1.1);
    
    /* Borders and depth - Enhanced glass appearance */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 1),
        inset 0 -1px 1px rgba(255, 255, 255, 0.4);
    
    /* Padding and layout */
    padding: 24px 28px;
    
    /* Smooth transitions */
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    opacity: 0;
    pointer-events: none;
    
    /* Prevent text selection on rapid clicks */
    user-select: none;
    -webkit-user-select: none;
}

/* Dark mode variant for better contrast on dark backgrounds */
@media (prefers-color-scheme: dark) {
    .cookie-consent {
        background: rgba(30, 30, 30, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(40px) saturate(220%) brightness(0.9);
        -webkit-backdrop-filter: blur(40px) saturate(220%) brightness(0.9);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.6),
            0 2px 8px rgba(0, 0, 0, 0.4),
            inset 0 1px 1px rgba(255, 255, 255, 0.2),
            inset 0 -1px 1px rgba(255, 255, 255, 0.08);
    }
}

/* Active state - banner visible */
.cookie-consent.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Hover effect - subtle lift with enhanced glass glow */
.cookie-consent:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.14),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 1),
        inset 0 -1px 1px rgba(255, 255, 255, 0.4);
}

@media (prefers-color-scheme: dark) {
    .cookie-consent:hover {
        box-shadow: 
            0 12px 40px rgba(0, 0, 0, 0.6),
            0 4px 12px rgba(0, 0, 0, 0.4),
            inset 0 1px 1px rgba(255, 255, 255, 0.2),
            inset 0 -1px 1px rgba(255, 255, 255, 0.08);
    }
}

/* Content wrapper */
.cookie-consent__content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Text styling - Enhanced for readability on clear glass */
.cookie-consent__text {
    flex: 1;
    min-width: 240px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1d1d1f;
    margin: 0;
    letter-spacing: -0.01em;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
    .cookie-consent__text {
        color: #f5f5f7;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }
}

/* Button styling - Matching website gold style */
.cookie-consent__button {
    /* Layout */
    padding: 10px 24px;
    min-width: 120px;
    
    /* Typography */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.025em;
    color: #ffffff;
    text-align: center;
    
    /* Visual design - Gold gradient matching website */
    background: linear-gradient(135deg, #C19248 0%, #A67C3D 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 
        0 2px 8px rgba(193, 146, 72, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Interaction */
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    
    /* Smooth transitions */
    transition: 
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Prevent text selection */
    user-select: none;
    -webkit-user-select: none;
}

/* Button hover state */
.cookie-consent__button:hover {
    background: linear-gradient(135deg, #A67C3D 0%, #8B6230 100%);
    box-shadow: 
        0 4px 12px rgba(193, 146, 72, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Button active/pressed state */
.cookie-consent__button:active {
    background: linear-gradient(135deg, #8B6230 0%, #72511F 100%);
    box-shadow: 
        0 1px 4px rgba(193, 146, 72, 0.25),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Button focus state for accessibility */
.cookie-consent__button:focus-visible {
    outline: 3px solid rgba(193, 146, 72, 0.5);
    outline-offset: 2px;
}

/* Exit animation */
.cookie-consent.hiding {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.55, 0, 0.55, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 1, 1);
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
    .cookie-consent {
        bottom: 16px;
        width: calc(100% - 32px);
        padding: 20px 24px;
        border-radius: 16px;
    }
    
    .cookie-consent__content {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .cookie-consent__text {
        font-size: 14px;
        text-align: center;
        min-width: unset;
    }
    
    .cookie-consent__button {
        width: 100%;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-consent.active,
    .cookie-consent.hiding,
    .cookie-consent__button {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
    }
    
    .cookie-consent__button:hover {
        transform: none;
    }
}

/* Subtle entrance animation for text */
.cookie-consent.active .cookie-consent__text {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.cookie-consent.active .cookie-consent__button {
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent.active .cookie-consent__text,
    .cookie-consent.active .cookie-consent__button {
        animation: none;
    }
}
