/* =====================================================================
   DELTA WARRIOR — GET A QUOTE FORM
   All classes prefixed .dws- / .dws-quote to avoid theme conflicts.
   ===================================================================== */

.dws-quote,
.dws-quote * ,
.dws-quote *::before,
.dws-quote *::after { box-sizing: border-box; }

.dws-quote {
  --dws-navy: #193971;
  --dws-navy-deep: #102a58;
  --dws-navy-soft: #3a5a94;
  --dws-ink: #5a6472;
  --dws-line: #e1e5ec;
  --dws-paper: #ffffff;
  --dws-paper-warm: #f6f7fa;
  --dws-danger: #c8402c;
  --dws-success: #1c8a53;

  /* Full-screen width with a small gutter on each side */
  --dws-gutter: clamp(8px, 1.5vw, 20px);
  width: calc(100vw - (var(--dws-gutter) * 2));
  max-width: none;
  position: relative;
  left: 50%;
  margin: 0 0 0 calc(var(--dws-gutter) - 50vw);
  padding: 44px clamp(16px, 3vw, 40px);
  background: var(--dws-paper);
  border: 1px solid var(--dws-line);
  border-radius: 16px;
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.dws-quote__head { text-align: center; margin-bottom: 32px; }

.dws-quote__eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dws-navy-soft);
  margin-bottom: 10px;
}

.dws-quote__title {
  margin: 0 0 10px;
  font-family: 'Archivo', 'Inter', sans-serif;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  color: var(--dws-navy);
}

.dws-quote__subtitle {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dws-ink);
}

/* ---------- Entrance animation ---------- */
.dws-q-rise {
  opacity: 0;
  transform: translateY(16px);
  animation: dws-q-in 0.55s ease-out forwards;
}
.dws-q-rise[data-d="1"] { animation-delay: 0.02s; }
.dws-q-rise[data-d="2"] { animation-delay: 0.10s; }
.dws-q-rise[data-d="3"] { animation-delay: 0.16s; }
.dws-q-rise[data-d="4"] { animation-delay: 0.22s; }
.dws-q-rise[data-d="5"] { animation-delay: 0.28s; }
.dws-q-rise[data-d="6"] { animation-delay: 0.34s; }
.dws-q-rise[data-d="7"] { animation-delay: 0.40s; }

@keyframes dws-q-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Grid & fields ---------- */
.dws-quote__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
}

.dws-field--full { grid-column: 1 / -1; }

/* Stop the 100vw layout from causing a sideways scrollbar */
html:has(.dws-quote), body:has(.dws-quote) { overflow-x: clip; }

.dws-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dws-navy);
  margin-bottom: 7px;
}

.dws-field label span:not(.dws-optional) { color: var(--dws-danger); }
.dws-optional { color: var(--dws-ink); font-weight: 400; font-size: 12.5px; }

.dws-field input[type="text"],
.dws-field input[type="email"],
.dws-field input[type="tel"],
.dws-field input[type="url"],
.dws-field select,
.dws-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: #1c2430;
  background: var(--dws-paper-warm);
  border: 1.5px solid var(--dws-line);
  border-radius: 9px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.dws-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%233a5a94'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
  /* The select's closed-box text rendering is partly native/UA-controlled,
     not a normal overflow box — relying on top/bottom padding alone to
     vertically center the text is what was causing the label to render
     clipped at the bottom in Firefox and some Chromium/Windows builds
     once appearance:none is applied (a well-known cross-browser <select>
     quirk). Fix: give the control an explicit height and set line-height
     to match it exactly, with ZERO vertical padding, so the browser has
     no ambiguity about where the text baseline sits. Horizontal padding
     (text/arrow spacing) is kept via left/right padding only. */
  height: 46px;
  line-height: 46px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 14px;
  padding-right: 40px;
  white-space: nowrap;
  text-overflow: clip;
  overflow: hidden;
}

.dws-field select::-moz-focus-inner { border: 0; padding: 0; }

.dws-field select option {
  color: #1c2430;
  background: #ffffff;
}

.dws-field textarea { resize: vertical; min-height: 100px; }

.dws-field input:focus,
.dws-field select:focus,
.dws-field textarea:focus {
  outline: none;
  border-color: var(--dws-navy-soft);
  background: var(--dws-paper);
  box-shadow: 0 0 0 4px rgba(58, 90, 148, 0.12);
}

.dws-field.dws-field--error input,
.dws-field.dws-field--error select,
.dws-field.dws-field--error textarea {
  border-color: var(--dws-danger);
  background: #fdf3f2;
}

.dws-field__error-msg {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--dws-danger);
}

/* ---------- Customization multi-select dropdown ---------- */
.dws-quote .dws-field--multi { position: relative; }
.dws-quote .dws-field--multi.is-open { z-index: 30; }

.dws-quote .dws-multi { position: relative; }

