/* ============================================================================
   Serentia · Alertas globales
   ----------------------------------------------------------------------------
   Estilos de las alertas de sesión (partials/alerts.blade.php).
   Tipos: success, info, warning, error. Los colores salen de las variables
   --app-alert-* de cada modificador.
   ========================================================================== */

.app-alerts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.app-alert {
    --app-alert-bg: #eef9f1;
    --app-alert-border: #d3ecdc;
    --app-alert-text: #1a6b40;
    --app-alert-progress: #2f9e63;
    --app-alert-icon: #2f9e63;

    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: start;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 46px 12px 14px;
    border: 1px solid var(--app-alert-border);
    border-radius: 10px;
    background: var(--app-alert-bg);
    color: var(--app-alert-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    overflow: hidden;
    -webkit-transition: opacity .18s ease, -webkit-transform .18s ease;
    transition: opacity .18s ease, transform .18s ease;
}

.app-alert--info {
    --app-alert-bg: #e9f2fd;
    --app-alert-border: #cfe2f8;
    --app-alert-text: #1d5fa8;
    --app-alert-progress: #3a86d6;
    --app-alert-icon: #3a86d6;
}

.app-alert--warning {
    --app-alert-bg: #fdf6e5;
    --app-alert-border: #f4e2b3;
    --app-alert-text: #8c5f0a;
    --app-alert-progress: #d99a16;
    --app-alert-icon: #d99a16;
}

.app-alert--error {
    --app-alert-bg: #fdeeee;
    --app-alert-border: #f5d0cf;
    --app-alert-text: #ab332d;
    --app-alert-progress: #d2544c;
    --app-alert-icon: #d2544c;
}

.app-alert__icon {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    height: 20px;
    color: var(--app-alert-icon);
    font-size: 16px;
    line-height: 1;
}

.app-alert__body {
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}

.app-alert__body a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.app-alert__body a:hover {
    text-decoration-thickness: 2px;
}

.app-alert__close {
    position: absolute;
    top: 7px;
    right: 7px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: .55;
    -webkit-transition: opacity .15s ease, background .15s ease;
    transition: opacity .15s ease, background .15s ease;
}

.app-alert__close:hover,
.app-alert__close:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, .06);
    outline: none;
}

/* Barra de tiempo restante (solo en las que se cierran solas) */
.app-alert__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: var(--app-alert-progress);
    opacity: .55;
    -webkit-transform-origin: left center;
    transform-origin: left center;
    -webkit-animation: app-alert-progress var(--app-alert-duration, 6000ms) linear forwards;
    animation: app-alert-progress var(--app-alert-duration, 6000ms) linear forwards;
}

.app-alert.is-paused .app-alert__progress {
    -webkit-animation-play-state: paused;
    animation-play-state: paused;
}

.app-alert.is-leaving {
    opacity: 0;
    -webkit-transform: translateY(-6px);
    transform: translateY(-6px);
}

@-webkit-keyframes app-alert-progress {
    from { -webkit-transform: scaleX(1); }
    to { -webkit-transform: scaleX(0); }
}

@keyframes app-alert-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 575.98px) {
    .app-alert {
        padding: 11px 42px 11px 12px;
        font-size: 12.5px;
    }
}

/* --------------------------------------------------------------------------
   Alertas Bootstrap que algunas vistas pintan dentro del contenido
   (div.alert): misma paleta y tipografía. Se excluyen los .badge porque
   varias vistas los combinan con .alert para heredar el color.
   -------------------------------------------------------------------------- */
div.alert {
    border-width: 1px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
}

div.alert-success {
    --bs-alert-color: #1a6b40;
    --bs-alert-bg: #eef9f1;
    --bs-alert-border-color: #d3ecdc;
    background-color: #eef9f1;
    border-color: #d3ecdc;
    color: #1a6b40;
}

div.alert-info {
    --bs-alert-color: #1d5fa8;
    --bs-alert-bg: #e9f2fd;
    --bs-alert-border-color: #cfe2f8;
    background-color: #e9f2fd;
    border-color: #cfe2f8;
    color: #1d5fa8;
}

div.alert-warning {
    --bs-alert-color: #8c5f0a;
    --bs-alert-bg: #fdf6e5;
    --bs-alert-border-color: #f4e2b3;
    background-color: #fdf6e5;
    border-color: #f4e2b3;
    color: #8c5f0a;
}

div.alert-danger {
    --bs-alert-color: #ab332d;
    --bs-alert-bg: #fdeeee;
    --bs-alert-border-color: #f5d0cf;
    background-color: #fdeeee;
    border-color: #f5d0cf;
    color: #ab332d;
}

