/* DirtyMinds — Notifications UI (Phase 10) */

/* ── Bell button ─────────────────────────────────────────────────── */
.notif-bell {
  position: relative;
  background: transparent;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 18px;
  line-height: 1;
  border-radius: 10px;
  transition: background 0.15s, opacity 0.15s;
}
.notif-bell:hover, .notif-bell:focus-visible {
  background: var(--color-surface-raised);
  outline: none;
}
.notif-bell__icon { display: inline-block; }
.notif-bell--has-unread .notif-bell__icon {
  animation: notif-bell-wiggle 0.6s ease-in-out;
}

/* Muted state — push permission not granted. Inbox + push both inactive;
 * tapping the bell triggers the activation prompt rather than opening
 * the inbox sheet. Visual cue: greyed icon + diagonal strike-through
 * centered on the bell button. The strike uses a centered + rotated
 * line (transform pivot defaults to the element center). */
.notif-bell--muted .notif-bell__icon {
  opacity: 0.45;
  filter: grayscale(1);
}
.notif-bell--muted::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 26px; height: 2px;
  background: var(--color-text-muted);
  transform: translate(-50%, -50%) rotate(-45deg);
  pointer-events: none;
  border-radius: 1px;
}
.notif-bell--muted:hover {
  background: var(--color-surface-raised);
}
.notif-bell--muted:hover .notif-bell__icon {
  opacity: 0.75;
}
@keyframes notif-bell-wiggle {
  0%, 100% { transform: rotate(0); }
  20%       { transform: rotate(-12deg); }
  40%       { transform: rotate(10deg); }
  60%       { transform: rotate(-6deg); }
  80%       { transform: rotate(3deg); }
}

.notif-bell__badge {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--color-danger, #e05252);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--color-bg);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.notif-bell__badge--visible { display: inline-flex; }

/* ── Inbox overlay sheet ─────────────────────────────────────────── */
.notif-inbox-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  animation: notif-fade-in 0.18s ease-out;
}
.notif-inbox-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-height: 88vh;
  background: var(--color-surface);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  z-index: 1001;
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  animation: notif-slide-up 0.22s ease-out;
  overflow: hidden;
}
@keyframes notif-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes notif-slide-up {
  from { transform: translateY(100%); } to { transform: translateY(0); }
}

.notif-inbox-sheet__header {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}
.notif-inbox-sheet__close {
  width: 36px; height: 36px;
  border: none; background: transparent;
  color: var(--color-text);
  font-size: 22px;
  cursor: pointer;
  border-radius: 50%;
}
.notif-inbox-sheet__close:hover {
  background: var(--color-surface-raised);
}
.notif-inbox-sheet__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.notif-inbox-sheet__actions {
  display: flex; align-items: center; gap: 4px;
}
.notif-inbox-sheet__mark-all {
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
}
.notif-inbox-sheet__clear-all {
  background: transparent;
  border: none;
  color: var(--color-danger, #e05252);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
}
.notif-inbox-sheet__clear-all:hover {
  text-decoration: underline;
}

/* ── List ────────────────────────────────────────────────────────── */
.notif-inbox-list {
  flex: 1;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.notif-inbox-row {
  position: relative;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.notif-inbox-row:hover {
  background: var(--color-surface-raised);
}
.notif-inbox-row__unread-dot {
  position: absolute;
  left: 7px; top: 19px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}
.notif-inbox-row--unread { background: rgba(249, 115, 22, 0.04); }
.notif-inbox-row--unread:hover { background: rgba(249, 115, 22, 0.08); }
.notif-inbox-row__main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.notif-inbox-row__body {
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-text);
}
.notif-inbox-row__body strong {
  font-weight: 700;
  color: var(--color-text);
}
.notif-inbox-row__meta {
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex; gap: 4px;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.notif-inbox-empty {
  padding: 60px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.notif-inbox-empty__icon {
  font-size: 44px;
  opacity: 0.7;
  margin-bottom: 4px;
}
.notif-inbox-empty__title {
  font-size: 15px;
  font-weight: 600;
}
.notif-inbox-empty__body {
  font-size: 12px;
  color: var(--color-text-muted);
  max-width: 240px;
}
