/* ============================================================
   Xeon NC — Custom Quote wizard
   Styles for the four-step request form built by custom-quote.js.

   The same markup is mounted in two places — the Sign In modal
   (dark panel, ~620px) and custom-quote.html (dark page, ~760px) —
   so everything here is dark-themed, namespaced under .cq-, and
   self-contained: no page-level custom properties are read, and
   box-sizing is restated because the pages disagree about it.
   ============================================================ */
.cq-root {
  --cq-bg: #111;
  --cq-bg-2: #171717;
  --cq-line: rgba(255, 255, 255, 0.14);
  --cq-line-soft: rgba(255, 255, 255, 0.08);
  --cq-ink: #fff;
  --cq-muted: #9aa0a8;
  --cq-dim: #6d737b;
  --cq-accent: #1a4fff;
  --cq-accent-hi: #3d69ff;
  --cq-ok: #22c55e;
  --cq-warn: #e0a200;
  --cq-err: #ef4444;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--cq-ink);
  background: var(--cq-bg);
  text-align: left;
}
.cq-root *,
.cq-root *::before,
.cq-root *::after { box-sizing: border-box; }
.cq-root p { margin: 0; }

/* ── step rail ── */
.cq-rail {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--cq-line);
  background: var(--cq-bg-2);
}
.cq-rail-step {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 8px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--cq-line-soft);
  color: var(--cq-dim);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: default;
  transition: color 0.2s, background 0.2s;
}
.cq-rail-step:last-child { border-right: none; }
.cq-rail-step[data-reachable='1'] { cursor: pointer; }
.cq-rail-step[data-reachable='1']:hover { color: var(--cq-muted); }
.cq-rail-num {
  flex: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0;
}
.cq-rail-step.cq-on { color: var(--cq-ink); background: rgba(26, 79, 255, 0.14); }
.cq-rail-step.cq-on .cq-rail-num { background: var(--cq-accent); border-color: var(--cq-accent); color: #fff; }
.cq-rail-step.cq-done { color: var(--cq-muted); }
.cq-rail-step.cq-done .cq-rail-num { border-color: var(--cq-ok); color: var(--cq-ok); }
/* the label is the only thing that can be dropped on a narrow rail —
   the numbered pip still says where you are */
@media (max-width: 560px) {
  .cq-rail-label { display: none; }
  .cq-rail-step { padding: 12px 4px; }
}

/* ── step body ── */
.cq-step { padding: 22px 24px 6px; }
.cq-step-head { margin-bottom: 18px; }
.cq-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cq-dim);
  margin-bottom: 7px;
}
.cq-h {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--cq-ink);
  margin-bottom: 6px;
}
.cq-sub {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--cq-muted);
}

/* ── fields ── */
.cq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cq-grid > .cq-wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .cq-grid { grid-template-columns: 1fr; } }

