/**
 * TASKMATE - Notifications Styles
 * ================================
 * Styling für das Benachrichtigungssystem
 */

/* =============================================================================
   NOTIFICATION BELL
   ============================================================================= */

.notification-bell {
  position: relative;
}

.notification-bell .btn-icon {
  position: relative;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

.notification-bell.has-notifications .btn-icon {
  color: var(--primary);
}

.notification-bell .btn-icon:hover {
  color: var(--primary);
}

.notification-icon {
  width: 22px;
  height: 22px;
}

/* Badge */
.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: var(--font-bold);
  color: white;
  background: var(--error);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notification-badge.hidden {
  display: none;
}

/* =============================================================================
   NOTIFICATION DROPDOWN
   ============================================================================= */

.notification-dropdown {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 380px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 10001;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notification-dropdown.hidden {
  display: none !important;
}

/* Header */
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-4);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

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

.notification-header .btn-text {
  font-size: var(--text-xs);
  color: var(--primary);
  padding: var(--spacing-1) var(--spacing-2);
}

.notification-header .btn-text:hover {
  background: var(--primary-light);
  border-radius: var(--radius-md);
}

/* =============================================================================
   NOTIFICATION LIST
   ============================================================================= */

.notification-list {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
}

/* Notification Item */
.notification-item {
  display: flex;
  gap: var(--spacing-3);
  padding: var(--spacing-3) var(--spacing-4);
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

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

.notification-item.unread {
  background: var(--primary-light);
}

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

.notification-item.persistent {
  border-left: 3px solid var(--warning);
  padding-left: calc(var(--spacing-4) - 3px);
}

/* Type Icon */
.notification-type-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-type-icon svg {
  width: 18px;
  height: 18px;
}

.notification-type-icon.task {
  background: var(--info-bg);
  color: var(--info);
}

.notification-type-icon.comment {
  background: var(--success-bg);
  color: var(--success);
}

.notification-type-icon.approval {
  background: var(--warning-bg);
  color: var(--warning);
}

.notification-type-icon.mention {
  background: var(--primary-light);
  color: var(--primary);
}

.notification-type-icon.completed {
  background: var(--success-bg);
  color: var(--success);
}

.notification-type-icon.priority {
  background: var(--error-bg);
  color: var(--error);
}

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

.notification-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}

.notification-message {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.notification-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

/* Actions */
.notification-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-1);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.notification-item:hover .notification-actions {
  opacity: 1;
}

.notification-delete {
  padding: 4px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notification-delete:hover {
  color: var(--error);
  background: var(--error-bg);
}

.notification-delete svg {
  width: 16px;
  height: 16px;
}

/* =============================================================================
   EMPTY STATE
   ============================================================================= */

.notification-empty {
  padding: var(--spacing-8);
  text-align: center;
}

.notification-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--spacing-3);
  color: var(--text-muted);
  opacity: 0.5;
}

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

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 480px) {
  .notification-dropdown {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .notification-list {
    max-height: calc(100vh - var(--header-height) - 60px);
  }
}
