/* Legal Components CSS */

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    backdrop-filter: blur(40px) saturate(150%);
    padding: 1.5rem;
    z-index: 1000;
    box-shadow: 
        0 -8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner:not(.hidden) {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-actions .btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    backdrop-filter: blur(20px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-actions .btn-primary {
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border-color: rgba(59, 130, 246, 0.6);
}

.cookie-actions .btn-primary:hover {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cookie-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.cookie-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.cookie-actions .btn-text {
    background: none;
    color: rgba(59, 130, 246, 0.9);
    text-decoration: underline;
    padding: 0.5rem;
    border: none;
}

.cookie-actions .btn-text:hover {
    color: rgba(59, 130, 246, 1);
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* Cookie Settings Modal */
.cookie-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.cookie-category p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-category small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Cookie Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

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

input:disabled + .slider {
    background-color: #666;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Legal Footer */
.legal-footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    backdrop-filter: blur(8px) saturate(10%);
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(40px) saturate(150%);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        backdrop-filter: blur(40px) saturate(150%);
    }
}

/* Legal Modal */
.legal-modal {
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(60px) saturate(150%);
    position: sticky;
    top: 0;
    z-index: 1;
}

.modal-header h2 {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.modal-close:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-body {
    line-height: 1.6;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 2rem 2rem;
}

.modal-body h3 {
    margin: 2rem 0 1rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-body p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-body ul {
    margin-bottom: 1rem;
    padding-left: 0;
    text-align: center;
    list-style: none;
}

.modal-body li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-body li:before {
    content: "• ";
    color: rgba(59, 130, 246, 0.8);
    font-weight: bold;
}

.modal-body strong {
    color: rgba(255, 255, 255, 0.95);
}

.modal-body a {
    color: rgba(59, 130, 246, 0.9);
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modal-body a:hover {
    text-decoration: underline;
    color: rgba(59, 130, 246, 1);
}

/* Cookie Settings Modal */
.cookie-modal {
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.cookie-modal .modal-body {
    text-align: center;
}

.cookie-category {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px) saturate(120%);
    text-align: center;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category h3 {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-category p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-category small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-category small a {
    color: rgba(59, 130, 246, 0.8);
}

.cookie-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-modal-actions .btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cookie-modal-actions .btn-primary {
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border-color: rgba(59, 130, 246, 0.6);
}

.cookie-modal-actions .btn-primary:hover {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cookie-modal-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.cookie-modal-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Cookie Toggle Switch - Liquid Glass Style */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background: rgba(255, 255, 255, 0.9);
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
}

input:checked + .slider {
    background: rgba(59, 130, 246, 0.8);
    border-color: rgba(59, 130, 246, 0.6);
}

input:checked + .slider:before {
    transform: translateX(26px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

input:disabled + .slider {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .legal-modal {
        max-width: none;
        width: 100%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .modal-body {
        padding: 1rem 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .modal-overlay {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(25px) saturate(180%);
    }
    
    .modal-content {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(50px) saturate(150%);
    }
    
    .modal-header {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(40px) saturate(120%);
    }
    
    .cookie-category {
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(40px) saturate(120%);
    }
    
    .cookie-banner {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(50px) saturate(150%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .legal-modal {
        max-width: none;
        width: 100%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .modal-body {
        padding: 1rem 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .modal-overlay {
        background: rgba(0, 0, 0, 0.4);
    }
    
    .modal-content {
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }
    
    .legal-modal {
        max-width: none;
        width: 100%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 1.5rem 1rem 1rem;
    }
    
    .modal-body {
        padding: 1rem 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .legal-modal {
        margin: 1rem;
        max-width: none;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        transition: none;
    }
    
    .slider {
        transition: none;
    }
    
    .slider:before {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cookie-banner {
        border-top: 2px solid var(--text-primary);
    }
    
    .cookie-category {
        border: 2px solid var(--text-primary);
    }
    
    .slider {
        border: 1px solid var(--text-primary);
    }
}