/* Radio Logs v5.1 - Live Activity & Notifications */

/* Topbar notification button */
.notification-btn-v51 {
  position: relative;
}

.notification-dot-v51 {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid var(--surface);
  display: none;
}

.notification-btn-v51.has-items .notification-dot-v51 {
  display: block;
}

/* Notification drawer */
.notification-backdrop-v51 {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .28);
  z-index: 150;
}

.notification-drawer-v51 {
  position: fixed;
  top: 72px;
  right: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  z-index: 160;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 72px rgba(16, 24, 40, .22);
}

.notification-drawer-head-v51 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.notification-drawer-head-v51 h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.035em;
}

.notification-drawer-head-v51 p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.notification-close-v51 {
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.notification-list-v51 {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.notification-item-v51 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
}

.notification-icon-v51,
.activity-icon-v51 {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 950;
  background: #dbeafe;
  color: #175cd3;
}

.notification-item-v51.warn .notification-icon-v51,
.activity-row-v51.warn .activity-icon-v51 {
  background: #fef3c7;
  color: #92400e;
}

.notification-item-v51.good .notification-icon-v51,
.activity-row-v51.good .activity-icon-v51 {
  background: #dcfce7;
  color: #166534;
}

.notification-item-v51.error .notification-icon-v51,
.activity-row-v51.error .activity-icon-v51 {
  background: #fee2e2;
  color: #991b1b;
}

.notification-title-v51,
.activity-title-v51 {
  display: block;
  font-weight: 900;
  color: var(--text);
  line-height: 1.25;
}

.notification-sub-v51,
.activity-sub-v51 {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  margin-top: 3px;
}

.notification-action-v51 {
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  align-self: center;
}

.notification-empty-v51 {
  padding: 28px 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

/* Dashboard live activity workspace */
.live-workspace-v51 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .62fr);
  gap: 22px;
  margin: 0 0 24px;
}

.live-panel-v51,
.notification-panel-v51 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 14px 38px rgba(16, 24, 40, .08);
  overflow: hidden;
}

.live-panel-head-v51,
.notification-panel-head-v51 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(23, 92, 211, .09), transparent 24rem),
    var(--surface);
}

.live-panel-head-v51 h2,
.notification-panel-head-v51 h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.04em;
}

.live-panel-head-v51 p,
.notification-panel-head-v51 p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.live-badge-v51 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 7px 10px;
  background: #dcfce7;
  color: #14532d;
  border: 1px solid #86efac;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.live-badge-v51::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.16);
}

.activity-list-v51,
.dashboard-notification-list-v51 {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.activity-row-v51,
.dashboard-notification-row-v51 {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.activity-row-v51:hover,
.dashboard-notification-row-v51:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.activity-time-v51,
.notification-time-v51 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  align-self: center;
}

.notification-panel-v51 {
  min-height: 100%;
}

.dashboard-notification-row-v51 {
  grid-template-columns: auto 1fr;
}

.v51-notification-source {
  display: none !important;
}

/* Dark mode */
html[data-theme="dark"] .notification-drawer-v51,
html[data-theme="dark"] .live-panel-v51,
html[data-theme="dark"] .notification-panel-v51 {
  background: linear-gradient(180deg, rgba(30,41,59,.82), rgba(17,24,39,.96));
  border-color: #334155;
  box-shadow: 0 24px 72px rgba(0,0,0,.42);
}

html[data-theme="dark"] .live-panel-head-v51,
html[data-theme="dark"] .notification-panel-head-v51,
html[data-theme="dark"] .notification-drawer-head-v51 {
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.14), transparent 24rem),
    rgba(17,24,39,.96);
  border-color: #334155;
}

html[data-theme="dark"] .activity-row-v51,
html[data-theme="dark"] .dashboard-notification-row-v51,
html[data-theme="dark"] .notification-item-v51 {
  background: rgba(15,23,42,.72);
  border-color: #334155;
}

html[data-theme="dark"] .activity-row-v51:hover,
html[data-theme="dark"] .dashboard-notification-row-v51:hover,
html[data-theme="dark"] .notification-item-v51:hover {
  background: rgba(30,41,59,.9);
  border-color: #475569;
}

html[data-theme="dark"] .notification-close-v51 {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

html[data-theme="dark"] .notification-dot-v51 {
  border-color: #0a1322;
}

@media (max-width: 1150px) {
  .live-workspace-v51 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .activity-row-v51,
  .notification-item-v51 {
    grid-template-columns: auto 1fr;
  }

  .activity-time-v51,
  .notification-action-v51 {
    grid-column: 2;
  }

  .notification-drawer-v51 {
    top: 64px;
    right: 12px;
    width: calc(100vw - 24px);
  }
}
