/* === LEGAL MODAL STYLES === */
/* Debug: Legal Modal styles loaded */

/* === MODAL BASE === */
.legal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.legal-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.legal-modal-content {
    background: #1e1e1e;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MODAL HEADER === */
.legal-modal-header {
    display: flex;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    gap: 1rem;
}

.legal-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.legal-modal-header h2 {
    flex: 1;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.legal-modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.legal-modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* === MODAL TABS === */
.legal-modal-tabs {
    display: flex;
    background: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.legal-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
}

.legal-tab i {
    font-size: 1.1rem;
}

.legal-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.legal-tab.active {
    color: var(--accent-cyan);
}

.legal-tab.active::after {
    transform: scaleX(1);
}

.legal-tab:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* === MODAL BODY === */
.legal-modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 250px);
    background: #1a1a1a;
}

.legal-tab-pane {
    display: none;
}

.legal-tab-pane.active {
    display: block;
    animation: fadeInContent 0.4s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === LEGAL CONTENT === */
.legal-intro {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 8px;
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.2);
}

.legal-section h3 i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.legal-section ul {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.legal-section li {
    color: var(--text-secondary);
    position: relative;
    padding: 0.6rem 0.8rem 0.6rem 2.5rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    line-height: 1.6;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.legal-section li::before {
    content: '✓';
    position: absolute;
    left: 0.8rem;
    color: var(--accent-cyan);
    font-weight: bold;
    font-size: 1.1rem;
}

.legal-section li:hover {
    background: rgba(0, 212, 255, 0.08);
    transform: translateX(5px);
}

.legal-section strong {
    color: var(--accent-gold);
    font-weight: 700;
}

/* === MODAL FOOTER === */
.legal-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #2a2a2a;
    text-align: center;
}

.legal-modal-footer p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.legal-modal-footer strong {
    color: var(--accent-cyan);
}

/* === SCROLLBAR PERSONALIZADO === */
.legal-modal-body::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .legal-modal.active {
        padding: 1rem 0.5rem;
    }

    .legal-modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }

    .legal-modal-header {
        padding: 1.5rem 1rem;
    }

    .legal-modal-header h2 {
        font-size: 1.4rem;
    }

    .legal-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .legal-modal-tabs {
        flex-direction: column;
    }

    .legal-tab {
        min-width: auto;
        text-align: left;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .legal-tab::after {
        display: none;
    }

    .legal-tab.active {
        background: rgba(0, 212, 255, 0.1);
    }

    .legal-tab span {
        font-size: 0.9rem;
    }

    .legal-modal-body {
        padding: 1.5rem 1rem;
        max-height: calc(95vh - 280px);
    }

    .legal-section h3 {
        font-size: 1.1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .legal-section p,
    .legal-section li {
        font-size: 0.9rem;
    }

    .legal-modal-footer {
        padding: 1rem;
    }

    .legal-modal-footer p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .legal-modal-header {
        padding: 1rem;
    }

    .legal-modal-header h2 {
        font-size: 1.2rem;
    }

    .legal-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .legal-modal-body {
        padding: 1rem 0.8rem;
    }

    .legal-section {
        margin-bottom: 1.5rem;
    }

    .legal-section h3 {
        font-size: 1rem;
    }

    .legal-section li {
        padding: 0.5rem 0.6rem 0.5rem 2rem;
        font-size: 0.85rem;
    }

    .legal-intro {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}

@media (max-width: 360px) {
    .legal-modal-content {
        border-radius: 10px;
    }

    .legal-modal-header h2 {
        font-size: 1.1rem;
    }

    .legal-tab {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
    .legal-modal.active {
        padding: 0.5rem;
    }

    .legal-modal-content {
        max-height: 98vh;
    }

    .legal-modal-header {
        padding: 1rem;
    }

    .legal-modal-header h2 {
        font-size: 1.2rem;
    }

    .legal-modal-body {
        max-height: calc(98vh - 200px);
        padding: 1rem;
    }

    .legal-tab {
        padding: 0.8rem 1rem;
    }
}

/* === PRINT STYLES === */
@media print {
    .legal-modal {
        display: block;
        position: static;
        background: white;
    }

    .legal-modal-content {
        max-height: none;
        box-shadow: none;
        border: none;
    }

    .legal-modal-close,
    .legal-modal-tabs {
        display: none;
    }

    .legal-tab-pane {
        display: block !important;
    }

    .legal-section {
        page-break-inside: avoid;
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .legal-modal,
    .legal-modal-content,
    .legal-tab-pane,
    .legal-tab,
    .legal-section li {
        animation: none;
        transition: none;
    }

    .legal-modal-close:hover {
        transform: none;
    }

    .legal-section li:hover {
        transform: none;
    }
}