/* Sistema de Notificaciones Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 450px;
    min-width: 350px;
}

.toast {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
    padding: 20px;
    border-left: 5px solid #28a745;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: block;
    position: relative;
    overflow: hidden;
    min-height: 60px;
    line-height: 1.5;
}

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

.toast.success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #f8fff9 100%);
}

.toast.danger {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #fff9f9 100%);
}

.toast.error {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #fff9f9 100%);
}

.toast.warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #fffef7 100%);
}

.toast.info {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #d1ecf1 0%, #f7fcfd 100%);
}



.toast-content {
    width: 100%;
    padding-right: 40px;
    min-width: 0; /* Para permitir text wrapping */
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #2c3e50;
    line-height: 1.3;
}

.toast-message {
    font-size: 14px;
    color: #5a6c7d;
    line-height: 1.6;
    word-wrap: break-word;
}

.toast-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: toast-progress 4s linear forwards;
}

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

/* Animación de salida */
.toast.hide {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
        min-width: auto;
    }
    
    .toast {
        margin-bottom: 10px;
        padding: 18px 20px;
        min-height: 90px;
        border-radius: 10px;
    }
    
    .toast-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .toast-message {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .toast-icon {
        font-size: 26px;
        margin-right: 14px;
    }
    
    .toast-close {
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin-left: 8px;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        padding: 16px 18px;
        min-height: 85px;
    }
    
    .toast-title {
        font-size: 14px;
    }
    
    .toast-message {
        font-size: 12px;
    }
}

/* Efectos adicionales para mejor UX */
.toast:hover .toast-progress-bar {
    animation-play-state: paused;
}

.toast-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
    padding: 8px 16px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.toast-link:hover {
    background: rgba(0, 123, 255, 0.2);
    color: #0056b3;
    text-decoration: none;
    transform: translateY(-1px);
}