/* ==========================================================================
   order.css: page A-04 · online order / quick order composer
   (loaded in this order: sections, materials, delivery, order, why, find)
   ========================================================================== */

/* ---------- A-04 · online order: the bill of materials ---------- */
.order__grid { display: grid; gap: clamp(36px, 5vw, 80px); padding-top: clamp(40px, 6.4vw, 104px); }
.order__intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 2.4vw, 28px); justify-items: start; align-content: start; }
.stamp { padding: 4px; border: 2px solid var(--gold-text); color: var(--gold-text); transform: rotate(-5deg); transform-origin: 0 100%; margin-bottom: 6px; }
.stamp__in { display: block; padding: 9px 18px 8px; border: 1px solid currentColor; font: 750 clamp(1rem, .8rem + .9vw, 1.5rem)/1 var(--font-display); font-stretch: 90%; letter-spacing: .16em; text-transform: uppercase; }
html.js-ready .stamp[data-reveal] { transform: rotate(-5deg) scale(1.5); }
html.js-ready .stamp[data-reveal].is-in { transform: rotate(-5deg); transition: opacity .25s, transform .45s cubic-bezier(.3, 1.4, .5, 1); }

.bom { position: relative; background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: 8px 8px 0 var(--line-3); }
.bom__strip { display: flex; align-items: stretch; min-height: 44px; border-bottom: 1px solid var(--line-2); font: 500 var(--fs-ann)/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.bom__strip > * { display: flex; align-items: center; padding-inline: 14px; }
.bom__code { background: var(--ink); color: var(--bg-2); letter-spacing: .08em; white-space: nowrap; }
.bom__title { font: 650 .8125rem/1.1 var(--font-display); font-stretch: 92%; letter-spacing: .08em; color: var(--ink); }
.bom__kind { display: none !important; border-left: 1px solid var(--line); white-space: nowrap; }
.bom__body { display: grid; padding: 16px 14px 18px; }
.bom__label { margin: 4px 0 10px; font-weight: 600; font-size: .9375rem; }
.bom__paper { position: relative; border: 1px solid var(--line-2); background: var(--bg); }
.bom__paper:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.bom__paper.is-invalid { outline: 2px solid var(--gold-line); outline-offset: 2px; }
.bom__nums { position: absolute; left: 0; top: 0; bottom: 0; width: 38px; display: grid; grid-auto-rows: 36px; border-right: 1px solid var(--gold-line); overflow: hidden; }
.bom__nums i { display: grid; place-items: center; font: 500 var(--fs-ann)/1 var(--font-mono); font-style: normal; letter-spacing: .04em; color: var(--ink-2); }
.bom__paper textarea {
  display: block; width: 100%; min-height: 216px; padding: 0 10px 0 48px; border: 0; border-radius: 0; resize: none; overflow: hidden;
  background: repeating-linear-gradient(to bottom, transparent 0 35px, var(--line) 35px 36px); line-height: 36px; font-size: 1rem; color: var(--ink);
}
.bom__paper textarea:focus { outline: none; }
.bom :is(textarea, input)::placeholder { color: var(--ink-2); opacity: 1; }
.bom__paper textarea::placeholder { font-size: .9375rem; letter-spacing: -.01em; }
.bom__err { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-size: .875rem; font-weight: 600; color: var(--gold-text); }
.bom__err::before { content: ""; width: 10px; height: 9px; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); flex: none; }
.bom__label[for="order-address"] { margin-top: 22px; margin-bottom: 0; }
.bom__input { width: 100%; height: 48px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; font-size: 1rem; }
.bom__input:focus-visible { outline-offset: 4px; }
/* the browser's autofill must not paint its own colours on the sheet */
.bom :is(input, textarea):-webkit-autofill { -webkit-text-fill-color: var(--ink); box-shadow: 0 0 0 100px var(--bg-2) inset; caret-color: var(--ink); }
.bom__via { margin: 26px 0 10px; color: var(--ink); }
.bom__send { display: grid; gap: 8px; }
.bom__send .btn { min-height: 54px; padding-inline: 16px; gap: 12px; }
.bom__send .ico { width: 20px; height: 20px; flex: none; }
.bom__send .btn__arr--out { width: 11px; height: 11px; }
.bom__call { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin-top: 14px; }
.bom__or { color: var(--ink-2); }
.bom__tel { display: inline-flex; align-items: center; min-height: 44px; font: 500 1.375rem/1 var(--font-mono); letter-spacing: .01em; }
.bom__tel span {
  padding: 4px 0 8px;
  background:
    linear-gradient(currentColor, currentColor) 0 calc(100% - 3px) / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 1px 7px no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 1px 7px no-repeat;
}
.bom__hint { margin-top: 8px; }

@media (min-width: 400px) {
  .bom__body { padding: clamp(18px, 2.6vw, 34px); }
  .bom__nums { width: 44px; }
  .bom__paper textarea { padding: 0 14px 0 58px; }
  .bom__paper textarea::placeholder { font-size: 1rem; letter-spacing: 0; }
}
@media (min-width: 560px) {
  .bom__kind { display: flex !important; }
  .bom__send { grid-template-columns: 1.5fr 1fr; }
}
@media (min-width: 900px) {
  .order__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .order__intro { position: sticky; top: calc(var(--hdr) + 40px); }
}
