/*
 * FornitureitcTheme — ordine-rapido.css (redesign 2026, Fase 5)
 * Pagina /ordine-rapido/ (page-ordine-rapido.php).
 * Pulsanti e token in layout.css / style.css.
 */

.qo { padding-top: 8px; }

/* Testata */
.qo-head { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-width: 760px; }
.qo-head__eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.qo-head h1 { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 800; }
.qo-head p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* Layout: form + aiuto */
.qo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

/* Form */
.qo-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.qo-form__field { display: flex; flex-direction: column; gap: 8px; }
.qo-form__field label { font-size: 14px; font-weight: 600; }
.qo-form textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line-input);
  border-radius: var(--r);
  background: #FAFAF8;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
}
.qo-form textarea::placeholder { color: var(--placeholder); }
.qo-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); background: #fff; }
.qo-form textarea.is-drop { border: 2px dashed var(--brand); background: var(--brand-tint); }
.qo-form__hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.qo-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.qo-form__file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  cursor: pointer;
}
.qo-form__file:hover span { text-decoration: underline; }
.qo-form__file:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* Esito */
.qo-result:empty { display: none; }
.qo-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--ground);
  font-size: 14px;
  line-height: 1.5;
}
.qo-result.is-ok { background: var(--ok-bg); }
.qo-result.is-error { background: #FBE9EC; }
.qo-result p { margin: 0; }
.qo-result ul { margin: 0; padding-left: 18px; list-style: disc; }

.qo-table {
  margin: 0 -16px -14px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r) var(--r);
  overflow: hidden;
}
.qo-table__head,
.qo-table__row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 130px 56px 140px;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
}
.qo-table__head {
  background: #FAFAF8;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.qo-table__row { border-bottom: 1px solid var(--line-soft); }
.qo-table__row:last-child { border-bottom: 0; }
.qo-table__code { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.qo-table__prod { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qo-table__prod img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; border-radius: 6px; background: var(--img-bg); mix-blend-mode: multiply; }
.qo-table__prod > span { display: flex; flex-direction: column; min-width: 0; }
.qo-table__prod a { color: var(--ink); font-weight: 500; line-height: 1.35; }
.qo-table__prod small { font-size: 12px; color: var(--muted); }
.qo-table__prod em { color: var(--muted); }
.qo-table__price .amount { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.qo-table__price del { display: none; }
.qo-table__price ins { text-decoration: none; }
.qo-table__price .price-iva { display: block; font-size: 11px; color: var(--muted); }
.qo-table__price .fit-pr-badge { display: none; }
.qo-table__qty { text-align: center; font-family: var(--font-mono); }
.qo-table__esito { font-size: 13px; font-weight: 600; color: var(--ok); }
.qo-table__row.is-ko { background: #FFF8F8; }
.qo-table__row.is-ko .qo-table__esito { color: var(--sale); }
.is-center { text-align: center; }

/* Aiuto */
.qo-help {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--ground-2);
  border-radius: var(--r-lg);
}
.qo-help h2 { margin: 0; font-size: 20px; font-weight: 700; }
.qo-help ol { margin: 0; padding-left: 20px; list-style: decimal; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.qo-help ol strong { color: var(--ink); }
.qo-help__label { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qo-help pre {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.qo-help__dl { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; }
.qo-help__note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* Ospiti */
.qo-locked {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin-top: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.qo-locked__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
}
.qo-locked__txt { display: flex; flex-direction: column; gap: 6px; }
.qo-locked__txt strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.qo-locked__txt span { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.qo-locked__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Mobile e tablet */
@media (max-width: 1024px) {
  .qo-head h1 { font-size: 28px; }
  .qo-head p { font-size: 14px; }
  .qo-layout { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .qo-form, .qo-help, .qo-locked { padding: 18px; border-radius: var(--r-md); }
  .qo-form textarea { min-height: 200px; font-size: 16px; }
  .qo-form__actions .fit-btn { flex: 1 1 100%; }
  .qo-form__file { margin-left: 0; }
  .qo-locked__cta .fit-btn { flex: 1 1 auto; }

  .qo-table__head { display: none; }
  .qo-table__row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "prod  prod"
      "code  qty"
      "price esito";
    gap: 6px 12px;
    padding: 12px 16px;
  }
  .qo-table__prod  { grid-area: prod; }
  .qo-table__code  { grid-area: code; }
  .qo-table__qty   { grid-area: qty; text-align: right; }
  .qo-table__qty::before { content: 'Q.tà '; font-family: var(--font-body); color: var(--muted); font-size: 12px; }
  .qo-table__price { grid-area: price; }
  .qo-table__esito { grid-area: esito; text-align: right; }
}
