/**
 * FIN Cookie Consent Banner Styles
 * Minimal elegant design with backdrop overlay
 */

/* CSS Variables */
:root {
    --cookie-primary: #00BDA6;
    --cookie-secondary: #FF6D34;
    --cookie-bg: rgba(255, 255, 255, 0.98);
    --cookie-text: #1e293b;
    --cookie-text-muted: #64748b;
    --cookie-border: #e2e8f0;
    --cookie-radius: 20px;
}

/* Backdrop Overlay */
.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Main Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 99999;
    background: var(--cookie-bg);
    border-radius: var(--cookie-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

.cookie-consent-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cookie-consent-banner.hide {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
    pointer-events: none;
}

/* Banner Content */
.cookie-banner-content {
    padding: 24px;
}

/* Header */
.cookie-banner-header {
    text-align: center;
    margin-bottom: 20px;
}

.cookie-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--cookie-primary), var(--cookie-secondary));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(0, 189, 166, 0.3);
}

.cookie-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.cookie-banner-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cookie-text);
}

.cookie-banner-subtitle {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--cookie-text-muted);
}

/* Compact Toggle List */
.cookie-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.cookie-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 12px;
    transition: background 0.2s;
}

.cookie-toggle-row:hover {
    background: #f1f5f9;
}

.cookie-toggle-row.essential {
    background: linear-gradient(135deg, rgba(0, 189, 166, 0.08), rgba(0, 189, 166, 0.04));
}

.cookie-toggle-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-toggle-info i {
    width: 20px;
    color: var(--cookie-primary);
    font-size: 0.9rem;
}

.cookie-toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cookie-text);
}

.cookie-badge-required {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: var(--cookie-primary);
    color: white;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
}

/* Mini Toggle Switch */
.cookie-switch {
    position: relative;
    width: 40px;
    height: 22px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: all 0.2s;
}

.cookie-switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-switch input:checked + .cookie-switch-slider {
    background: var(--cookie-primary);
}

.cookie-switch input:checked + .cookie-switch-slider:before {
    transform: translateX(18px);
}

.cookie-switch input:disabled + .cookie-switch-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Action Buttons */
.cookie-banner-actions {
    display: flex;
    gap: 8px;
}

.cookie-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-secondary {
    background: #f1f5f9;
    color: var(--cookie-text);
}

.cookie-btn-secondary:hover {
    background: #e2e8f0;
}

.cookie-btn-tertiary {
    background: white;
    color: var(--cookie-primary);
    border: 2px solid var(--cookie-primary);
}

.cookie-btn-tertiary:hover {
    background: rgba(0, 189, 166, 0.05);
    transform: translateY(-1px);
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--cookie-primary), #00a693);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 189, 166, 0.3);
}

.cookie-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 189, 166, 0.4);
}

/* Mini Cookie Button (after consent) */
.cookie-reminder {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
    background: white;
    padding: 8px 14px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s;
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--cookie-text-muted);
    border: 1px solid var(--cookie-border);
}

[dir="rtl"] .cookie-reminder {
    left: auto;
    right: 20px;
}

.cookie-reminder:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    color: var(--cookie-primary);
}

.cookie-reminder.show {
    display: flex;
}

/* RTL Support */
[dir="rtl"] .cookie-consent-banner {
    direction: rtl;
}

[dir="rtl"] .cookie-badge-required {
    margin-left: 0;
    margin-right: 6px;
}

/* Mobile */
@media (max-width: 520px) {
    .cookie-consent-banner {
        bottom: 16px;
        width: calc(100% - 32px);
        max-width: none;
    }
    
    .cookie-banner-content {
        padding: 20px;
    }
    
    .cookie-icon {
        width: 48px;
        height: 48px;
    }
    
    .cookie-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 14px;
    }
}
