/* MWM - Notifications Styles — Стили уведомлений CRM */

/* ============================================
   NOTIFICATIONS STYLES
   ============================================ */

/* Notification Container in Header */
.notification-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* Bell Button */
.notification-bell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.notification-bell:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
}

/* Badge */
.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: var(--font-semibold);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Dropdown */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
  display: none;
}

/* Dropdown Header */
.notification-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.notification-dropdown-header h3 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text);
}

.notification-dropdown-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Notification List */
.notification-list {
  max-height: 320px;
  overflow-y: auto;
  padding: var(--space-2);
}

/* Notification Item */
.notification-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.is-unread {
  background: var(--accent-bg);
}

.notification-item.is-unread:hover {
  background: #cce5ff;
}

.notification-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.notification-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.notification-message {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
}

.notification-time {
  font-size: 12px;
  color: var(--text-subtle);
}

.notification-link {
  font-size: 12px;
  color: var(--accent);
}

/* Empty State */
.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--text-muted);
  text-align: center;
}

.notification-empty p {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
}

.notification-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--text-muted);
}

/* Dropdown Footer */
.notification-dropdown-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-light);
  background: var(--bg-secondary);
  text-align: center;
}

/* Button Text */
.btn-text {
  padding: var(--space-2) var(--space-3);
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.btn-text:hover {
  background: var(--accent-bg);
  color: var(--accent-hover);
}

/* Icon Button (for notification actions) */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

/* ============================================
   NOTIFICATIONS PAGE STYLES
   ============================================ */

.notifications-page {
  max-width: 800px;
  margin: 0 auto;
}

.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.notifications-header h1 {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
}

.notifications-filters {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.filter-btn {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: var(--text-sm);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.notifications-list .notification-item {
  padding: var(--space-4);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.notifications-list .notification-item:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.notifications-list .notification-message {
  -webkit-line-clamp: 3;
}

.load-more-btn {
  width: 100%;
  padding: var(--space-4);
  margin-top: var(--space-4);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: var(--text-sm);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.load-more-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-secondary);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
