/**
 * GDPR Consent Management Styles
 * Responsive design for cookie consent banner and settings modal
 */

/* Consent Banner Styles */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    z-index: 10000;
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    border-top: 3px solid #667eea;
}

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

.consent-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.consent-text p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}

.consent-detail {
    font-size: 0.8rem !important;
    opacity: 0.7 !important;
}

.consent-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.consent-btn {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.consent-primary {
    background: #667eea;
    color: white;
}

.consent-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.consent-secondary {
    background: #6c757d;
    color: white;
}

.consent-secondary:hover {
    background: #5a626a;
    transform: translateY(-1px);
}

.consent-tertiary {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.consent-tertiary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.consent-links {
    grid-column: 1 / -1;
    margin-top: 1rem;
    text-align: center;
}

.consent-links a {
    color: #667eea;
    text-decoration: underline;
    font-size: 0.8rem;
}

.consent-links a:hover {
    color: #5a6fd8;
}

/* Settings Modal Styles */
.consent-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: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.consent-settings-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.consent-settings-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
    background: #f8f9fa;
}

.consent-settings-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
    flex: 1;
}

.consent-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0.5rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.consent-close:hover {
    background: #e9ecef;
    color: #333;
}

.consent-settings-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.consent-settings-body > p {
    margin: 0 0 1.5rem 0;
    color: #555;
    line-height: 1.6;
}

.consent-category {
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.consent-category-header {
    padding: 1rem;
    background: #f8f9fa;
}

.consent-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
}

.consent-toggle input[type="checkbox"] {
    display: none;
}

.consent-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

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

.consent-toggle input:checked + .consent-slider {
    background: #667eea;
}

.consent-toggle input:checked + .consent-slider:before {
    transform: translateX(26px);
}

.consent-toggle input:disabled + .consent-slider {
    background: #28a745;
    cursor: not-allowed;
}

.consent-toggle input:disabled + .consent-slider:before {
    transform: translateX(26px);
}

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

.consent-category-info h4 {
    margin: 0 0 0.3rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.consent-category-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.consent-settings-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Toast Notification */
.consent-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10002;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
}

.consent-toast-show {
    transform: translateX(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .consent-banner {
        padding: 1rem 0.5rem;
    }
    
    .consent-banner-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .consent-text h3 {
        font-size: 1.1rem;
    }
    
    .consent-text p {
        font-size: 0.85rem;
    }
    
    .consent-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .consent-btn {
        width: 100%;
        padding: 0.8rem;
    }
    
    .consent-settings-content {
        margin: 1rem;
        max-height: 85vh;
    }
    
    .consent-settings-header {
        padding: 1rem;
    }
    
    .consent-settings-header h2 {
        font-size: 1.2rem;
    }
    
    .consent-settings-body {
        padding: 1rem;
    }
    
    .consent-settings-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .consent-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .consent-banner {
        padding: 0.75rem 0.5rem;
    }
    
    .consent-text h3 {
        font-size: 1rem;
    }
    
    .consent-text p {
        font-size: 0.8rem;
    }
    
    .consent-btn {
        font-size: 0.85rem;
        padding: 0.7rem;
    }
    
    .consent-category-header {
        padding: 0.75rem;
    }
    
    .consent-toggle {
        gap: 0.75rem;
    }
    
    .consent-category-info h4 {
        font-size: 0.9rem;
    }
    
    .consent-category-info p {
        font-size: 0.8rem;
    }
}

/* Accessibility Improvements */
.consent-btn:focus,
.consent-close:focus,
.consent-toggle:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.consent-toggle input:focus + .consent-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .consent-banner {
        background: black;
        border-top: 3px solid white;
    }
    
    .consent-primary {
        background: #0000ff;
    }
    
    .consent-secondary {
        background: #333;
        border: 1px solid white;
    }
    
    .consent-tertiary {
        border: 2px solid white;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .consent-banner,
    .consent-settings-modal,
    .consent-settings-content,
    .consent-toast {
        animation: none;
    }
    
    .consent-btn,
    .consent-slider,
    .consent-slider:before {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .consent-banner,
    .consent-settings-modal,
    .consent-toast {
        display: none !important;
    }
}