/* ==========================================================================
   DCE — Inquiry button + floating lead-form modal
   ========================================================================== */

/* ---------- Trigger button ---------- */
.dce-inq-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  text-align: left;
  padding: 14px 18px;
  background: var(--cream);
  color: var(--nh-blue-deep);
  border: 2px solid var(--nh-blue-deep);
  box-shadow: var(--shadow-hard, 4px 4px 0 rgba(27, 58, 107, 0.18));
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.dce-inq-btn.is-block { width: 100%; }
.dce-inq-btn:hover {
  background: #fff;
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(27, 58, 107, 0.22);
}
.dce-inq-btn:active { transform: translate(1px, 1px); box-shadow: 2px 2px 0 rgba(27, 58, 107, 0.2); }
.dce-inq-btn__icon { flex: 0 0 auto; color: var(--barn-red); }
.dce-inq-btn__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.15; }
.dce-inq-btn__label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  font-size: 16px;
}
.dce-inq-btn__sub {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- Modal shell ---------- */
.dce-inq {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 5vh, 64px) 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.dce-inq[hidden] { display: none; }
.dce-inq__overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 28, 0.62);
  backdrop-filter: blur(2px);
  animation: dce-inq-fade 0.18s ease both;
}
.dce-inq__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin: auto auto;
  /* margin-block:auto centers when short; when the dialog is taller than the
     viewport the auto margins collapse and align-items:flex-start keeps the
     top reachable so the whole form can be scrolled. */
  background: var(--cream);
  border: 2px solid var(--nh-blue-deep);
  box-shadow: var(--shadow-red, 10px 10px 0 rgba(168, 38, 38, 0.18));
  animation: dce-inq-pop 0.2s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes dce-inq-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dce-inq-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .dce-inq__overlay, .dce-inq__dialog { animation: none; }
}

.dce-inq__x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  font-size: 30px;
  line-height: 1;
  color: var(--nh-blue-deep);
  cursor: pointer;
  z-index: 2;
}
.dce-inq__x:hover { color: var(--barn-red); }

/* ---------- Header ---------- */
.dce-inq__head {
  padding: 26px 32px 18px;
  border-bottom: 2px solid var(--nh-blue-deep);
  background: var(--bone);
}
.dce-inq__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--barn-red);
  margin: 0 0 6px;
}
.dce-inq__title {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--nh-blue-deep);
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1;
  margin: 0;
}
.dce-inq__re {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.dce-inq__re strong { color: var(--ink); }

/* ---------- Form ---------- */
.dce-inq__embed { padding: 22px 30px 30px; }
.dce-inq__embed .fluentform { margin: 0; }
/* Give the Comments / Questions box more room to type. (#dce-inq raises
   specificity so it beats Fluent Forms' own textarea sizing.) */
#dce-inq .fluentform textarea,
#dce-inq .dce-inq__embed textarea {
  min-height: 130px !important;
  height: 130px !important;
}
/* iOS Safari zooms the viewport when a focused field's font-size is < 16px.
   Pin every control to 16px so tapping a field never zooms / breaks the
   full-width layout. */
#dce-inq input,
#dce-inq select,
#dce-inq textarea,
#dce-inq .ff-el-form-control {
  font-size: 16px !important;
}
#dce-inq .dce-upgraded-textarea { resize: vertical; line-height: 1.4; }

/* The upgraded Comments / Questions textarea, wherever it renders — the
   product popup AND the standalone contact-page form. */
textarea.dce-upgraded-textarea {
  min-height: 140px !important;
  height: 140px !important;
  resize: vertical;
  line-height: 1.4;
  font-size: 16px !important;
}
.dce-inq__fallback {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 4px 0 8px;
}

.dce-inq__form { padding: 24px 32px 30px; }
.dce-inq__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.dce-inq__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dce-inq__row--3 { grid-template-columns: 1fr 1fr 1fr; }
.dce-inq__field { display: block; margin-bottom: 14px; }
.dce-inq__row .dce-inq__field { margin-bottom: 0; }
.dce-inq__row { margin-bottom: 14px; }

