/* ============================================
   COOKIE CONSENT BANNER - GDPR/CCPA Compliant
   Modern, Professional Design
   ============================================ */

/* CSS Variables with fallbacks for pages that don't have modern-design.css */
.cookie-consent-banner,
.cookie-settings-modal {
    --primary-teal: #27afa5;
    --secondary-bright-teal: #2aebce;
    --primary-dark-blue: #1e3a5f;
    --primary-red: #c41d15;
    --text-dark: #333333;
    --gray-light: #f5f5f5;
    --gray-medium: #888888;
    --radius-lg: 16px;
    --font-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--primary-teal);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-bright-teal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    animation: cookiePulse 2s ease-in-out infinite;
}

@keyframes cookiePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-dark-blue);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-text p {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.cookie-text a {
    color: var(--primary-teal);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-text a:hover {
    color: var(--primary-red);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-bright-teal));
    color: white;
    box-shadow: 0 4px 15px rgba(39, 175, 165, 0.3);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 175, 165, 0.5);
}

.cookie-btn-deny {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--gray-medium);
}

.cookie-btn-deny:hover {
    background: var(--gray-light);
    border-color: var(--text-dark);
}

.cookie-btn-settings {
    background: var(--primary-dark-blue);
    color: white;
}

.cookie-btn-settings:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-dialog {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(50px);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.show .cookie-settings-dialog {
    transform: translateY(0);
}

.cookie-settings-header {
    padding: 2rem;
    border-bottom: 2px solid var(--gray-light);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.cookie-settings-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-dark-blue);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.cookie-settings-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-light);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-settings-close:hover {
    background: var(--primary-red);
    color: white;
    transform: rotate(90deg);
}

.cookie-settings-body {
    padding: 2rem;
}

.cookie-category {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cookie-category-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary-dark-blue);
    text-transform: uppercase;
}

.cookie-category-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cookie-category-examples {
    background: var(--gray-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cookie-category-examples strong {
    color: var(--primary-dark-blue);
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 60px;
    height: 32px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-medium);
    transition: 0.3s;
    border-radius: 32px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, var(--primary-teal), var(--secondary-bright-teal));
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(28px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle-label {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.cookie-settings-footer {
    padding: 1.5rem 2rem;
    background: var(--gray-light);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem;
    }
    
    .cookie-icon {
        align-self: center;
    }
    
    .cookie-text {
        text-align: center;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-settings-dialog {
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-settings-header h2 {
        font-size: 1.5rem;
        padding-right: 2rem;
    }
    
    .cookie-settings-footer {
        flex-direction: column;
    }
    
    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }
}

/* Required Badge */
.cookie-required-badge {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}
