/* 🔔 СИСТЕМА УВЕДОМЛЕНИЙ */

/* === ОСНОВНЫЕ СТИЛИ === */
.notifications-container {
  position: relative;
}

.notification-bell {
  position: relative;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.notification-bell:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* === СЧЕТЧИК УВЕДОМЛЕНИЙ === */
.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #ff4757, #ff3742);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
  z-index: 10;
  animation: pulse-notification 2s infinite;
}

@keyframes pulse-notification {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(255, 71, 87, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
  }
}

/* === АНИМАЦИЯ КОЛОКОЛЬЧИКА === */
.notification-bell-animated {
  animation: bell-ring 0.8s ease-in-out infinite;
}

@keyframes bell-ring {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: rotate(-15deg);
  }
  20%,
  40%,
  60%,
  80% {
    transform: rotate(15deg);
  }
}

/* === ВЫПАДАЮЩЕЕ МЕНЮ УВЕДОМЛЕНИЙ === */
.notifications-dropdown {
  min-width: 350px;
  max-height: 500px;
  overflow-y: auto;
  border: none;
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  margin-top: 10px;
}

.notifications-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 15px 20px;
  margin: -8px -8px 8px -8px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h6 {
  margin: 0;
  font-weight: 600;
}

.mark-all-read-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid #7187eb;
  color: #7187eb;
  border-radius: 20px;
  padding: 5px 15px;
  font-size: 12px;
  transition: all 0.3s ease;
}

.mark-all-read-btn:hover {
  background: #7187eb;
  transform: scale(1.05);
}

/* === ЭЛЕМЕНТЫ УВЕДОМЛЕНИЙ === */
.notification-item {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: flex-start;
}

.notification-item:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  transform: translateX(5px);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.unread {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-left: 4px solid #667eea;
}

.notification-item.unread::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #667eea;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
}

/* === АВАТАРЫ В УВЕДОМЛЕНИЯХ === */
.notification-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #667eea;
  flex-shrink: 0;
}

/* === КОНТЕНТ УВЕДОМЛЕНИЙ === */
.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-sender {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 5px;
  font-size: 14px;
}

.notification-message {
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  color: #999;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* === ИКОНКИ ТИПОВ УВЕДОМЛЕНИЙ === */
.notification-type-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.notification-type-icon.message {
  color: #17a2b8;
}

.notification-type-icon.order {
  color: #28a745;
}

.notification-type-icon.payment {
  color: #ffc107;
}

.notification-type-icon.system {
  color: #6c757d;
}

/* === ПУСТОЕ СОСТОЯНИЕ === */
.notifications-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.notifications-empty-icon {
  font-size: 48px;
  color: #28a745;
  margin-bottom: 15px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.notifications-empty-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.notifications-empty-text {
  font-size: 14px;
  color: #666;
}

/* === ФУТЕР УВЕДОМЛЕНИЙ === */
.notifications-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #f8f9fa;
  border-radius: 0 0 15px 15px;
}

.notifications-footer-link {
  display: block;
  text-align: center;
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

.notifications-footer-link:hover {
  color: #5a6fd8;
  transform: translateY(-1px);
}

/* === TOAST УВЕДОМЛЕНИЯ === */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  min-width: 300px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
  border: none;
  overflow: hidden;
  z-index: 9999;
  animation: slideInRight 0.5s ease-out;
}

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

.toast-notification.success {
  border-left: 5px solid #28a745;
}

.toast-notification.error {
  border-left: 5px solid #dc3545;
}

.toast-notification.info {
  border-left: 5px solid #17a2b8;
}

.toast-notification.warning {
  border-left: 5px solid #ffc107;
}

.toast-header {
  background: #f8f9fa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toast-title {
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toast-close:hover {
  color: #333;
  transform: scale(1.1);
}

.toast-body {
  padding: 15px 20px;
  color: #333;
  line-height: 1.5;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
  .notifications-dropdown {
    min-width: 300px;
    max-width: 90vw;
  }

  .notification-item {
    padding: 12px 15px;
    gap: 12px;
  }

  .notification-avatar {
    width: 40px;
    height: 40px;
  }

  .toast-notification {
    min-width: 280px;
    margin: 0 10px;
    right: 10px;
  }
}

@media (max-width: 576px) {
  .notifications-dropdown {
    min-width: 280px;
  }

  .notifications-header {
    padding: 12px 15px;
  }

  .notification-item {
    padding: 10px 15px;
    gap: 10px;
  }

  .notification-avatar {
    width: 35px;
    height: 35px;
  }

  .notification-sender {
    font-size: 13px;
  }

  .notification-message {
    font-size: 12px;
  }

  .notification-time {
    font-size: 10px;
  }
}

/* === ТЕМНАЯ ТЕМА === */
@media (prefers-color-scheme: dark) {
  .notifications-dropdown {
    background: rgba(45, 45, 45, 0.95);
    color: #f8f9fa;
  }

  .notification-item {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .notification-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  }

  .notification-message {
    color: #ccc;
  }

  .notification-time {
    color: #999;
  }

  .notifications-footer {
    background: #333;
    border-top-color: rgba(255, 255, 255, 0.1);
  }

  .toast-notification {
    background: #2d2d2d;
    color: #f8f9fa;
  }

  .toast-header {
    background: #333;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
}
