/* Hoshin Enquiry. Override the --he-* tokens from the theme to restyle. */
.he, .he-success, .he-toast {
  --he-navy: #063970;
  --he-navy-d: #05264b;
  --he-ink: #0d1b2a;
  --he-muted: #64748b;
  --he-line: #cbd5e1;
  --he-soft: #f3f4f6;
  --he-error: #b42318;
  --he-ok: #166534;
  box-sizing: border-box;
  color: var(--he-ink);
  font-family: inherit;
}
.he *, .he *::before, .he *::after { box-sizing: inherit; }
.he [hidden] { display: none !important; }

.he h2 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 20px; color: inherit; }
.he h3 { font-size: 1.15rem; margin: 0 0 16px; color: inherit; }

/* Fields */
.he-form, .he-rfq { container-type: inline-size; }
.he-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.he-field { margin: 0 0 20px; min-width: 0; }
.he-label { display: block; margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.he-input {
  display: block; width: 100%; min-height: 48px; padding: 0 16px; margin: 0;
  font: inherit; font-size: 15px; color: inherit; background: #fff;
  border: 1.5px solid var(--he-line); border-radius: 8px; transition: border-color .2s, box-shadow .2s;
}
.he-textarea { min-height: 130px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.he-file { padding: 11px 16px; }
.he-input:focus { outline: none; border-color: var(--he-navy); box-shadow: 0 0 0 3px rgba(6, 57, 112, .12); }
.he-input.has-error { border-color: var(--he-error); }
.he-hint { margin: 6px 0 0; font-size: 12.5px; color: var(--he-muted); }
.he-error, .he-form-error { margin: 6px 0 0; font-size: 13px; color: var(--he-error); }
.he-form-error { margin: 0 0 16px; font-weight: 600; }
.he-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.he-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.he-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--he-navy); border: 1px solid var(--he-navy); border-radius: 999px; transition: background .25s, color .25s;
}
.he-btn:hover, .he-btn:focus-visible { color: #fff; background: var(--he-navy-d); }
.he-btn[disabled] { opacity: .65; cursor: progress; }
.he-btn--line { color: var(--he-ink); background: transparent; border-color: rgba(13, 27, 42, .25); }
.he-btn--line:hover, .he-btn--line:focus-visible { color: #fff; background: var(--he-navy); }
.he-form > .he-btn { width: 100%; }
.he-link { padding: 0; font: inherit; font-size: 14px; color: var(--he-muted); text-decoration: underline; background: none; border: 0; cursor: pointer; }
.he-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* RFQ */
.he-rfq__layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.he-rfq__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.he-rfq__side { position: sticky; top: 110px; display: grid; gap: 16px; }
.he-table-wrap { margin: 0 0 40px; overflow-x: auto; border: 1px solid var(--he-line); border-radius: 12px; }
.he-table { width: 100%; margin: 0; border-collapse: collapse; }
.he-table th { padding: 12px 16px; font-size: 12.5px; font-weight: 600; text-align: left; color: var(--he-muted); background: var(--he-soft); border: 0; }
.he-table td { padding: 14px 16px; vertical-align: middle; border: 0; border-top: 1px solid var(--he-line); }
.he-item { display: flex; align-items: center; gap: 14px; min-width: 180px; }
.he-item img { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.he-item__name { font-weight: 600; }
.he-item__part { margin-top: 2px; font-size: 13px; color: var(--he-muted); }
.he-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--he-line); border-radius: 8px; overflow: hidden; }
.he-qty__btn, .he-remove { width: 36px; height: 36px; padding: 0; font-size: 18px; line-height: 1; color: inherit; background: none; border: 0; cursor: pointer; }
.he-qty__btn:hover { background: var(--he-soft); }
.he-qty input { width: 56px; height: 36px; padding: 0; font: inherit; text-align: center; background: none; border: 0; -moz-appearance: textfield; appearance: textfield; }
.he-qty input::-webkit-inner-spin-button, .he-qty input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.he-remove { font-size: 22px; color: var(--he-muted); border-radius: 8px; }
.he-remove:hover { color: var(--he-error); background: var(--he-soft); }
.he-panel { padding: 24px; background: var(--he-soft); border-radius: 12px; }
.he-panel p { margin: 0 0 14px; font-size: 15px; }
.he-panel .he-btn { width: 100%; padding: 0 12px; }
.he-panel__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; border-top: 1px solid var(--he-line); }
.he-empty { padding: 48px 32px; text-align: center; background: var(--he-soft); border-radius: 12px; }
.he-empty p { margin: 0 0 24px; color: var(--he-muted); }
.he-empty .he-actions { justify-content: center; }

/* Messages */
.he-success { padding: 18px 22px; margin: 0 0 24px; font-weight: 600; color: var(--he-ok); background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; }
.he-success:focus { outline: none; }
.he-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 99999; display: flex; flex-wrap: wrap; gap: 8px 14px; max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px; font-size: 14px; color: #fff; background: var(--he-navy-d); border-radius: 12px; box-shadow: 0 12px 32px rgba(13, 27, 42, .25);
}
.he-toast a { font-weight: 600; color: #fff; text-decoration: underline; }

/* Container queries: the shortcode can sit in a column much narrower than the screen. */
@container (max-width: 860px) {
  .he-rfq__layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .he-rfq__side { position: static; }
}
@container (max-width: 480px) {
  .he-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .he-table th, .he-table td { padding: 12px 10px; }
  .he-item img { display: none; }
  .he-item { min-width: 120px; }
  .he-qty__btn { width: 30px; }
  .he-qty input { width: 40px; }
  .he-empty { padding: 36px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .he-input, .he-btn { transition: none; }
}
