/* ===========================
   GDPR CONSENT BANNER CSS
   =========================== 
   
   Beautiful consent banner matching the LeadBase design system.
   Uses glass morphism effects and the same color palette.
*/

/* Import design variables to match existing system */
:root {
    /* Colors from existing system */
    --primary: #5fc73e;
    --primary-dark: #4ab02f;
    --accent: #e87c20;
    --accent-dark: #d96a0a;
    --primary-gradient: linear-gradient(135deg, #5fc73e 0%, #4ab02f 100%);
    
    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 60px rgba(0, 0, 0, 0.2);
    
    /* Text colors */
    --text-primary: #464646;
    --text-secondary: #6b7280;
    --text-light: #64748b;
    
    /* Dashboard colors */
    --dashboard-bg: #f8fafc;
    --dashboard-white: #ffffff;
    --dashboard-border: #e2e8f0;
    --dashboard-text: #334155;
    --dashboard-text-light: #64748b;
    --dashboard-hover: #f1f5f9;
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

/* ===========================
   CONSENT BANNER OVERLAY
   =========================== */

.consent-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

/* ===========================
   CONSENT BANNER CONTAINER
   =========================== */

.consent-banner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(100px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.consent-banner-overlay.show .consent-banner {
    transform: translateY(0);
}

/* Subtle gradient overlay for extra depth */
.consent-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.02) 100%);
    border-radius: 20px;
    pointer-events: none;
    z-index: 1;
}

/* ===========================
   BANNER CONTENT
   =========================== */

.consent-banner-content {
    position: relative;
    z-index: 2;
}

.consent-banner-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.consent-banner-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(95, 199, 62, 0.3);
    flex-shrink: 0;
}

.consent-banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.consent-banner-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.consent-banner-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.consent-banner-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.consent-banner-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===========================
   CONSENT OPTIONS
   =========================== */

.consent-options {
    margin-bottom: 1.5rem;
}

.consent-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
}

.consent-option:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.12);
}

.consent-option-info {
    flex: 1;
}

.consent-option-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.consent-option-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0;
}

/* ===========================
   CUSTOM TOGGLE SWITCH
   =========================== */

.consent-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 1rem;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 28px;
    transition: var(--transition-fast);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.consent-toggle:not(.disabled):hover .consent-toggle-slider {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.2);
}

.consent-toggle:not(.disabled):hover input:checked + .consent-toggle-slider {
    box-shadow: 0 0 0 3px rgba(95, 199, 62, 0.3);
}

.consent-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.consent-toggle input:checked + .consent-toggle-slider {
    background: var(--primary-gradient);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(95, 199, 62, 0.2);
}

.consent-toggle input:checked + .consent-toggle-slider:before {
    transform: translateX(22px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.consent-toggle.disabled .consent-toggle-slider {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ===========================
   ACTION BUTTONS
   =========================== */

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

.consent-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 120px;
}

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

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

.consent-btn span {
    position: relative;
    z-index: 1;
}

/* Decline button */
.consent-btn-decline {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.consent-btn-decline:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Customize button */
.consent-btn-customize {
    background: rgba(232, 124, 32, 0.15);
    color: var(--accent-dark);
    border: 1px solid rgba(232, 124, 32, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.consent-btn-customize:hover {
    background: rgba(232, 124, 32, 0.25);
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 124, 32, 0.2);
}

/* Accept button */
.consent-btn-accept {
    background: var(--primary-gradient);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 4px 15px rgba(95, 199, 62, 0.3);
}

.consent-btn-accept:hover {
    background: linear-gradient(135deg, #4ab02f 0%, #3a8a25 100%);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 199, 62, 0.4);
}

.consent-btn-accept:active {
    transform: translateY(-1px);
}

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

@media (max-width: 768px) {
    .consent-banner-overlay {
        padding: 1rem;
        align-items: flex-end;
    }
    
    .consent-banner {
        padding: 1.5rem;
        border-radius: 16px;
        max-width: none;
    }
    
    .consent-banner-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .consent-banner-title {
        font-size: 1.25rem;
    }
    
    .consent-banner-text {
        font-size: 0.9rem;
    }
    
    .consent-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .consent-toggle {
        align-self: flex-end;
        margin-left: 0;
    }
    
    .consent-banner-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .consent-btn {
        width: 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .consent-banner {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .consent-banner-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .consent-banner-title {
        font-size: 1.125rem;
    }
    
    .consent-option {
        padding: 0.75rem;
    }
    
    .consent-option-title {
        font-size: 0.9rem;
    }
    
    .consent-option-description {
        font-size: 0.8rem;
    }
    
    .consent-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===========================
   ANIMATION ENHANCEMENTS
   =========================== */

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

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(95, 199, 62, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(95, 199, 62, 0.5);
    }
}

.consent-banner-icon {
    animation: pulseGlow 3s ease-in-out infinite;
}

/* ===========================
   ACCESSIBILITY
   =========================== */

.consent-banner:focus-within {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.consent-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.consent-toggle input:focus + .consent-toggle-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .consent-banner {
        background: rgba(255, 255, 255, 1);
        border: 2px solid var(--text-primary);
    }
    
    .consent-option {
        background: rgba(255, 255, 255, 1);
        border: 2px solid var(--text-secondary);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .consent-banner-overlay,
    .consent-banner,
    .consent-btn,
    .consent-toggle-slider,
    .consent-toggle-slider:before {
        transition: none;
    }
    
    .consent-banner-icon {
        animation: none;
    }
}
