/* ============================================
   MODAL STATUS - CSS UNIFICADO
   Para modal-error y modal-success
   ============================================ */

/* Overlay con blur suave */
.modal-status-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.25s ease-out;
}

.modal-status-overlay--hidden {
    display: none !important;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

/* Contenedor del modal - Diseño limpio y moderno */
.modal-status-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    width: min(594px, calc(100% - 32px));
    max-width: 594px;
    position: relative;
    text-align: center;
    font-family: 'Poppins', 'Inter', sans-serif;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
    animation: slideUpModal 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Botón de cerrar - Estilo minimalista */
.modal-status-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #141820;
    line-height: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.modal-status-close:hover {
    opacity: 0.7;
}

.modal-status-close svg {
    width: 18px;
    height: 18px;
}

/* Icono - Estilo moderno con gradiente sutil */
.modal-status-icon {
    margin: 0 auto 24px;
    width: 120px;
    height: 120px;
    position: relative;
}

.modal-status-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.modal-status-icon svg {
    display: none;
}

.modal-status-overlay--success .modal-status-icon::before {
    background-image: url('../../media/status/success.png');
}

.modal-status-overlay--error .modal-status-icon::before {
    background-image: url('../../media/status/error.png');
}

/* Título - Tipografía moderna */
.modal-status-title {
    font-size: 24px;
    font-weight: 600;
    color: #141820;
    margin: 0 0 8px 0;
    line-height: 32px;
}

/* Mensaje - Texto legible y espaciado */
.modal-status-message {
    font-size: 16px;
    color: #475467;
    margin: 0 0 16px 0;
    line-height: 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.modal-status-subtitle {
    font-size: 20px;
    font-weight: 500;
    color: #141820;
    line-height: 28px;
    margin: 0 0 24px 0;
}

/* Mensaje de error con lista */
.modal-status-message strong {
    display: block;
    color: #374151;
    margin-bottom: 16px;
    font-size: 15px;
}

.modal-status-message ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.modal-status-message li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 15px;
}

.modal-status-message li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #ef4444;
    font-weight: bold;
    font-size: 18px;
}

.modal-status-message__lead {
    margin-bottom: 12px;
    font-weight: 600;
    text-align: center;
    color: #374151;
}

.modal-status-message__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-status-message__list li {
    margin-bottom: 8px;
    font-size: 15px;
    color: #6b7280;
}

/* Botón principal - Diseño flat moderno */
.modal-status-button {
    min-width: 172px;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-status-success,
.btn-status-error {
    background: #42506b;
}

.btn-status-success:hover,
.btn-status-error:hover {
    background: #2f3a52;
    transform: translateY(-1px);
}

.btn-status-success:active,
.btn-status-error:active {
    transform: translateY(0);
}

.btn-status-secondary {
    background: #005ea3;
}

.btn-status-secondary:hover {
    background: #004d8a;
    transform: translateY(-1px);
}

.btn-status-secondary:active {
    transform: translateY(0);
}

/* Contenedor de múltiples botones */
.modal-status-buttons {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.modal-status-buttons .modal-status-button {
    text-decoration: none;
    min-width: auto;
}

.modal-status-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 400;
    color: #0077c2;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.modal-status-link:hover {
    color: #005a91;
}

.modal-status-link-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
    font-size: 16px;
    line-height: 24px;
}

.modal-status-link-text {
    color: #141820;
    font-weight: 400;
    line-height: 24px;
}

.modal-status-link-container .modal-status-link {
    line-height: 24px;
    display: inline;
    margin-top: 0;
}

/* Responsive - Móviles */
@media (max-width: 600px) {
    .modal-status-container {
        padding: 32px 24px;
    }

    .modal-status-icon {
        width: 96px;
        height: 96px;
    }

    .modal-status-title {
        font-size: 22px;
    }

    .modal-status-message {
        font-size: 15px;
    }

    .modal-status-button {
        width: 100%;
    }

    .modal-status-buttons {
        flex-direction: column;
        width: 100%;
    }

    .modal-status-buttons .modal-status-button {
        width: 100%;
    }

    .modal-status-close {
        top: 8px;
        right: 8px;
    }
}

/* Animación de salida (opcional - para cuando cierres el modal) */
.modal-status-overlay.closing {
    animation: fadeOutOverlay 0.2s ease-out forwards;
}

.modal-status-overlay.closing .modal-status-container {
    animation: slideDownModal 0.2s ease-out forwards;
}

@keyframes fadeOutOverlay {
    to {
        opacity: 0;
        backdrop-filter: blur(0);
    }
}

@keyframes slideDownModal {
    to {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
}
