/* Legal Popups - Impressum, Datenschutz, AGB, Nutzungsbedingungen */

.legal-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.legal-popup-overlay.active {
    opacity: 1;
}

.legal-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legal-popup.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.legal-popup-header {
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff54a493 ,#ffc0e0);
}

.legal-popup-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.legal-popup-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 30, 30, 0.2);
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.legal-popup-close:hover {
    background: rgba(255, 86, 86, 0.76);
    transform: rotate(90deg);
}

.legal-popup-content {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.8;
}

.legal-popup-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2d2d2d;
    margin: 25px 0 15px 0;
}

.legal-popup-content h3:first-child {
    margin-top: 0;
}

.legal-popup-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin: 20px 0 10px 0;
}

.legal-popup-content p {
    font-size: 15px;
    color: #666;
    margin: 10px 0;
}

.legal-popup-content ul {
    margin: 10px 0;
    padding-left: 25px;
}

.legal-popup-content li {
    font-size: 15px;
    color: #666;
    margin: 8px 0;
}

.legal-popup-content strong {
    color: #2d2d2d;
    font-weight: 600;
}

.legal-popup-content a {
    color: #ff54a4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-popup-content a:hover {
    color: #ff8e1d;
    text-decoration: underline;
}

/* Dark Mode */
[data-theme="dark"] .legal-popup {
    background: #1e1e1e;
}

[data-theme="dark"] .legal-popup-header {
    border-bottom-color: #333;
}

[data-theme="dark"] .legal-popup-content h3 {
    color: #ffffff;
}

[data-theme="dark"] .legal-popup-content h4 {
    color: #cccccc;
}

[data-theme="dark"] .legal-popup-content p,
[data-theme="dark"] .legal-popup-content li {
    color: #aaaaaa;
}

[data-theme="dark"] .legal-popup-content strong {
    color: #ffffff;
}

/* Scrollbar Styling */
.legal-popup-content::-webkit-scrollbar {
    width: 8px;
}

.legal-popup-content::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.legal-popup-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffc0e0, #ff54a4);
    border-radius: 4px;
}

.legal-popup-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ffb0d5, #ff31c5);
}

[data-theme="dark"] .legal-popup-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

/* Mobile */
@media (max-width: 768px) {
    .legal-popup {
        width: 95%;
        max-height: 90vh;
    }
    
    .legal-popup-header {
        padding: 20px;
    }
    
    .legal-popup-header h2 {
        font-size: 20px;
    }
    
    .legal-popup-close {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .legal-popup-content {
        padding: 20px;
    }
    
    .legal-popup-content h3 {
        font-size: 18px;
    }
    
    .legal-popup-content h4 {
        font-size: 15px;
    }
    
    .legal-popup-content p,
    .legal-popup-content li {
        font-size: 14px;
    }
}
