/* Modal Custom CSS - Sin Bootstrap para eliminar intermitencia */

/* Modal Container */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
    display: none;
}

/* Backdrop */
.custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* Modal Container */
.custom-modal-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    pointer-events: none;
}

/* Modal Content */
.custom-modal-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto;
    transform: scale(1);
    transition: none;
}

/* Modal Header */
.custom-modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 24px;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.custom-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: none;
}

.custom-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Modal Body */
.custom-modal-body {
    padding: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-modal-container {
        padding: 10px;
    }
    
    .custom-modal-content {
        margin: 10px;
    }
    
    .custom-modal-header {
        padding: 20px;
    }
    
    .custom-modal-body {
        padding: 24px;
    }
}

/* Show/Hide animations */
.custom-modal.show {
    display: block !important;
}

.custom-modal.show .custom-modal-content {
    animation: modalShow 0.3s ease-out;
}

.custom-modal.hiding .custom-modal-content {
    animation: modalHide 0.3s ease-in;
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalHide {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}