/**
 * Cookie Banner Styles - Elegant & Minimal Design
 * White, clean, and non-intrusive
 * Designed to delight users
 */

/* Cookie Banner Container */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    width: calc(100% - 48px);
    max-width: 520px;
}

@media (min-width: 768px) {
    .cookie-banner {
        bottom: 32px;
        width: calc(100% - 64px);
        max-width: 100%;
    }
}

.cookie-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: all;
}

/* Remove overlay - no intrusive dark background */
.cookie-banner-overlay {
    display: none;
}

/* Main Banner Content */
.cookie-banner-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 
                0 2px 10px rgba(0, 0, 0, 0.04),
                0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 24px;
    backdrop-filter: blur(20px);
    overflow: hidden;
    box-sizing: border-box;
}

/* Subtle gradient accent */
.cookie-banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066FF 0%, #00D4FF 50%, #00D4FF 100%);
    border-radius: 20px 20px 0 0;
    opacity: 0.8;
}

/* Header - Simplified */
.cookie-banner-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-banner-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0A0E27;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

/* Add cookie emoji for friendliness */
.cookie-banner-header h3::before {
    content: '🍪';
    font-size: 20px;
    flex-shrink: 0;
}

/* Hide close button - less intimidating */
.cookie-banner-close {
    display: none;
}

/* Body - Cleaner */
.cookie-banner-body {
    margin-bottom: 16px;
}

.cookie-banner-body p {
    color: #6B7394;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* Simplified cookie options - hide by default */
.cookie-categories {
    display: none; /* Hidden for simplicity */
}

/* Show a simple preference toggle */
.cookie-simple-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #F8F9FA;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    border: 1px solid #E9ECEF;
    box-sizing: border-box;
}

.cookie-simple-toggle-text {
    font-size: 12px;
    color: #6B7394;
    flex: 1 1 auto;
}

.cookie-simple-toggle-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #0A0E27;
    font-weight: 500;
    flex-shrink: 0;
}

/* Mini toggle switch */
.mini-toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: #CED4DA;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.mini-toggle.active {
    background: #22C55E;
}

.mini-toggle::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mini-toggle.active::after {
    transform: translateX(16px);
}

/* Footer - Streamlined */
.cookie-banner-footer {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin-top: 16px;
}

/* Buttons - More appealing */
.cookie-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
    font-family: inherit;
}

/* Primary button - Irresistible */
.cookie-btn-primary {
    background: #0066FF;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 102, 255, 0.25);
    flex: 1 1 auto;
    min-width: 100px;
}

.cookie-btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cookie-btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35);
}

/* Secondary button - Subtle */
.cookie-btn-secondary {
    background: transparent;
    color: #6B7394;
    font-size: 12px;
    padding: 10px 16px;
    flex: 0 0 auto;
    min-width: 120px;
}

.cookie-btn-secondary:hover {
    color: #0A0E27;
    background: #F8F9FA;
}

/* Details link - Minimal */
.cookie-link {
    display: none; /* Hide for cleaner look */
}

/* Rewrite the HTML structure via JS */
.cookie-banner-body {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.cookie-banner-footer {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile optimized */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 16px;
        width: calc(100% - 32px);
        max-width: 100%;
    }
    
    .cookie-banner-content {
        padding: 20px;
        border-radius: 16px;
    }
    
    .cookie-banner-header h3 {
        font-size: 15px;
    }
    
    .cookie-banner-body p {
        font-size: 12px;
    }
    
    .cookie-banner-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        flex: 1 1 100%;
    }
    
    .cookie-btn-secondary {
        order: 2;
    }
}

/* Entrance animation */
@keyframes cookieBounce {
    0% {
        transform: translateX(-50%) translateY(20px) scale(0.9);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) translateY(-5px) scale(1.02);
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
    }
}

.cookie-banner.show {
    animation: cookieBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Success state after acceptance */
.cookie-banner-success {
    text-align: center;
    padding: 24px;
}

.cookie-banner-success h4 {
    color: #22C55E;
    font-size: 16px;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cookie-banner-success h4::before {
    content: '✓';
    width: 24px;
    height: 24px;
    background: #22C55E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.cookie-banner-success p {
    color: #6B7394;
    font-size: 13px;
    margin: 0;
}

/* Remove dark mode - keep it light and friendly */
@media (prefers-color-scheme: dark) {
    .cookie-banner-content {
        background: rgba(255, 255, 255, 0.98);
    }
}

/* Trust indicators */
.cookie-trust {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E9ECEF;
    font-size: 11px;
    color: #8B92A9;
    flex-wrap: wrap;
}

.cookie-trust-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cookie-trust-item svg {
    width: 14px;
    height: 14px;
    color: #22C55E;
    flex-shrink: 0;
}

/* Ensure all text stays within bounds */
* {
    box-sizing: border-box;
}

.cookie-banner-content * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}