/* ============================================================
   AEROSUPPLY — quote form and the product page dialog.

   The form itself reuses the homepage prototype classes (.form-grid, .field,
   .form-foot), which already live in aerosupply.css. This sheet only adds the
   two things the prototype never had: the honeypot field and the dialog.
   ============================================================ */

/* --- honeypot ---------------------------------------------------------
   Moved off screen rather than display:none: a bot that checks visibility
   skips hidden inputs, but it still fills one that is merely positioned
   away. Left in the tab order? No — tabindex="-1" in the markup. */
.as-hp{
  position:absolute!important;left:-9999px;top:auto;
  width:1px;height:1px;overflow:hidden;pointer-events:none;
}

/* --- form inside the dialog ------------------------------------------
   The homepage column is ~520px wide, the dialog is wider; at 2 columns the
   dialog fields would stretch, so they are capped and the panel is what
   grows. */
.as-qmodal .as-qform .form-grid{gap:16px 18px}
.as-qmodal .as-qform .form-foot{padding-top:18px;margin-top:18px;border-top:1px solid var(--line-2)}
.as-qmodal .as-qform .form-note{max-width:30ch}

/* --- dialog ----------------------------------------------------------- */
.as-qmodal{
  position:fixed;inset:0;z-index:220;
  display:flex;align-items:center;justify-content:center;
  padding:clamp(16px,4vw,56px);
}
.as-qmodal[hidden]{display:none}

.as-qmodal-veil{
  position:absolute;inset:0;background:rgba(14,15,16,.52);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
  animation:asq-veil .24s var(--ease);
}
.as-qmodal-panel{
  position:relative;width:100%;max-width:760px;
  max-height:calc(100vh - 2 * clamp(16px,4vw,56px));
  overflow:auto;overscroll-behavior:contain;
  background:#fff;border:1px solid var(--line);
  box-shadow:0 42px 90px rgba(14,15,16,.3);
  padding:clamp(24px,3vw,40px);
  animation:asq-rise .32s var(--ease);
}

.as-qmodal-x{
  position:absolute;top:14px;right:14px;width:34px;height:34px;
  display:grid;place-items:center;color:var(--ink);
  background:transparent;border:1px solid transparent;cursor:pointer;
  transition:background .2s,border-color .2s;
}
.as-qmodal-x:hover{background:var(--mist);border-color:var(--line)}
.as-qmodal-x svg{width:16px;height:16px}
.as-qmodal-x:focus-visible{outline:2px solid var(--ink);outline-offset:2px}

.as-qmodal-head{padding-right:44px;margin-bottom:clamp(18px,2.2vw,26px)}
.as-qmodal-eyebrow{
  display:inline-flex;align-items:center;gap:9px;
  font-size:10.5px;font-weight:600;letter-spacing:.04em;color:var(--muted);
}
.as-qmodal-eyebrow i{display:block;width:16px;height:1px;background:var(--accent)}
.as-qmodal-title{
  margin:12px 0 0;font-size:calc(var(--h-scale, 1) * clamp(21px,2.3vw,29px));font-weight:500;
  line-height:1.24;letter-spacing:-.015em;color:var(--ink);
}
.as-qmodal-prod{
  display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap;
  margin:14px 0 0;padding:7px 12px;background:var(--mist);
  font-size:12.5px;color:var(--ink-2);
}
.as-qmodal-prod span{
  font-size:11px;letter-spacing:.06em;color:var(--muted);
}

/* The page behind must not scroll while the dialog owns the viewport. */
body.as-qmodal-open{overflow:hidden}

@keyframes asq-veil{from{opacity:0}to{opacity:1}}
@keyframes asq-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  .as-qmodal-veil,.as-qmodal-panel{animation:none}
}

/* --- small screens ----------------------------------------------------
   Below 640px the dialog becomes a bottom sheet: a centred card with a 90vh
   cap leaves a sliver of page visible at both ends and scrolls awkwardly with
   the mobile keyboard open. */
@media (max-width:640px){
  .as-qmodal{padding:0;align-items:flex-end}
  .as-qmodal-panel{
    max-width:none;max-height:93vh;
    border:0;border-top:1px solid var(--line);
    padding:22px 20px 26px;
    animation:asq-sheet .3s var(--ease);
  }
  .as-qmodal .as-qform .form-grid{grid-template-columns:1fr}
  .as-qmodal .as-qform .field.full{grid-column:auto}
  .as-qmodal .as-qform .form-foot{flex-direction:column;align-items:flex-start;gap:12px}
}
/* --- rejections -------------------------------------------------------
   A failed post returns to the form anchor, so the store's flash block sits
   far above the viewport. quote-form.js repeats the messages here; this is
   only the dressing, the wording comes from the server. */
.as-qform-flash{
  display:block;
  margin:0 0 18px;
  padding:11px 14px;
  border:1px solid #e6b8b0;
  border-left:3px solid #a8321f;
  background:#fdf3f1;
  color:#7d2415;
  font-size:13px;
  line-height:1.55;
}

@keyframes asq-sheet{from{transform:translateY(100%)}to{transform:none}}
