/* ============================================================
   NOTIFICATION ROW — single notification entry
   Layout: icon (40x40) | body (title + detail) | meta (timestamp + dot)
   States: read / unread (with bg + dot) / hover
   ============================================================ */

.notif {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
  align-items: flex-start;
  cursor: pointer;
}

.notif:last-child {
  border-bottom: none;
}

.notif:hover {
  background: var(--bg-subtle);
}

.notif--unread {
  background: var(--color-primary-subtle-50, rgba(30, 95, 255, 0.04));
}

.notif--unread:hover {
  background: var(--color-primary-subtle);
}

[data-theme="dark"] .notif--unread {
  background: rgba(30, 95, 255, 0.06);
}

@media (max-width: 720px) {
  .notif {
    grid-template-columns: 32px 1fr;
    padding: var(--space-3) var(--space-4);
    gap: var(--space-2);
  }
  .notif__meta {
    grid-column: 2;
    flex-direction: row-reverse;
    margin-top: var(--space-1);
  }
}

/* Icon — circle background with category color */
.notif__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .notif__icon {
    width: 32px;
    height: 32px;
  }
}

.notif__icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

@media (max-width: 720px) {
  .notif__icon svg {
    width: 14px;
    height: 14px;
  }
}

/* Category color tints */
.notif__icon--phase {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.notif__icon--bet-won {
  background: var(--color-success-subtle);
  color: var(--color-success-text);
}

.notif__icon--bet-lost {
  background: var(--color-danger-subtle);
  color: var(--color-danger-text);
}

.notif__icon--drawdown {
  background: var(--color-warning-subtle);
  color: var(--color-warning-text);
}

.notif__icon--payout {
  background: var(--color-success-subtle);
  color: var(--color-success-text);
}

.notif__icon--security {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.notif__icon--account {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

/* Body — title + detail + optional inline action */
.notif__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notif__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
}

.notif--unread .notif__title {
  color: var(--text-primary);
}

.notif__detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
  max-width: 70ch;
}

.notif__detail strong {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.notif__detail-mono {
  font-family: var(--font-mono);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.notif__action {
  margin-top: var(--space-2);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  text-decoration: none;
}

.notif__action:hover {
  text-decoration: underline;
}

.notif__action svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

/* Meta — timestamp + unread dot */
.notif__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
  flex-shrink: 0;
}

.notif__time {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.notif__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  flex-shrink: 0;
}

.notif:not(.notif--unread) .notif__dot {
  display: none;
}
