/* ==========================================================================
   notifications.css — Notification inbox panel + HUD bell button
   ========================================================================== */

/* ---------------------------------------------------------------------------
   HUD Bell Button
   --------------------------------------------------------------------------- */
.hud-notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.hud-notif-btn svg {
  width: 14px;
  height: 14px;
}

.hud-notif-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.hud-notif-btn:active {
  transform: scale(0.9);
}

/* Unread badge on the bell */
.hud-notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--color-secondary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid var(--bg);
}

.hud-notif-badge.has-unread {
  display: inline-flex;
}

/* Shake animation when a new notification arrives */
@keyframes bellShake {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(12deg); }
  30%  { transform: rotate(-10deg); }
  45%  { transform: rotate(8deg); }
  60%  { transform: rotate(-6deg); }
  75%  { transform: rotate(4deg); }
  90%  { transform: rotate(-2deg); }
  100% { transform: rotate(0deg); }
}

.hud-notif-btn.bell-shake svg {
  animation: bellShake 0.5s ease;
}

/* ---------------------------------------------------------------------------
   Notification Panel Modal (notif-panel modifier on .modal)
   --------------------------------------------------------------------------- */

/* Day separator */
.notif-day-header {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  padding: 10px 0 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 5px;
}

.notif-day-header:not(:first-child) {
  margin-top: 14px;
}

/* ---------------------------------------------------------------------------
   Notification Row
   --------------------------------------------------------------------------- */
.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--notif-border, rgba(255,255,255,0.06));
  background: var(--notif-bg, rgba(255,255,255,0.03));
  margin-bottom: 5px;
  cursor: pointer;
  transition: background var(--transition-fast), opacity var(--transition-fast);
  position: relative;
}

.notif-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.notif-row.notif-read {
  opacity: 0.5;
}

.notif-row.notif-unread {
  opacity: 1;
}

/* Severity icon */
.notif-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--notif-color, var(--text-secondary));
  margin-top: 1px;
}

.notif-icon svg {
  width: 16px;
  height: 16px;
}

/* Text content */
.notif-text {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--notif-color, var(--text-primary));
  line-height: 1.3;
  margin-bottom: 2px;
}

.notif-message {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Unread indicator dot */
.notif-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-secondary);
  margin-top: 5px;
  box-shadow: 0 0 6px rgba(255, 140, 66, 0.5);
}

/* ---------------------------------------------------------------------------
   Mark All Read Button
   --------------------------------------------------------------------------- */
.notif-mark-all-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
  flex-shrink: 0;
}

.notif-mark-all-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* ---------------------------------------------------------------------------
   Empty state
   --------------------------------------------------------------------------- */
.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 0;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
}

.notif-empty i,
.notif-empty svg {
  width: 32px;
  height: 32px;
  opacity: 0.35;
}

/* ---------------------------------------------------------------------------
   Responsive — phone
   --------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .hud-notif-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
  .hud-notif-btn svg {
    width: 18px;
    height: 18px;
  }
}
