/* ==========================================================================
   APP ALERT MODAL — Toast / Notificación global
   ========================================================================== */

.alert-modal {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    right: 24px;

    width: min(400px, calc(100vw - 48px));

    z-index: 10000;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transform: translateX(120%);

    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.35s ease;
}


/* ==========================================================================
   ESTADO VISIBLE
   ========================================================================== */

.alert-modal.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;

    transform: translateX(0);
}


/* ==========================================================================
   CONTENIDO
   ========================================================================== */

.alert-modal-content {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 18px 44px 18px 18px;

    background: var(--swan-wing);

    border: 1px solid var(--shellstone);
    border-left: 4px solid var(--sapphire);

    border-radius: 14px;

    box-shadow: var(--shadow-lg);

    font-family: var(--font-primary);
}


/* ==========================================================================
   ICONO
   ========================================================================== */

.alert-modal-icon {
    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(60, 80, 125, 0.10);

    color: var(--sapphire);

    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;

    line-height: 1;
}


/* ==========================================================================
   CUERPO
   ========================================================================== */

.alert-modal-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}


/* ==========================================================================
   TÍTULO
   ========================================================================== */

.alert-modal-title {
    margin: 0 0 5px;

    color: var(--royal-blue);

    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;

    line-height: 1.3;
}


/* ==========================================================================
   MENSAJE
   ========================================================================== */

.alert-modal-message {
    color: var(--text-dark);

    font-family: var(--font-primary);
    font-size: 14px;

    line-height: 1.5;
}

.alert-modal-message strong {
    color: var(--royal-blue);
    font-weight: 700;
}


/* ==========================================================================
   BOTÓN CERRAR
   ========================================================================== */

.alert-modal-close {
    position: absolute;

    top: 10px;
    right: 10px;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: transparent;

    color: var(--sapphire);

    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.alert-modal-close:hover {
    background: rgba(60, 80, 125, 0.10);

    color: var(--royal-blue);

    transform: rotate(90deg);
}


/* ==========================================================================
   INFO
   ========================================================================== */

.alert-modal.info .alert-modal-content {
    border-left-color: var(--sapphire);
}

.alert-modal.info .alert-modal-icon {
    background: rgba(60, 80, 125, 0.10);
    color: var(--sapphire);
}


/* ==========================================================================
   SUCCESS
   ========================================================================== */

.alert-modal.success .alert-modal-content {
    border-left-color: var(--success);
}

.alert-modal.success .alert-modal-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}


/* ==========================================================================
   WARNING
   ========================================================================== */

.alert-modal.warning .alert-modal-content {
    border-left-color: var(--quicksand);
}

.alert-modal.warning .alert-modal-icon {
    background: rgba(224, 197, 143, 0.20);
    color: var(--royal-blue);
}


/* ==========================================================================
   ERROR
   ========================================================================== */

.alert-modal.error .alert-modal-content {
    border-left-color: var(--royal-blue);
}

.alert-modal.error .alert-modal-icon {
    background: rgba(17, 34, 80, 0.10);
    color: var(--royal-blue);
}


/* ==========================================================================
   RESPONSIVE — TABLET
   ========================================================================== */

@media (max-width: 768px) {

    .alert-modal {
        top: 20px;
        right: 20px;

        width: min(380px, calc(100vw - 40px));
    }

}


/* ==========================================================================
   RESPONSIVE — MÓVIL
   ========================================================================== */

@media (max-width: 480px) {

    .alert-modal {
        top: 15px;
        right: 15px;

        width: calc(100vw - 30px);

        transform: translateY(-120%);
    }

    .alert-modal.open {
        transform: translateY(0);
    }

    .alert-modal-content {
        gap: 12px;

        padding: 16px 40px 16px 15px;

        border-radius: 12px;
    }

    .alert-modal-icon {
        flex-basis: 38px;

        width: 38px;
        height: 38px;

        font-size: 20px;
    }

    .alert-modal-title {
        font-size: 16px;
    }

    .alert-modal-message {
        font-size: 13px;
    }

}