/* Modal General con prefijo mgm- (Matamoros General Modal) */
.mgm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mgm-overlay.active {
    display: flex;
    opacity: 1;
}

.mgm-container {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    min-width: 300px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.mgm-overlay.active .mgm-container {
    transform: scale(1);
}

.mgm-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 1;
}

.mgm-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.mgm-content {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(90vh - 50px);
}

/* Animaciones */
@keyframes mgmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mgmScaleIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.mgm-overlay.active {
    animation: mgmFadeIn 0.3s forwards;
}

.mgm-overlay.active .mgm-container {
    animation: mgmScaleIn 0.3s forwards;
}

/* Botones para abrir el modal */
.mgm-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mgm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Indicador de carga */
.mgm-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
    font-size: 18px;
    color: #666;
}

.mgm-loading:before {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 50%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    animation: mgmSpin 1s linear infinite;
}

.mgm-container.mgm-fullscreen {
    width: 95%;
    max-width: 95%;
    height: 95vh;
    max-height: 95vh;
}

.mgm-container.mgm-fullscreen .mgm-content {
    max-height: calc(95vh - 60px);
    padding: 30px;
}

@keyframes mgmSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}