/**
 * Cora Brand - Cookie Consent Styles
 * CCPA & CDPA Compliant Design
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #202549 0%, #2a3a6b 100%);
    color: white;
    padding: 0;
    z-index: 10000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #FFD700;
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.cookie-consent-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

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

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

.cookie-consent-body p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-consent-body a {
    color: #FFD700;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-consent-body a:hover {
    color: #f9dc00;
}

.cookie-consent-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.cookie-option input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.25rem;
    transform: scale(1.2);
}

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

.cookie-option-text {
    flex: 1;
}

.cookie-option-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: white;
}

.cookie-option-text small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.cookie-btn-primary {
    background: #FFD700;
    color: #202549;
}

.cookie-btn-primary:hover {
    background: #f9dc00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 220, 0, 0.3);
}

.cookie-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-consent-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.cookie-consent-footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}

.cookie-consent-footer a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 500;
}

.cookie-consent-footer a:hover {
    text-decoration: underline;
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.cookie-preferences-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cookie-preferences-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.cookie-preferences-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #202549;
}

.cookie-preferences-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.cookie-preferences-close:hover {
    background-color: #f8f9fa;
}

.cookie-preferences-body {
    padding: 2rem;
}

.cookie-preferences-body > p {
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #202549;
}

.cookie-category h4 {
    margin: 0 0 0.5rem 0;
    color: #202549;
    font-size: 1.1rem;
}

.cookie-category p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cookie-toggle input[type="checkbox"] {
    margin-right: 1rem;
    transform: scale(1.3);
}

.cookie-toggle-slider {
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    margin-right: 1rem;
    transition: background-color 0.3s ease;
}

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

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider {
    background: #FFD700;
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider::before {
    transform: translateX(26px);
}

.cookie-toggle-label {
    font-weight: 500;
    color: #202549;
}

.cookie-preferences-actions {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1.5rem;
    }
    
    .cookie-consent-header h3 {
        font-size: 1.25rem;
    }
    
    .cookie-consent-options {
        grid-template-columns: 1fr;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cookie-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .cookie-preferences-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .cookie-preferences-header,
    .cookie-preferences-body,
    .cookie-preferences-actions {
        padding: 1.5rem;
    }
    
    .cookie-preferences-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookie-consent-content {
        padding: 1rem;
    }
    
    .cookie-consent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-consent-close {
        align-self: flex-end;
    }
    
    .cookie-consent-options {
        gap: 0.75rem;
    }
    
    .cookie-option {
        padding: 0.75rem;
    }
}

/* Animation for banner appearance */
@keyframes slideUpFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-preferences-content {
        background: #1a1a1a;
        color: white;
    }
    
    .cookie-preferences-header {
        border-bottom-color: #333;
    }
    
    .cookie-preferences-header h3 {
        color: white;
    }
    
    .cookie-preferences-close {
        color: #ccc;
    }
    
    .cookie-preferences-close:hover {
        background-color: #333;
    }
    
    .cookie-category {
        background: #2a2a2a;
        border-left-color: var(--bright-yellow);
    }
    
    .cookie-category h4 {
        color: white;
    }
    
    .cookie-category p {
        color: #ccc;
    }
    
    .cookie-toggle-label {
        color: white;
    }
    
    .cookie-preferences-actions {
        border-top-color: #333;
    }
}

/* Accessibility improvements */
.cookie-consent-banner:focus-within {
    outline: 2px solid var(--bright-yellow);
    outline-offset: 2px;
}

.cookie-btn:focus {
    outline: 2px solid var(--bright-yellow);
    outline-offset: 2px;
}

.cookie-option:focus-within {
    outline: 2px solid var(--bright-yellow);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top-color: white;
    }
    
    .cookie-consent-header h3 {
        color: white;
    }
    
    .cookie-btn-primary {
        background: white;
        color: black;
    }
    
    .cookie-btn-secondary {
        border-color: white;
    }
}
