/* Cookie Consent Banner Styles */

.cookie-consent-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-width: 30vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-consent-banner.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie-consent-content {
    padding: 1rem;
}

.cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-consent-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.cookie-consent-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.cookie-consent-body {
    margin-bottom: 1rem;
}

.cookie-consent-body p {
    margin: 0 0 0.75rem 0;
    color: #555;
    line-height: 1.4;
    font-size: 0.85rem;
}

.cookie-consent-options {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

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

.cookie-option-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    flex: 1;
}

.cookie-option-label:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cookie-option-label input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    accent-color: #667eea;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
}

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

.cookie-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cookie-option-text strong {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.8rem;
}

.cookie-option-text small {
    color: #666;
    font-size: 0.7rem;
    line-height: 1.3;
}

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

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cookie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cookie-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.cookie-btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Body adjustment when banner is open */
body.cookie-banner-open {
    /* No body padding needed for corner positioning on desktop */
}

@media (max-width: 768px) {
    body.cookie-banner-open {
        padding-bottom: 200px; /* Adjust based on banner height on mobile */
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .cookie-consent-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }
    
    .cookie-consent-content {
        padding: 0.75rem;
    }
    
    .cookie-consent-header {
        margin-bottom: 0.5rem;
    }
    
    .cookie-consent-header h3 {
        font-size: 0.9rem;
    }
    
    .cookie-consent-body p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .cookie-consent-options {
        gap: 0.375rem;
        margin-bottom: 0.5rem;
    }
    
    .cookie-option-label {
        padding: 0.25rem;
        gap: 0.375rem;
    }
    
    .cookie-option-text strong {
        font-size: 0.75rem;
    }
    
    .cookie-option-text small {
        font-size: 0.65rem;
    }
    
    .cookie-consent-actions {
        gap: 0.375rem;
    }
    
    .cookie-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        border-radius: 12px 12px 0 0;
        transform: translateY(100%);
    }
    
    .cookie-consent-content {
        padding: 0.5rem;
    }
    
    .cookie-consent-header h3 {
        font-size: 0.85rem;
    }
    
    .cookie-consent-body p {
        font-size: 0.75rem;
    }
    
    .cookie-option-text strong {
        font-size: 0.7rem;
    }
    
    .cookie-option-text small {
        font-size: 0.6rem;
    }
    
    .cookie-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        min-width: 60px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: rgba(26, 26, 26, 0.95);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
    
    .cookie-consent-header h3 {
        color: #ffffff;
    }
    
    .cookie-consent-close {
        color: #ccc;
    }
    
    .cookie-consent-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .cookie-consent-body p {
        color: #ccc;
    }
    
    .cookie-option-label:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .cookie-option-text strong {
        color: #ffffff;
    }
    
    .cookie-option-text small {
        color: #aaa;
    }
    
    .cookie-btn-secondary {
        background: #333;
        color: #ccc;
        border-color: #555;
    }
    
    .cookie-btn-secondary:hover {
        background: #444;
        border-color: #666;
    }
}

/* Animation for banner appearance */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.cookie-consent-banner.show {
    animation: slideIn 0.3s ease-out;
}

@media (max-width: 768px) {
    .cookie-consent-banner.show {
        animation: slideUp 0.3s ease-out;
    }
}

/* Focus styles for accessibility */
.cookie-btn:focus,
.cookie-consent-close:focus,
.cookie-option-label:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 2px solid #000;
    }
    
    .cookie-btn-secondary {
        border: 2px solid #000;
    }
}
