/* ============================================================
   SERVIQ NOTIFICATIONS
============================================================ */

.notification-center {
  position: relative;
}

.notification-trigger {
  position: relative;
}

.notification-trigger svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
}

.notification-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(21, 27, 23, 0.16);
}

.notification-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}

.notification-popover-head small,
.notification-popover-head strong {
  display: block;
}

.notification-popover-head small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.notification-popover-head strong {
  margin-top: 2px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
}

.notification-mark-all {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.notification-list {
  max-height: 420px;
  overflow-y: auto;
}

.notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid #eef1ee;
  color: inherit;
  text-decoration: none;
}

.notification-item:hover {
  background: #fafbf9;
}

.notification-item.unread {
  background: #f7fbf9;
}

.notification-severity {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: #a5ada8;
}

.notification-severity.success {
  background: var(--green);
}

.notification-severity.warning {
  background: var(--amber);
}

.notification-severity.urgent {
  background: var(--danger);
}

.notification-item-copy {
  min-width: 0;
}

.notification-item-copy strong,
.notification-item-copy span,
.notification-item-copy small {
  display: block;
}

.notification-item-copy strong {
  color: #263029;
  font-size: 10px;
}

.notification-item-copy span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item-copy small {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8px;
}

.notification-empty {
  padding: 32px 16px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}

.notification-popover-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  background: #fafbf9;
}

.notification-popover-foot a {
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

/* Full page */

.notification-page {
  padding: 34px;
}

.notification-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.notification-page-head h1 {
  margin: 5px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 28px;
}

.notification-page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.notification-settings-link,
.notification-back {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.notification-back {
  display: inline-block;
  margin-bottom: 14px;
}

.notification-page-card,
.notification-settings-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}

.notification-page-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 15px 17px;
  border-bottom: 1px solid #eef1ee;
  color: inherit;
  text-decoration: none;
}

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

.notification-page-item.unread {
  background: #f7fbf9;
}

.notification-page-copy strong,
.notification-page-copy span,
.notification-page-copy small {
  display: block;
}

.notification-page-copy strong {
  font-size: 11px;
}

.notification-page-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.notification-page-copy small {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8px;
}

.notification-unread-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.notification-page-empty {
  padding: 48px 20px;
  text-align: center;
}

.notification-page-empty strong {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.notification-page-empty p {
  max-width: 520px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

/* Preferences */

.notification-preferences-form {
  max-width: 900px;
}

.notification-settings-card {
  margin-bottom: 14px;
}

.notification-settings-title {
  padding: 16px 17px 10px;
}

.notification-settings-title h2 {
  margin: 4px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.notification-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 13px 17px;
  border-top: 1px solid #eef1ee;
}

.notification-settings-row:first-child {
  border-top: 0;
}

.notification-settings-row strong,
.notification-settings-row small {
  display: block;
}

.notification-settings-row strong {
  font-size: 10px;
}

.notification-settings-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.notification-settings-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.notification-savebar {
  display: flex;
  gap: 9px;
}

.notification-savebar button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.notification-savebar .primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.notification-savebar .secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #4a554e;
}

@media (max-width: 700px) {
  .notification-page {
    padding: 20px 14px 34px;
  }

  .notification-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-popover {
    position: fixed;
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .notification-savebar {
    flex-direction: column;
  }

  .notification-savebar button {
    width: 100%;
  }
}


/* ============================================================
   SERVIQ SOUND SYSTEM
============================================================ */

.notification-settings-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.notification-volume-row {
  align-items: center;
}

.notification-volume-control {
  min-width: 250px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 44px;
  align-items: center;
  gap: 12px;
}

.notification-volume-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.notification-volume-control strong {
  color: var(--accent);
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  text-align: right;
}

.notification-sound-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1fr)
    minmax(150px, 190px)
    92px
    24px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 13px 17px;
  border-top: 1px solid #eef1ee;
}

.notification-sound-copy strong,
.notification-sound-copy small {
  display: block;
}

.notification-sound-copy strong {
  font-size: 10px;
}

.notification-sound-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.notification-sound-row select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  color: #3e4841;
  font-size: 9px;
}

.notification-preview-button {
  height: 36px;
  padding: 0 11px;
  border: 1px solid #d9e2dd;
  border-radius: 9px;
  background: #f8faf8;
  color: var(--accent);
  font-size: 8.5px;
  font-weight: 750;
  cursor: pointer;
}

.notification-preview-button:hover {
  border-color: #c9d8d1;
  background: var(--accent-soft);
}

.notification-audio-library {
  display: none;
}

@media (max-width: 760px) {
  .notification-volume-control {
    min-width: 0;
    width: 100%;
  }

  .notification-volume-row {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-sound-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy toggle"
      "select select"
      "preview preview";
  }

  .notification-sound-copy {
    grid-area: copy;
  }

  .notification-sound-row select {
    grid-area: select;
  }

  .notification-preview-button {
    grid-area: preview;
    width: 100%;
  }

  .notification-sound-row > input[type="checkbox"] {
    grid-area: toggle;
  }
}
