/**
 * Estilos para el Sistema de Notificaciones Toast
 */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Iconos */
.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.toast-success .toast-icon {
    background: #d4edda;
    color: #155724;
}

.toast-error .toast-icon {
    background: #f8d7da;
    color: #721c24;
}

.toast-warning .toast-icon {
    background: #fff3cd;
    color: #856404;
}

.toast-info .toast-icon {
    background: #d1ecf1;
    color: #0c5460;
}

/* Mensaje */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    word-wrap: break-word;
}

/* Botón de cerrar */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

/* Barra de progreso */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    animation: toast-progress linear forwards;
}

.toast-success .toast-progress {
    background: #28a745;
}

.toast-error .toast-progress {
    background: #dc3545;
}

.toast-warning .toast-progress {
    background: #ffc107;
}

.toast-info .toast-progress {
    background: #17a2b8;
}

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

/* Bordes de color según tipo */
.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}
