/* ============================================================
   Live notification centre
   ============================================================ */

.notification-center {
  position: relative;
  flex-shrink: 0;
}

.notification-trigger {
  cursor: pointer;
}

.notification-badge[hidden] {
  display: none;
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
}

.notification-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid #e8edf4;
}

.notification-panel-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.2;
}

.notification-live-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
}

.notification-live-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
  content: "";
}

.notification-live-status.is-live::before {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.notification-live-status.has-warning::before {
  background: #f59e0b;
}

.notification-mark-read {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #0277bd;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.notification-mark-read:hover,
.notification-mark-read:focus-visible {
  color: #075985;
  text-decoration: underline;
}

.notification-list {
  max-height: min(450px, calc(100vh - 150px));
  overflow: auto;
}

.notification-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 140ms ease;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover,
.notification-item:focus-visible {
  background: #f8fafc;
  outline: none;
}

.notification-item.is-unread {
  background: #f0f9ff;
}

.notification-item.is-unread:hover,
.notification-item.is-unread:focus-visible {
  background: #e0f2fe;
}

.notification-item-icon {
  display: grid;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  place-items: center;
  background: #e0f2fe;
  color: #0277bd;
  font-size: 12px;
}

.notification-item-icon.type-staff {
  background: #f3e8ff;
  color: #7e22ce;
}

.notification-item-icon.type-finance,
.notification-item-icon.type-invoice {
  background: #dcfce7;
  color: #15803d;
}

.notification-item-icon.type-warning {
  background: #fef3c7;
  color: #b45309;
}

.notification-item-title {
  display: block;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.notification-item-message {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.4;
}

.notification-item-meta {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 10.5px;
}

.notification-empty {
  padding: 34px 20px;
  color: #64748b;
  text-align: center;
}

.notification-empty i {
  display: block;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 20px;
}

.notification-empty strong,
.notification-empty span {
  display: block;
}

.notification-empty strong {
  color: #334155;
  font-size: 13px;
}

.notification-empty span {
  margin-top: 4px;
  font-size: 11.5px;
}

@media (max-width: 600px) {
  .notification-panel {
    position: fixed;
    top: 62px;
    right: 14px;
  }
}