.dce-inq__lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}
.dce-inq__lbl em { color: var(--barn-red); font-style: normal; }

.dce-inq__field input,
.dce-inq__field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(27, 58, 107, 0.28);
  padding: 11px 13px;
  border-radius: 0;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.dce-inq__field textarea { resize: vertical; min-height: 92px; }
.dce-inq__field input:focus,
.dce-inq__field textarea:focus {
  outline: none;
  border-color: var(--barn-red);
  box-shadow: 0 0 0 3px rgba(168, 38, 38, 0.12);
}
.dce-inq__field input:user-invalid {
  border-color: var(--barn-red);
}

/* ---------- Consent ---------- */
.dce-inq__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.dce-inq__consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--barn-red);
}
.dce-inq__consent a { color: var(--nh-blue); text-decoration: underline; }
.dce-inq__consent a:hover { color: var(--barn-red); }

/* ---------- Error ---------- */
.dce-inq__error {
  background: rgba(168, 38, 38, 0.08);
  border: 1px solid rgba(168, 38, 38, 0.4);
  color: var(--barn-red);
  font-size: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

/* ---------- Submit ---------- */
.dce-inq__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  background: var(--barn-red);
  border: 2px solid var(--barn-red);
  padding: 15px 24px;
  cursor: pointer;
  transition: filter 0.12s ease, opacity 0.12s ease;
}
.dce-inq__submit:hover { filter: brightness(1.06); }
.dce-inq__submit[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Success ---------- */
.dce-inq__success {
  padding: 44px 32px 40px;
  text-align: center;
}
.dce-inq__success-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--nh-blue-deep);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}
.dce-inq__success h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--nh-blue-deep);
  font-size: 28px;
  margin: 0 0 8px;
}
.dce-inq__success p {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 22px;
  max-width: 360px;
  margin-inline: auto;
}
.dce-inq__success .dce-inq__submit { background: var(--nh-blue-deep); border-color: var(--nh-blue-deep); width: auto; padding-inline: 36px; }

/* ---------- Lock background scroll when open ---------- */
html.dce-inq-open { overflow: hidden; }
body.dce-inq-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  /* Start the sheet near the top and use the full width — no big offset. */
  .dce-inq { padding: 8px 8px 12px; align-items: flex-start; }
  .dce-inq__dialog { margin: 0 auto; }

  /* Tighter header so the form is visible without scrolling. */
  .dce-inq__head { padding: 14px 18px 12px; }
  .dce-inq__eyebrow { margin-bottom: 3px; }
  .dce-inq__title { font-size: 26px; }
  .dce-inq__re { margin-top: 6px; }

  .dce-inq__form { padding: 16px 18px 22px; }
  .dce-inq__row,
  .dce-inq__row--3 { grid-template-columns: 1fr; gap: 0; }
  .dce-inq__row .dce-inq__field { margin-bottom: 14px; }
  .dce-inq__row { margin-bottom: 0; }

  /* ----- Fluent Forms: collapse the oversized vertical rhythm ----- */
  .dce-inq__embed { padding: 12px 18px 18px; }
  .dce-inq__embed .fluentform .ff-el-group { margin-bottom: 10px !important; }
  .dce-inq__embed .fluentform .ff-el-input--label { padding-bottom: 0 !important; margin-bottom: 3px !important; }
  .dce-inq__embed .fluentform .ff-el-input--label label { margin: 0 !important; line-height: 1.2 !important; }
  .dce-inq__embed .fluentform .ff-el-input--content { margin: 0 !important; }
  .dce-inq__embed .fluentform input,
  .dce-inq__embed .fluentform select,
  .dce-inq__embed .fluentform .ff-el-form-control {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
    min-height: 0 !important;
  }
  #dce-inq .fluentform textarea,
  #dce-inq .dce-inq__embed textarea { min-height: 118px !important; height: 118px !important; }
  .dce-inq__embed .fluentform .ff-el-group:last-child,
  .dce-inq__embed .fluentform .ff_submit_btn_wrapper { margin-bottom: 0 !important; }
}
