/**
 * modal.css - Estilos para modales
 * Version: 1.0.0
 */

/* Modal base */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal content */
.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

/* Modal header */
.modal-header {
    background: linear-gradient(135deg, #035aa6 0%, #2E86AB 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Modal close button */
.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Modal body */
.modal-body {
    padding: 2rem;
    background-color: #f8f9fa;
}

/* Liga categories */
.liga-categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.liga-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-weight: 500;
}

.liga-link:hover {
    border-color: #035aa6;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(3, 90, 166, 0.1);
}

.liga-link i:first-child {
    color: #035aa6;
    font-size: 1.25rem;
}

.liga-link i:last-child {
    margin-left: auto;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Alert styles */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info {
    background-color: #cfe2ff;
    border: 1px solid #b6d4fe;
    color: #084298;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

/* Button in modal */
.modal-body .btn-block {
    width: 100%;
    justify-content: center;
}

/* Liga dropdown en proyecto */
.liga-dropdown {
    position: relative;
    display: inline-block;
}

.btn-liga-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-blue);
    color: white;
    border-color: white;
}

.liga-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 100;
    min-width: 200px;
}

.liga-dropdown:hover .liga-submenu,
.liga-dropdown:focus-within .liga-submenu {
    display: block;
}

.btn-submenu {
    display: block;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.95rem;
    color: #333;
}

.btn-submenu:hover {
    background-color: #f8f9fa;
    color: #035aa6;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1.25rem 1rem;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }
    
    .liga-link {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.75rem;
    }
}