/* ========================================
   NOTIFICACIONES DEL PROYECTO HOMESTUDIO
   ======================================== */

/* 🎯 Contenedor de notificaciones */
.notifications-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  max-width: 380px;
  width: 100%;
  pointer-events: none;
}

/* 🎯 Notificación individual */
.notification {
  background: white;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(8px);
  min-height: 60px;
  display: flex;
  align-items: center;
}

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

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

/* 🎯 Iconos de notificación */
.notification-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-right: 12px;
  position: relative;
}

.notification-icon::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.2;
  z-index: -1;
}

/* 🎯 Contenido de notificación */
.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
  line-height: 1.2;
  color: #2c3e50;
}

.notification-message {
  font-size: 0.8rem;
  color: #6c757d;
  line-height: 1.3;
  margin: 0;
  word-wrap: break-word;
}

/* 🎯 Botón de cerrar */
.notification-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #adb5bd;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: 8px;
}

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

/* 🎯 Barra de progreso */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
}

.notification-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  width: 100%;
  animation: progress 4s linear forwards;
}

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

/* 🎯 Tipos de notificación */
.notification-success .notification-icon {
  background: #28a745;
  color: white;
}

.notification-danger .notification-icon {
  background: #dc3545;
  color: white;
}

.notification-warning .notification-icon {
  background: #ffc107;
  color: #212529;
}

.notification-info .notification-icon {
  background: #17a2b8;
  color: white;
}

/* 🎯 Tipos específicos del proyecto */
.notification-orden .notification-icon {
  background: #6f42c1;
  color: white;
}

.notification-pago .notification-icon {
  background: #20c997;
  color: white;
}

.notification-cliente .notification-icon {
  background: #fd7e14;
  color: white;
}

.notification-cita .notification-icon {
  background: #e83e8c;
  color: white;
}

.notification-cierre .notification-icon {
  background: #28a745;
  color: white;
}

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

@media (max-width: 576px) {
  .notifications-container {
    top: 5px;
    right: 5px;
    left: 5px;
  }
  
  .notification {
    padding: 10px 14px;
    min-height: 50px;
  }
  
  .notification-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    margin-right: 10px;
  }
  
  .notification-title {
    font-size: 0.85rem;
  }
  
  .notification-message {
    font-size: 0.75rem;
  }
}

/* 🎯 Animaciones adicionales */
.notification {
  animation: slideInRight 0.3s ease-out;
}

.notification.hide {
  animation: slideOutRight 0.3s ease-in;
}

@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;
  }
}

/* 🎯 Efectos de hover */
.notification:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* 🎯 Estados de carga */
.notification.loading .notification-progress-bar {
  animation: progress 2s linear infinite;
}

/* 🎯 Notificaciones agrupadas */
.notifications-container:has(.notification:nth-child(2)) {
  max-height: 80vh;
  overflow-y: auto;
}

/* 🎯 Scrollbar personalizado para contenedor */
.notifications-container::-webkit-scrollbar {
  width: 4px;
}

.notifications-container::-webkit-scrollbar-track {
  background: transparent;
}

.notifications-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}

.notifications-container::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}
