/* Legal Documents Modals */
:root {
    --swamp-green-dark: #2d3a15;
    --accent-frog: #7a9a4a;
    --text-light: #e8e5d8;
}

.legal-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.legal-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.legal-modal-content {
    position: relative;
    background: rgba(45, 58, 21, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 2px solid var(--accent-frog);
    padding: 2.5rem;
    max-width: 900px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.3s ease;
    margin: auto;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legal-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: var(--text-light);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10001;
    line-height: 1;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(122, 154, 74, 0.2);
}

.legal-modal-close:hover {
    color: var(--accent-frog);
    background: rgba(122, 154, 74, 0.4);
    transform: rotate(90deg);
}

.legal-modal-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(122, 154, 74, 0.3);
}

.legal-modal-header h2 {
    font-size: 2.5rem;
    color: var(--accent-frog);
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.legal-modal-body {
    color: var(--text-light);
    line-height: 1.8;
}

.legal-modal-body h3 {
    font-size: 1.8rem;
    color: var(--accent-frog);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-modal-body h4 {
    font-size: 1.4rem;
    color: var(--accent-frog);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.legal-modal-body p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    text-align: justify;
}

.legal-modal-body ul,
.legal-modal-body ol {
    margin-left: 2rem;
    margin-bottom: 1.2rem;
}

.legal-modal-body li {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    line-height: 1.7;
}

.legal-modal-body strong {
    color: var(--accent-frog);
    font-weight: bold;
}

.legal-modal-body a {
    color: var(--accent-frog);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-modal-body a:hover {
    color: var(--text-light);
}

.legal-modal-body .last-updated {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(122, 154, 74, 0.3);
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

/* Custom Scrollbar */
.legal-modal-content::-webkit-scrollbar {
    width: 10px;
}

.legal-modal-content::-webkit-scrollbar-track {
    background: rgba(45, 58, 21, 0.5);
    border-radius: 5px;
}

.legal-modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-frog);
    border-radius: 5px;
}

.legal-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--swamp-green-light);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-modal.active {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }

    .legal-modal-content {
        padding: 1.5rem;
        max-height: calc(100vh - 20px);
        margin: 0;
        border-radius: 10px;
        width: calc(100% - 20px);
    }

    .legal-modal-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0.8rem;
    }

    .legal-modal-header h2 {
        font-size: 2rem;
        padding-right: 2.5rem;
        word-wrap: break-word;
    }

    .legal-modal-close {
        top: 0.8rem;
        right: 1rem;
        font-size: 2rem;
        width: 30px;
        height: 30px;
    }

    .legal-modal-body h3 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }

    .legal-modal-body h4 {
        font-size: 1.2rem;
        margin-top: 1.2rem;
    }

    .legal-modal-body p,
    .legal-modal-body li {
        font-size: 1rem;
        text-align: left;
    }

    .legal-modal-body ul,
    .legal-modal-body ol {
        margin-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .legal-modal.active {
        padding: 5px;
        padding-top: 15px;
    }

    .legal-modal-content {
        padding: 1rem;
        max-height: calc(100vh - 10px);
        width: calc(100% - 10px);
        border-radius: 8px;
    }

    .legal-modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }

    .legal-modal-header h2 {
        font-size: 1.5rem;
        padding-right: 2rem;
        line-height: 1.3;
    }

    .legal-modal-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.8rem;
        width: 28px;
        height: 28px;
    }

    .legal-modal-body h3 {
        font-size: 1.3rem;
        margin-top: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .legal-modal-body h4 {
        font-size: 1.1rem;
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .legal-modal-body p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    .legal-modal-body li {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
        line-height: 1.6;
    }

    .legal-modal-body ul,
    .legal-modal-body ol {
        margin-left: 1.2rem;
        margin-bottom: 1rem;
    }

    .legal-modal-body .last-updated {
        margin-top: 1.5rem;
        padding-top: 1rem;
        font-size: 0.85rem;
    }
}

