/**
 * NotificationCenter styles
 * @countermeasure/web-components/display/notification-center
 */

/* ============================================================================
   NOTIFICATION CENTER BASE
   ============================================================================ */
.cmm-notification-center {
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 500px;
}

/* ============================================================================
   NOTIFICATION CENTER HEADER
   ============================================================================ */
.cmm-notification-center__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--muted));
}

.cmm-notification-center__header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cmm-notification-center__title {
  font-weight: 600;
  font-size: 0.875rem;
  color: hsl(var(--foreground));
}

.cmm-notification-center__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0 0.375rem;
}

.cmm-notification-center__actions {
  display: flex;
  gap: 0.5rem;
}

.cmm-notification-center__action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.cmm-notification-center__action-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--background));
}

.cmm-notification-center__action-btn:focus-visible {
  outline: 2px solid hsl(var(--focus-ring));
  outline-offset: 2px;
}

/* ============================================================================
   NOTIFICATION CENTER LIST
   ============================================================================ */
.cmm-notification-center__list {
  overflow-y: auto;
  flex: 1;
}

.cmm-notification-center__list::-webkit-scrollbar {
  width: 6px;
}

.cmm-notification-center__list::-webkit-scrollbar-track {
  background: transparent;
}

.cmm-notification-center__list::-webkit-scrollbar-thumb {
  background-color: hsl(var(--border));
  border-radius: 9999px;
}

/* ============================================================================
   NOTIFICATION CENTER ITEM
   ============================================================================ */
.cmm-notification-center__item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsl(var(--border));
  transition: background-color var(--transition-fast);
}

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

.cmm-notification-center__item:hover {
  background-color: hsl(var(--muted));
}

.cmm-notification-center__item--unread {
  border-left: 3px solid hsl(var(--primary));
  background-color: hsl(var(--primary) / 0.03);
}

/* ============================================================================
   NOTIFICATION CENTER ITEM ICON
   ============================================================================ */
.cmm-notification-center__item-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
  display: flex;
  align-items: flex-start;
}

.cmm-notification-center__item-icon svg {
  width: 1rem;
  height: 1rem;
}

.cmm-notification-center__item-icon--info {
  color: hsl(var(--info));
}

.cmm-notification-center__item-icon--success {
  color: hsl(var(--success));
}

.cmm-notification-center__item-icon--warning {
  color: hsl(var(--warning));
}

.cmm-notification-center__item-icon--error {
  color: hsl(var(--danger));
}

/* ============================================================================
   NOTIFICATION CENTER ITEM CONTENT
   ============================================================================ */
.cmm-notification-center__item-content {
  flex: 1;
  min-width: 0;
}

.cmm-notification-center__item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.cmm-notification-center__item-desc {
  font-size: 0.75rem;
  color: hsl(var(--text-secondary));
  margin-top: 0.125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmm-notification-center__item-time {
  font-size: 0.625rem;
  color: hsl(var(--text-tertiary));
  margin-top: 0.25rem;
}

/* ============================================================================
   NOTIFICATION CENTER ITEM ACTIONS
   ============================================================================ */
.cmm-notification-center__item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
}

.cmm-notification-center__item-action-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.375rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 0.625rem;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.cmm-notification-center__item-action-btn:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--muted));
}

.cmm-notification-center__item-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0;
  transition:
    opacity var(--transition-fast),
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.cmm-notification-center__item:hover .cmm-notification-center__item-dismiss {
  opacity: 1;
}

.cmm-notification-center__item-dismiss:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--muted));
}

.cmm-notification-center__item-dismiss:focus-visible {
  outline: 2px solid hsl(var(--focus-ring));
  outline-offset: 2px;
  opacity: 1;
}

/* ============================================================================
   NOTIFICATION CENTER EMPTY STATE
   ============================================================================ */
.cmm-notification-center__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  color: hsl(var(--text-secondary));
  font-size: 0.875rem;
}
