/* ============================================================================
   SISTEMA DE NOTIFICACIONES TOAST - Sistema ARCA Construcción
   ============================================================================ */

/* Contenedor principal de notificaciones */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

/* Toast individual */
.toast-notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #e9ecef;
    margin-bottom: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Animación de entrada */
.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Animación de salida */
.toast-notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Barra de progreso */
.toast-notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 0 0 12px 12px;
    animation: progress 4s linear forwards;
}

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

/* Icono del toast */
.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Colores de iconos */
.toast-success .toast-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.toast-error .toast-icon {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.toast-warning .toast-icon {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    color: white;
}

.toast-info .toast-icon {
    background: linear-gradient(135deg, #17a2b8, #3498db);
    color: white;
}

/* Contenido del toast */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.toast-message {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Botón de cerrar */
.toast-close {
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #6c757d;
    background: #f8f9fa;
}

/* Efectos hover */
.toast-notification:hover {
    transform: translateX(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

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

/* Animaciones adicionales */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Clases de animación */
.toast-slide-in {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast-slide-out {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efecto de pulso para notificaciones importantes */
.toast-important {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); }
    50% { box-shadow: 0 8px 32px rgba(40, 167, 69, 0.3); }
    100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); }
}
