/* Project Dynasty notification settings surface.
   Loaded only by the public site. Uses the shell tokens so it follows the
   active light/dark theme. Owner Desk is untouched. */

.pd-notify {
  position: fixed;
  inset: calc(var(--pd-shell-h, 54px) + env(safe-area-inset-top)) 0 0 0;
  z-index: 2147481800;
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--pd-shell-bg-top, #fbfbfc);
  color: var(--pd-shell-ink, #18181b);
  -webkit-overflow-scrolling: touch;
}

body.pd-notify-open .pd-notify {
  display: block;
}

body.pd-notify-open {
  overflow: hidden;
}

.pd-notify-inner {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 22px 18px calc(96px + env(safe-area-inset-bottom));
}

.pd-notify-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}

.pd-notify-head h1 {
  margin: 0;
  font: 1000 24px/1.1 var(--pd-font-display, inherit);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pd-notify-head p {
  margin: 8px 0 0;
  color: var(--pd-shell-dim, #565660);
  font-size: 13px;
  line-height: 1.45;
  max-width: 46ch;
}

.pd-notify-close {
  flex: none;
  border: 1px solid var(--pd-shell-line-strong, rgba(24, 24, 27, 0.16));
  background: var(--pd-shell-panel, #fff);
  color: inherit;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.pd-notify-card {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--pd-shell-line, rgba(24, 24, 27, 0.1));
  border-radius: 16px;
  background: var(--pd-shell-panel, #fff);
  box-shadow: var(--pd-shell-raise, none);
}

.pd-notify-card > h2 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pd-shell-dim, #565660);
}

.pd-notify-card > p {
  margin: 6px 0 0;
  color: var(--pd-shell-dim, #565660);
  font-size: 13px;
  line-height: 1.5;
}

.pd-notify-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--pd-shell-line, rgba(24, 24, 27, 0.1));
}

.pd-notify-row:first-of-type {
  border-top: 0;
}

.pd-notify-row .pd-notify-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.pd-notify-row .pd-notify-copy span {
  display: block;
  margin-top: 3px;
  color: var(--pd-shell-dim, #565660);
  font-size: 12.5px;
  line-height: 1.4;
}

.pd-notify-switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--pd-shell-line-strong, rgba(24, 24, 27, 0.16));
  background: color-mix(in srgb, var(--pd-shell-ink, #18181b) 8%, transparent);
  cursor: pointer;
  transition: background 0.15s ease;
}

.pd-notify-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--pd-shell-thumb, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.pd-notify-switch[aria-checked="true"] {
  background: var(--pd-shell-accent, #a87b16);
}

.pd-notify-switch[aria-checked="true"]::after {
  transform: translateX(18px);
}

.pd-notify-switch:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pd-notify-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pd-notify-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--pd-shell-line-strong, rgba(24, 24, 27, 0.16));
  background: var(--pd-shell-panel, #fff);
  color: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.pd-notify-btn.is-primary {
  border-color: transparent;
  background: var(--pd-shell-accent, #a87b16);
  color: var(--pd-shell-accent-ink, #18181b);
}

.pd-notify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pd-notify-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px dashed var(--pd-shell-line-strong, rgba(24, 24, 27, 0.16));
  color: var(--pd-shell-dim, #565660);
  font-size: 12.5px;
  line-height: 1.5;
}

.pd-notify-note strong {
  color: var(--pd-shell-ink, #18181b);
}

.pd-notify-device {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--pd-shell-line, rgba(24, 24, 27, 0.1));
  font-size: 13px;
}

.pd-notify-device:first-of-type {
  border-top: 0;
}

.pd-notify-device .is-dim {
  color: var(--pd-shell-dim, #565660);
  font-size: 12px;
}

.pd-notify-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--pd-shell-accent, #a87b16);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.pd-notify-quiet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.pd-notify-quiet-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pd-shell-dim, #565660);
}

.pd-notify-quiet-grid select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--pd-shell-line-strong, rgba(24, 24, 27, 0.16));
  background: var(--pd-shell-panel, #fff);
  color: inherit;
  font-size: 14px;
  padding: 0 10px;
}

.pd-notify-status {
  margin-top: 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pd-shell-dim, #565660);
}

.pd-notify-status.is-ok {
  color: #1d8a4a;
}

.pd-notify-status.is-error {
  color: #c8202f;
}

.pd-notify-signedout .pd-notify-card {
  text-align: left;
}

.pd-notify-empty {
  margin-top: 12px;
  color: var(--pd-shell-dim, #565660);
  font-size: 13px;
}

@media (max-width: 430px) {
  .pd-notify-inner {
    padding: 18px 14px calc(120px + env(safe-area-inset-bottom));
  }
  .pd-notify-head h1 {
    font-size: 21px;
  }
}
