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

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    overflow: hidden;
    position: relative;
    min-width: 300px;
    border-left: 4px solid #007bff;
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

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

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

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

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    width: 100%;
    animation: toast-progress linear;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Tipos de toast */
.toast-success {
    border-left-color: #28a745;
}

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

.toast-error {
    border-left-color: #dc3545;
}

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

.toast-warning {
    border-left-color: #ffc107;
}

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

.toast-info {
    border-left-color: #17a2b8;
}

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

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
    
    .toast-content {
        padding: 12px;
    }
    
    .toast-message {
        font-size: 13px;
    }
}

/* Tema oscuro */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #2d3748;
        color: #e2e8f0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .toast-message {
        color: #e2e8f0;
    }
    
    .toast-close {
        color: #a0aec0;
    }
    
    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
}

/* Animaciones adicionales */
.toast:hover .toast-progress {
    animation-play-state: paused;
}

.toast-container:empty {
    display: none;
}

/* Efectos de entrada alternativos */
.toast-slide-down {
    transform: translateY(-100%);
}

.toast-slide-down.show {
    transform: translateY(0);
}

.toast-fade {
    transform: scale(0.8);
}

.toast-fade.show {
    transform: scale(1);
}

/* Estilos para múltiples toasts */
.toast:nth-child(n+4) {
    opacity: 0.8;
    transform: scale(0.95) translateX(0);
}

.toast:nth-child(n+6) {
    display: none;
}