/* ==========================================================================
   handiWERK – Quote Form (Final Minimal CSS, mobile 1-col items + breathing)
   ========================================================================== */

/* Constrain width and center */
#hdw.std-intake { max-width: 860px; margin: 0 auto; }

/* ---- Base ---- */
.std-intake { font-size: 1rem; line-height: 1.5; color: #111; }

/* Spacing */
.std-intake .fi { margin-bottom: 1.125rem; }                 /* base gap + */
#hdw.std-intake .fi.section { margin: 1.5rem 0 1.25rem; }    /* more breathing */
#hdw.std-intake .items { margin-bottom: 1.5rem; }            /* extra below list */

/* Two-column groups */
.std-intake .fi.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) { .std-intake .fi.two { grid-template-columns: 1fr; } }

/* Labels */
.std-intake label { display: block; margin-bottom: 0.25rem; font-size: 1rem; font-weight: 600; }
#hdw.std-intake label span { color: #e5007d; font-weight: 700; } /* required */

/* Inputs */
.std-intake input[type="text"],
.std-intake input[type="email"],
.std-intake input[type="tel"],
.std-intake input[type="url"],
.std-intake input[type="number"],
.std-intake input[type="file"],
.std-intake textarea,
.std-intake select {
  width: 100%; box-sizing: border-box; font-size: 1rem; line-height: 1.5;
}
#hdw.std-intake ::placeholder { color: #777; opacity: 1; }

.std-intake textarea { min-height: 110px; resize: vertical; }

/* Notes/help */
.std-intake .note, .std-intake .help {
  font-size: 0.95rem; line-height: 1.5; color: #444; margin: 0.625rem 0;
}

/* Validation */
.std-intake .err { display: none; color: #dc2626; font-size: 0.95rem; margin-top: 0.25rem; }
#hdw.std-intake [aria-invalid="true"] { border-color: #dc2626 !important; }

/* Items list (desktop grid) */
.std-intake .items { display: grid; gap: 0.75rem; }
.std-intake .items .item {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.4fr 90px 40px; /* store | title | link | qty | × */
  gap: 0.625rem; align-items: center;
}

/* Items list — MOBILE: force single column */
@media (max-width: 640px) {
  #hdw.std-intake .items .item {
    display: block !important;
  }
  #hdw.std-intake .items .item > * {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
    grid-column: auto !important;
  }
  #hdw.std-intake .items .item input[name="qty[]"] {
    max-width: 140px !important;
  }
  #hdw.std-intake .items .item .rm {
    display: inline-flex !important;
    width: 34px !important;
    height: 34px !important;
    margin-top: 0.25rem !important;
  }
}

/* Remove (×) compact */
.std-intake .rm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1px solid #aaa; border-radius: 0.5rem;
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1;
  opacity: 0.7; transition: opacity .2s, border-color .2s;
}
.std-intake .rm:hover { opacity: 1; border-color: #111; }
#hdw.std-intake .rm:focus-visible { outline: 2px solid #e5007d; outline-offset: 2px; }

/* Buttons */
.std-intake .btn, .std-intake .btn-outline {
  display: inline-block; border-radius: 0.5rem; font-weight: 600; cursor: pointer; transition: opacity .2s;
}
/* Primary submit */
.std-intake .btn {
  min-height: 44px; padding: 0.65rem 1.25rem;
  background: #e5007d; color: #fff; border: 1px solid #e5007d;
}
.std-intake .btn:hover { opacity: 0.9; }
.std-intake .btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* Secondary outline (compact) */
.std-intake .btn-outline {
  padding: 0.35rem 0.8rem; min-height: 32px; font-size: 0.9rem;
  background: transparent; border: 1px solid currentColor;
}
#hdw.std-intake .btn-outline:hover { border-color: #333 !important; opacity: .9 !important; }

/* Consent grid */
.std-intake .consent-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start;
}
.std-intake .consent-grid input[type="checkbox"] { width: auto; margin-top: 0.15rem; }

/* Banners */
.std-intake .banner {
  padding: 0.85rem 1rem; margin: 1rem 0; border-radius: 0.5rem; font-weight: 600;
}
.std-intake .banner.error {
  background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5;
}

/* Number spinners off */
.std-intake input[type="number"] { -moz-appearance: textfield; }
.std-intake input[type="number"]::-webkit-outer-spin-button,
.std-intake input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Fallbacks */
@supports not (display: grid) {
  .std-intake .fi.two { display: block; }
  .std-intake .fi.two > * { margin-bottom: 1rem; }
  .std-intake .items .item { display: block; }
  .std-intake .items .item > * { display: block; width: 100%; margin-bottom: 0.5rem; }
}

/* Focus (a11y) */
.std-intake input:focus-visible,
.std-intake textarea:focus-visible,
.std-intake select:focus-visible,
.std-intake .btn:focus-visible,
.std-intake .btn-outline:focus-visible {
  outline: 3px solid #e5007d; outline-offset: 2px;
}

/* Reduced motion + tiny mobile tweaks */
@media (max-width: 480px) {
  #hdw.std-intake .btn { padding: .55rem 1rem; min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .std-intake * { transition: none !important; }
}

/* ==========================================================================
   Scoped reset — block theme overrides
   ========================================================================== */
#hdw.std-intake button,
#hdw.std-intake input,
#hdw.std-intake select,
#hdw.std-intake textarea {
  font: inherit !important;
  color: #111 !important;
  background: #fff !important;
  border: 1px solid #c9c9c9 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  padding: 10px 12px !important;
}
#hdw.std-intake input[type="file"] { padding: 6px !important; }

/* Force brand on primary */
#hdw.std-intake .btn {
  background: #e5007d !important;
  border-color: #e5007d !important;
  color: #fff !important;
}
#hdw.std-intake .btn:hover { opacity: .9 !important; }

/* Neutral outline kept compact */
#hdw.std-intake .btn-outline {
  background: transparent !important; color: #111 !important; border: 1px solid #111 !important;
  padding: 0.35rem 0.8rem !important; min-height: 32px !important; font-size: 0.9rem !important;
}

/* Keep items grid stable on desktop */
#hdw.std-intake .items .item {
  grid-template-columns: 1fr 1.2fr 1.4fr 90px 40px !important;
  gap: 10px !important; align-items: center !important;
}

/* Compact remove forced */
#hdw.std-intake .rm {
  width: 30px !important; height: 30px !important; font-size: 16px !important;
  color: #111 !important; border: 1px solid #aaa !important;
  background: #fff !important; opacity: 0.7 !important;
}
#hdw.std-intake .rm:hover { opacity: 1 !important; border-color: #111 !important; }

/* Notes/help & labels readability forced */
#hdw.std-intake .note, #hdw.std-intake .help { color: #444 !important; opacity: 1 !important; }
#hdw.std-intake label { color: #111 !important; }
