/* Legal Modals Styles */
.legal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    backdrop-filter: blur(5px);
}

.legal-modal-overlay.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s 0s, opacity 0.3s ease;
}

.legal-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    max-width: 90%;
    height: 80vh;
    background: transparent;
    border: 4px solid rgb(55, 93, 88);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    transition: visibility 0s 0.3s, opacity 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    display: none !important;
    transform: translate(-50%, -50%) scale(1);
    flex-direction: column;
    overflow: hidden;
}

.legal-wrapper.active-popup {
    display: flex !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.legal-form-box {
    padding: 40px;
    position: relative;
    background: white;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.legal-wrapper .legal-icon-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    font-size: 2em;
    color: rgb(55, 93, 88);
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    z-index: 10;
}

.legal-form-box h2 {
    font-size: 2em;
    color: rgb(55, 93, 88);
    text-align: center;
    margin-bottom: 30px;
}

.legal-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
    margin-right: -5px;
}

.legal-content h3 {
    font-size: 1.2em;
    color: rgb(55, 93, 88);
    margin: 20px 0 10px 0;
}

.legal-content p {
    font-size: 0.95em;
    color: #162938;
    line-height: 1.6;
    margin-bottom: 15px;
}

.legal-content ul {
    margin: 10px 0 20px 30px;
}

.legal-content li {
    font-size: 0.95em;
    color: #162938;
    line-height: 1.6;
    margin-bottom: 8px;
}

.legal-content a {
    color: rgb(55, 93, 88);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-updated {
    font-size: 0.8em;
    color: #162938;
    opacity: 0.6;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid rgba(55, 93, 88, 0.2);
    text-align: center;
}

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

.legal-content::-webkit-scrollbar-track {
    background: rgba(55, 93, 88, 0.1);
    border-radius: 10px;
}

.legal-content::-webkit-scrollbar-thumb {
    background: rgb(55, 93, 88);
    border-radius: 10px;
}