/* Bulk Order Form (Pages/Consignment.cshtml). Scoped to #hiller-consign; the class and element
   names match what js/hiller-consign.js builds (.item-row, .muted, .danger, .success, .error, #spinner). */

#hiller-consign { max-width: 980px; margin: 0 auto; }
#hiller-consign .card { padding: 24px; }
#hiller-consign label { display: block; margin-top: 12px; }
#hiller-consign textarea { min-height: 100px; }

#hiller-consign .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
#hiller-consign .row > * { width: auto; max-width: none; padding: 0; margin: 0; }

#hiller-consign .items { margin-top: 20px; }
#hiller-consign .item-row {
  display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.2fr auto; gap: 10px; align-items: center;
  padding: 10px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-muted);
}
#hiller-consign .item-row > div:not(.muted) { font-weight: 600; text-align: right; }

#hiller-consign .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#hiller-consign .vendor-gate { max-width: 640px; margin: 24px auto; }
#hiller-consign .vendor-gate h1 { font-size: 1.6rem; }
#hiller-consign .inline { display: flex; align-items: center; gap: 10px; }
#hiller-consign .total-line { text-align: right; font-weight: 700; margin-top: 12px; }
#hiller-consign .pricing-note { margin: 4px 0 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--brand-soft); color: #0c4a6e; font-size: .95rem; }
#hiller-consign .order-totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; max-width: 460px; margin: 16px 0 0 auto; }
#hiller-consign .order-totals dt { font-weight: 600; text-align: right; }
#hiller-consign .order-totals dt span { font-weight: 400; color: var(--muted); font-size: .9rem; }
#hiller-consign .order-totals dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
#hiller-consign .order-totals .due { font-size: 1.2rem; font-weight: 700; padding-top: 6px; border-top: 2px solid var(--border); }
#hiller-consign .order-totals dd.due { color: var(--brand); }
#hiller-consign label.terms-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-muted); font-weight: 500; }
#hiller-consign label.terms-check input { width: auto; margin-top: 4px; flex: none; }
#hiller-consign .footnote { color: var(--muted); font-size: .9rem; margin-top: 8px; text-align: right; }

#hiller-consign .success, #hiller-consign .error { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid; }
#hiller-consign .success { background: var(--success-bg); border-color: #bbf7d0; color: #14532d; }
#hiller-consign .error { background: var(--danger-bg); border-color: #fecaca; color: #7f1d1d; }

#hiller-consign .spinner {
  display: none; width: 18px; height: 18px; border: 3px solid rgba(15, 23, 42, .13); border-top-color: var(--brand);
  border-radius: 50%; animation: hiller-consign-spin .8s linear infinite;
}
@keyframes hiller-consign-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  #hiller-consign .card { padding: 16px; }
  #hiller-consign .row { grid-template-columns: 1fr; gap: 0; }
  /* Item rows: product on its own line, then quantity / price / line total, then Remove. */
  #hiller-consign .item-row { grid-template-columns: 1fr 1fr 1fr; }
  #hiller-consign .item-row > select { grid-column: 1 / -1; }
  #hiller-consign .item-row > button { grid-column: 1 / -1; justify-content: center; }
}

@media print {
  #hiller-consign .actions, #hiller-consign .item-row > button, #hiller-consign .terms-check { display: none !important; }
  #hiller-consign .card { border: 0; padding: 0; }
}
