@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');

/* ===================== */
/* MODALES */
/* ===================== */
.alerta-overlay {
    position: fixed; inset: 0;
    display: flex; justify-content: center; align-items: center;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.45);
    opacity: 0; pointer-events: none;
    transition: opacity .25s ease;
    z-index: 9999;
    font-family: 'Geist', sans-serif;

    &.visible {
        opacity: 1; pointer-events: auto;

        .alerta-modal { transform: translateY(0); }
    }
}

.alerta-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 420px; width: 90%;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transform: translateY(-15px);
    transition: transform .25s ease;

    p { font-size: 15px; margin-bottom: 22px; color: #333; line-height: 1.5; }

    .alerta-boton {
        border: none; border-radius: 8px;
        padding: 10px 22px;
        cursor: pointer;
        font-size: 14px; font-weight: 500;
        transition: background .2s ease, transform .1s ease;
        color: #fff;

        &:active { transform: scale(.97); }
    }

    &.alerta-info { border-top: 4px solid #0d6efd; .alerta-boton { background: #0d6efd; &:hover { background: #0b5ed7; } &.cancelar { background: transparent; color: #0d6efd; border: 1px solid #0d6efd; font-weight: 600; &:hover { background: #0d6efd; color: #fff; } } } }
    &.alerta-exito { border-top: 4px solid #198754; .alerta-boton { background: #198754; &:hover { background: #146c43; } &.cancelar { background: transparent; color: #198754; border: 1px solid #198754; font-weight: 600; &:hover { background: #198754; color: #fff; } } } }
    &.alerta-error { border-top: 4px solid #dc3545; .alerta-boton { background: #dc3545; &:hover { background: #b02a37; } &.cancelar { background: transparent; color: #dc3545; border: 1px solid #dc3545; font-weight: 600; &:hover { background: #dc3545; color: #fff; } } } }
    &.alerta-advertencia { border-top: 4px solid #ffc107; .alerta-boton { background: #ffc107; &:hover { background: #e0a800; } &.cancelar { background: transparent; color: #ffc107; border: 1px solid #ffc107; font-weight: 600; &:hover { background: #ffc107; color: #fff; } } } }
}

/* ===================== */
/* TOASTERS */
/* ===================== */
.alerta-contenedor {
    position: fixed;
    display: flex; 
    flex-direction: column; 
    gap: 12px;
    z-index: 9999;
    font-family: 'Geist', sans-serif;
}

.alerta-contenedor.top-right {
    top: 20px; right: 20px;
    align-items: flex-end;
}

.alerta-contenedor.top-left {
    top: 20px; left: 20px;
    align-items: flex-start;
}

.alerta-contenedor.bottom-right {
    bottom: 20px; right: 20px;
    align-items: flex-end;
}

.alerta-contenedor.bottom-left {
    bottom: 20px; left: 20px;
    align-items: flex-start;
}

.alerta {
    opacity: 0; transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s ease;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px; font-weight: 500;
    background: #fff; color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-left: 5px solid transparent;
    max-width: 320px;

    &.visible { opacity: 1; transform: translateY(0); }
    &.alerta-info        { border-left-color: #0d6efd; }
    &.alerta-exito       { border-left-color: #198754; }
    &.alerta-error       { border-left-color: #dc3545; }
    &.alerta-advertencia { border-left-color: #ffc107; }
}
/* Botonera de confirm */
.alerta-botones {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.alerta-boton.cancelar {
    background: #e0e0e0;
    color: #333;
}
.alerta-boton.cancelar:hover {
    background: #c9c9c9;
}

.alerta-boton.aceptar {
    font-weight: 600;
}
/* Botonera de confirm */
.alerta-botones {
    display: flex;
    justify-content: center; /* centrado */
    gap: 14px;
}