/**
 * @file toast.css
 * @description Estilos para el sistema de notificaciones toast
 * @author Equipo Monyma
 * @version 1.0.0
 */

/* ===========================================
   CONTENEDOR PRINCIPAL
   =========================================== */

/* Contenedor fijo centrado en la parte inferior de la pantalla */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: calc(100% - 48px);
    max-width: 320px;
}

/* ===========================================
   TOAST - ESTRUCTURA Y ANIMACIONES
   =========================================== */

/* Toast base con estado inicial oculto */
.toast {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    box-shadow: 0 0 8px 3px rgba(0, 0, 0, 0.7);
}

/* Estado visible con animación de entrada */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Estado oculto con animación de salida */
.toast.hide {
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

/* ===========================================
   CONTENIDO DEL TOAST
   =========================================== */

/* Contenedor del contenido interno */
.toast-body {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Icono del toast */
.toast-icon {
    font-size: 18px;
    color: #000;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

/* Icono con animación de rotación para estados de carga */
.toast-icon.spinning {
    animation: toast-spin 1s linear infinite;
}

/* Animación de rotación continua */
@keyframes toast-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===========================================
   TEXTO DEL TOAST
   =========================================== */

/* Contenedor del texto con flexibilidad para ocupar espacio disponible */
.toast-text {
    flex: 1;
    min-width: 0;
}

/* Título del toast */
.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

/* Mensaje secundario con truncamiento de texto */
.toast-message {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===========================================
   BOTÓN DE CIERRE
   =========================================== */

/* Botón para cerrar manualmente el toast */
.toast-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    color: #000;
    font-size: 12px;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

/* Estado hover/activo del botón de cierre */
.toast-close:hover,
.toast-close:active {
    background: rgba(0, 0, 0, 0.2);
}

/* ===========================================
   BARRA DE PROGRESO
   =========================================== */

/* Contenedor de la barra de progreso */
.toast-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
}

/* Barra de progreso activa */
.toast-progress-bar {
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: width linear;
}

/* Animación de progreso indeterminado */
@keyframes toast-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===========================================
   TIPOS DE TOAST - COLORES
   =========================================== */

/* Toast de éxito - verde azulado */
.toast.success { background: #339999; }

/* Toast de error - rojo */
.toast.error { background: #ef4444; }

/* Toast informativo - azul */
.toast.info { background: #3b82f6; }

/* Toast de advertencia - naranja */
.toast.warning { background: #f59e0b; }
