/* Sistema de Toast - Estilos */

.toast-container {
    position: fixed;
    bottom: 20px; /* Cambié de top: 20px a bottom: 20px */
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid;
    max-width: 100%;
    min-width: 300px;
    position: relative;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-content {
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-message {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.toast-text {
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Tipos de Toast */

/* Success */
.toast-success {
    border-left-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.toast-success .toast-title {
    color: #15803d;
}

.toast-success .toast-text {
    color: #166534;
}

.toast-success .toast-progress {
    background: #22c55e;
}

/* Error */
.toast-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.toast-error .toast-title {
    color: #dc2626;
}

.toast-error .toast-text {
    color: #991b1b;
}

.toast-error .toast-progress {
    background: #ef4444;
}

/* Warning */
.toast-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.toast-warning .toast-title {
    color: #d97706;
}

.toast-warning .toast-text {
    color: #92400e;
}

.toast-warning .toast-progress {
    background: #f59e0b;
}

/* Info */
.toast-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.toast-info .toast-title {
    color: #2563eb;
}

.toast-info .toast-text {
    color: #1d4ed8;
}

.toast-info .toast-progress {
    background: #3b82f6;
}

/* Responsive */
@media (max-width: 640px) {
    .toast-container {
        bottom: 10px; /* Cambié de top: 10px a bottom: 10px */
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        margin: 0;
    }
    
    .toast-content {
        padding: 14px;
    }
}

/* Estados hover */
.toast:hover .toast-progress {
    animation-play-state: paused;
}

/* Animaciones adicionales */
.toast-bounce {
    animation: toastBounce 0.6s ease-out;
}

@keyframes toastBounce {
    0% {
        transform: translateX(100%) scale(0.8);
    }
    50% {
        transform: translateX(-10px) scale(1.05);
    }
    100% {
        transform: translateX(0) scale(1);
    }
}

/* Tema oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        color: #f9fafb;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .toast-close {
        color: #9ca3af;
    }
    
    .toast-close:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #f3f4f6;
    }
}