.cq-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cq-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cq-muted);
}
.cq-opt {
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--cq-dim);
}
.cq-input,
.cq-select,
.cq-textarea {
  width: 100%;
  padding: 11px 12px;
  background: #0b0b0b;
  border: 1px solid var(--cq-line);
  border-radius: 0;
  color: var(--cq-ink);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color 0.18s, background 0.18s;
  -webkit-appearance: none;
  appearance: none;
}
.cq-textarea { min-height: 104px; resize: vertical; }
.cq-select {
  /* the caret has to be drawn in, since appearance:none removed it */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa0a8' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.cq-select option { background: #0b0b0b; color: #fff; }
.cq-input::placeholder,
.cq-textarea::placeholder { color: #55595f; }
.cq-input:focus,
.cq-select:focus,
.cq-textarea:focus {
  outline: none;
  border-color: var(--cq-accent-hi);
  background: #0e0e0e;
}
.cq-field.cq-invalid .cq-input,
.cq-field.cq-invalid .cq-select,
.cq-field.cq-invalid .cq-textarea { border-color: var(--cq-err); }
.cq-note { font-size: 11px; line-height: 1.5; color: var(--cq-dim); }
.cq-err-msg { font-size: 11px; color: var(--cq-err); }

/* ── service chips (multi-select) ── */
.cq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cq-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  background: #0b0b0b;
  border: 1px solid var(--cq-line);
  color: var(--cq-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.cq-chip:hover { border-color: rgba(255, 255, 255, 0.32); color: var(--cq-ink); }
.cq-chip::before {
  content: '';
  flex: none;
  width: 13px;
  height: 13px;
  border: 1px solid currentColor;
  transition: background 0.18s, border-color 0.18s;
}
.cq-chip.cq-on {
  border-color: var(--cq-accent-hi);
  background: rgba(26, 79, 255, 0.16);
  color: var(--cq-ink);
}
.cq-chip.cq-on::before {
  background: var(--cq-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.4 2.4L9.6 4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
  border-color: var(--cq-accent);
}

/* ── checkbox rows ── */
.cq-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #0b0b0b;
  border: 1px solid var(--cq-line-soft);
  cursor: pointer;
}
.cq-check:hover { border-color: var(--cq-line); }
.cq-check input {
  flex: none;
  margin: 1px 0 0;
  width: 15px;
  height: 15px;
  accent-color: var(--cq-accent);
}
.cq-check-text { font-size: 12.5px; line-height: 1.5; color: var(--cq-muted); }
.cq-check-text strong { color: var(--cq-ink); font-weight: 600; }

/* ── dropzone + file list ── */
.cq-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  background: #0b0b0b;
  border: 1px dashed rgba(255, 255, 255, 0.24);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.cq-drop:hover,
.cq-drop:focus-visible { border-color: var(--cq-accent-hi); background: #0e0f14; outline: none; }
.cq-drop.cq-over { border-color: var(--cq-accent-hi); background: rgba(26, 79, 255, 0.12); }
.cq-drop svg { opacity: 0.55; }
.cq-drop-title { font-size: 14px; font-weight: 700; color: var(--cq-ink); }
.cq-drop-sub { font-size: 12px; color: var(--cq-muted); }
.cq-drop-formats {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--cq-dim);
}

.cq-files { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.cq-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  background: #0b0b0b;
  border: 1px solid var(--cq-line-soft);
}
.cq-file-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--cq-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cq-file-size {
  flex: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--cq-dim);
}
.cq-file-x {
  flex: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--cq-line-soft);
  color: var(--cq-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.cq-file-x:hover { color: var(--cq-err); border-color: var(--cq-err); }
.cq-meter {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--cq-dim);
}
.cq-meter.cq-over-limit { color: var(--cq-warn); }

/* ── review ── */
.cq-review { border: 1px solid var(--cq-line-soft); }
.cq-rev-sec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: var(--cq-bg-2);
  border-bottom: 1px solid var(--cq-line-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cq-muted);
}
.cq-rev-edit {
  background: none;
  border: none;
  padding: 0;
  color: var(--cq-accent-hi);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.cq-rev-edit:hover { text-decoration: underline; }
.cq-rev-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--cq-line-soft);
  font-size: 12.5px;
  line-height: 1.55;
}
.cq-rev-row:last-child { border-bottom: none; }
.cq-rev-k { color: var(--cq-dim); }
.cq-rev-v { color: var(--cq-ink); word-break: break-word; white-space: pre-wrap; }
.cq-rev-v.cq-empty { color: var(--cq-dim); }
@media (max-width: 560px) {
  .cq-rev-row { grid-template-columns: 1fr; gap: 3px; }
}

/* ── actions ── */
.cq-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 24px;
  background: var(--cq-bg);
  border-top: 1px solid var(--cq-line);
}
.cq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, opacity 0.18s;
}
.cq-next { background: var(--cq-accent); color: #fff; margin-left: auto; }
.cq-next:hover { background: var(--cq-accent-hi); }
.cq-back { background: transparent; border-color: var(--cq-line); color: var(--cq-muted); }
.cq-back:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--cq-ink); }
.cq-btn[disabled] { opacity: 0.55; cursor: default; }
.cq-btn[disabled]:hover { background: var(--cq-accent); }

.cq-legal {
  padding: 0 24px 18px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--cq-dim);
}
.cq-legal a { color: var(--cq-muted); }

/* ── result screens ── */
.cq-result { padding: 40px 28px; text-align: center; }
.cq-result-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: var(--cq-ok);
}
.cq-result.cq-failed .cq-result-mark { background: rgba(224, 162, 0, 0.14); color: var(--cq-warn); }
.cq-result-h { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 10px; }
.cq-result-p { font-size: 13px; line-height: 1.7; color: var(--cq-muted); max-width: 420px; margin: 0 auto; }
.cq-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}
.cq-result-actions .cq-next { margin-left: 0; }
/* the reason the POST failed — small, but it is the difference between
   "not deployed yet" and "Forms is off", which look identical otherwise */
.cq-diag {
  margin-top: 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cq-dim);
}

/* ── the spinner on the submit button ── */
.cq-spin {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cq-spin 0.7s linear infinite;
}
@keyframes cq-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .cq-spin { animation-duration: 2.4s; }
}