.dws-quote .dws-multi__btn {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 40px 0 14px;
  text-align: left;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 46px;
  color: #1c2430;
  background-color: var(--dws-paper-warm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%233a5a94'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  border: 1.5px solid var(--dws-line);
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.dws-quote .dws-multi__btn:focus,
.dws-quote .dws-field--multi.is-open .dws-multi__btn {
  outline: none;
  border-color: var(--dws-navy-soft);
  background-color: var(--dws-paper);
  box-shadow: 0 0 0 4px rgba(58, 90, 148, 0.12);
}

.dws-quote .dws-multi__btn .dws-multi__text { display: block; overflow: hidden; text-overflow: ellipsis; }
.dws-quote .dws-multi__btn.is-placeholder .dws-multi__text { color: #1c2430; }

.dws-quote .dws-multi__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  background: var(--dws-paper);
  border: 1.5px solid var(--dws-line);
  border-radius: 10px;
  box-shadow: 0 18px 38px -14px rgba(16, 42, 88, 0.35);
  -webkit-overflow-scrolling: touch;
}

.dws-quote .dws-multi__panel[hidden] { display: none; }

.dws-quote .dws-field label.dws-multi__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1c2430;
  border-radius: 7px;
  cursor: pointer;
}

.dws-quote .dws-field label.dws-multi__opt:hover { background: var(--dws-paper-warm); }

.dws-quote .dws-field label.dws-multi__opt input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--dws-navy);
  cursor: pointer;
}

.dws-quote .dws-field label.dws-multi__opt span.dws-multi__label { color: inherit; }

/* ---------- File upload ---------- */
.dws-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.dws-file-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--dws-paper-warm);
  border: 1.5px dashed var(--dws-line);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  font-size: 13.5px;
  color: var(--dws-ink);
}

.dws-file-drop i { color: var(--dws-navy-soft); font-size: 16px; }

.dws-file-drop:hover,
.dws-file-drop.is-dragover {
  border-color: var(--dws-navy-soft);
  background: #eef1f7;
}

.dws-file-drop__hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--dws-ink);
}

.dws-file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.dws-file-list:empty { display: none; margin: 0; }

.dws-file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--dws-paper-warm);
  border: 1px solid var(--dws-line);
  border-radius: 8px;
  font-size: 13px;
  color: var(--dws-navy);
}

.dws-file-list__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dws-file-list__size { flex: 0 0 auto; color: var(--dws-ink); font-size: 12px; }

.dws-file-list__remove {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  color: var(--dws-danger);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.dws-file-list__remove:hover { background: #fdf1ef; }

/* ---------- Footer / submit ---------- */
.dws-quote__footer {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.dws-quote__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 40px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--dws-navy);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(.3,1.3,.5,1), background-color 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 10px 24px -10px rgba(16, 42, 88, 0.55);
}

.dws-quote__submit:hover:not(:disabled) {
  background: var(--dws-navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px rgba(16, 42, 88, 0.65);
}

.dws-quote__submit:active:not(:disabled) { transform: translateY(0); }

.dws-quote__submit:disabled { opacity: 0.75; cursor: not-allowed; }

.dws-quote__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
}

.dws-quote__submit.is-loading .dws-quote__spinner {
  display: inline-block;
  animation: dws-spin 0.7s linear infinite;
}
.dws-quote__submit.is-loading .dws-quote__submit-text { opacity: 0.85; }

@keyframes dws-spin { to { transform: rotate(360deg); } }

.dws-quote__note {
  margin: 0;
  font-size: 12.5px;
  color: var(--dws-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Result banner ---------- */
.dws-quote__result {
  margin-top: 18px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.3s ease;
  opacity: 0;
}

.dws-quote__result.is-visible {
  max-height: 200px;
  padding: 14px 16px;
  opacity: 1;
}

.dws-quote__result.is-success {
  background: #eaf7ee;
  color: var(--dws-success);
  border: 1px solid #bfe6cc;
}

.dws-quote__result.is-error {
  background: #fdf1ef;
  color: var(--dws-danger);
  border: 1px solid #f3c9c1;
}

.dws-quote.is-submitted .dws-quote__form > *:not(.dws-quote__result) { opacity: 0.5; pointer-events: none; }

/* ---------- Honeypot ----------
   Zero-size + clipped, NOT display:none (so simple spam bots that skip
   display:none fields still fall for it) but small/clipped enough that
   Chrome/Firefox autofill and password managers (LastPass, Dashlane,
   Bitwarden, 1Password) recognize it as unfillable and leave it alone.
   The old off-screen (left:-9999px, 1x1px, opacity:0) version was still
   "visible enough" to some autofill engines, which caused them to fill it
   for real visitors — silently tripping the honeypot below and making
   genuine submissions vanish (fake success message, no DB row, no email). */
.dws-quote__hp {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (min-width: 1100px) {
  .dws-quote__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .dws-quote { padding: 28px 16px; border-radius: 12px; }
  /* 16px stops iOS Safari from zooming in when a field is focused */
  .dws-field input[type="text"],
  .dws-field input[type="email"],
  .dws-field input[type="tel"],
  .dws-field input[type="url"],
  .dws-field textarea,
  .dws-field select { font-size: 16px; }
  .dws-file-drop { flex-wrap: wrap; }
  .dws-file-drop__hint { margin-left: 0; width: 100%; }
  .dws-quote__grid { grid-template-columns: 1fr; gap: 16px; }
  .dws-quote__title { font-size: clamp(21px, 6vw, 27px); }
  .dws-quote__submit { width: 100%; padding: 14px 20px; }
}

@media (max-width: 420px) {
  .dws-quote { padding: 24px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .dws-quote *, .dws-quote *::before, .dws-quote *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .dws-q-rise { opacity: 1; transform: none; }
}
