/*
 * Dialog and form primitives shared by the Nightz Command and Nightz Prism
 * pages. Everything is namespaced .nd-* and nothing here targets an existing
 * dashboard class, so loading this file changes nothing about the current look.
 *
 * These rules are deliberately NOT scoped to a skin: confirmation dialogs are
 * mounted on document.body by uiOpenModal and have to read correctly whichever
 * skin (or no skin) is active.
 */

/* Sidebar skin picker. Sits under the existing theme toggle in the footer. */
.skin-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0.875rem 0.25rem;
}

.skin-picker-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary, #6b7280);
}

.skin-picker-select {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 11.5px;
  color: var(--text-secondary, #9aa3b2);
  background: var(--bg-input, rgba(10, 11, 16, 0.7));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 5px;
  padding: 4px 6px;
  cursor: pointer;
}

.skin-picker-select:hover {
  color: var(--text-primary, #e6e9ef);
}

.skin-picker-select:focus-visible {
  outline: 2px solid var(--nd-blue, #3b82f6);
  outline-offset: 1px;
}

.nd-confirm-msg {
  font-size: 14px;
  line-height: 1.55;
  color: #e6ecf8;
  margin: 0;
}

.nd-confirm-detail {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #93a1bd;
  padding: 9px 11px;
  border-left: 2px solid rgba(255, 92, 108, 0.5);
  background: rgba(255, 92, 108, 0.07);
  border-radius: 0 4px 4px 0;
}

.nd-modal-intro {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #93a1bd;
}

.nd-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nd-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nd-modal-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d8aa6;
}

.nd-modal-input {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: #e6ecf8;
  background: #070a12;
  border: 1px solid rgba(148, 173, 255, 0.2);
  border-radius: 5px;
  padding: 8px 10px;
  resize: vertical;
}

.nd-modal-input:focus-visible {
  outline: 2px solid #4d9fff;
  outline-offset: 1px;
  border-color: transparent;
}

.nd-modal-hint {
  font-size: 11px;
  color: #6b7794;
  line-height: 1.45;
}

.nd-modal-error {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #ff8b96;
}

.nd-modal-error[hidden] {
  display: none;
}

.nd-modal-btn {
  appearance: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e8;
  background: rgba(148, 173, 255, 0.08);
  border: 1px solid rgba(148, 173, 255, 0.22);
  border-radius: 5px;
  padding: 8px 15px;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.nd-modal-btn:hover {
  background: rgba(148, 173, 255, 0.15);
  color: #fff;
}

.nd-modal-btn:focus-visible {
  outline: 2px solid #4d9fff;
  outline-offset: 2px;
}

.nd-modal-btn.is-accent {
  color: #9fc9ff;
  background: rgba(77, 159, 255, 0.14);
  border-color: rgba(77, 159, 255, 0.45);
}

.nd-modal-btn.is-accent:hover {
  background: rgba(77, 159, 255, 0.24);
  color: #fff;
}

.nd-modal-btn.is-crit {
  color: #ff8b96;
  background: rgba(255, 92, 108, 0.14);
  border-color: rgba(255, 92, 108, 0.45);
}

.nd-modal-btn.is-crit:hover {
  background: rgba(255, 92, 108, 0.24);
  color: #fff;
}

.nd-modal-btn.is-warn {
  color: #ffc14d;
  background: rgba(255, 193, 77, 0.14);
  border-color: rgba(255, 193, 77, 0.45);
}

.nd-modal-btn.is-warn:hover {
  background: rgba(255, 193, 77, 0.24);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .nd-modal-btn {
    transition-duration: 0ms;
  }
}

/* ── Design preview gallery ────────────────────────────────────────────── *
 * Skin neutral: this page renders under whichever skin is active, so it
 * leans on the shared theme tokens rather than either skin's palette.
 */

.ndp {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1400px;
}

.ndp-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary, #e6e9ef);
  margin: 0;
}

.ndp-lede {
  margin: 0.5rem 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary, #9aa3b2);
  max-width: 80ch;
}

.ndp-family {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ndp-family-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-secondary, #60a5fa);
  margin: 0;
}

.ndp-family-blurb {
  margin: 0.4rem 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary, #9aa3b2);
  max-width: 80ch;
}

.ndp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.ndp-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card, rgba(20, 22, 30, 0.6));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
  border-radius: 10px;
  min-width: 0;
}

.ndp-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #e6e9ef);
}

.ndp-card-summary {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary, #9aa3b2);
  flex: 1;
}

.ndp-card-reads {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-tertiary, #6b7280);
}

.ndp-card-reads-k {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 9.5px;
  margin-right: 4px;
}

.ndp-open {
  align-self: flex-start;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-secondary, #60a5fa);
  background: var(--accent-soft, rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 6px;
  padding: 7px 13px;
  cursor: pointer;
  text-align: left;
  transition:
    background 150ms ease,
    color 150ms ease;
}

.ndp-open:hover {
  background: rgba(96, 165, 250, 0.22);
  color: #fff;
}

.ndp-open:focus-visible {
  outline: 2px solid var(--accent-secondary, #60a5fa);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ndp-open {
    transition-duration: 0ms;
  }
}
