/*
 * Styles for the reusable lead-capture form component (lead-form.js).
 * Renders as a 3-step modal popup, triggered by any a[href="#quote"].
 * Self-contained: safe to copy alongside lead-form.js into another
 * project without depending on that project's own reset/base styles.
 */

html.quote-modal-open,
html.quote-modal-open body {
  overflow: hidden;
}

.quote-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 10, .75);
}

.quote-modal-overlay[hidden] {
  display: none;
}

/* Defensive: guard every hideable element in the component against any
   host-page class (e.g. a shared `.button{display:...}`) that would
   otherwise win the cascade over the browser's default [hidden] rule. */
.quote-modal-overlay [hidden] {
  display: none !important;
}

.quote-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  padding: 56px 40px 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.quote-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink, #191b1c);
}

.quote-modal-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.quote-modal-step-dot {
  flex: 1;
  height: 3px;
  background: #e4e4e4;
}

.quote-modal-step-dot.is-active {
  background: var(--orange, #df7518);
}

.quote-modal-body h3 {
  letter-spacing: -.04em;
  margin: 14px 0 28px;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.05;
}

.quote-modal button,
.quote-modal input,
.quote-modal textarea,
.quote-modal select {
  font: inherit;
  color: inherit;
  appearance: none;
  border-radius: 0;
}

.quote-form-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.quote-step {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.quote-form-choices {
  border: 0;
  margin: 0;
  padding: 0;
}

.quote-form-choices legend {
  padding: 0;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 700;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice {
  position: relative;
  display: inline-flex;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.choice span {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid #d8d8d8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.choice input:checked ~ span {
  background: var(--orange, #df7518);
  border-color: var(--orange, #df7518);
  color: #fff;
}

.choice input:focus-visible ~ span {
  outline: 2px solid var(--orange, #df7518);
  outline-offset: 2px;
}

.quote-form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-form-field label {
  font-size: 15px;
  font-weight: 700;
}

.quote-form-optional {
  color: #999;
  font-weight: 400;
}

.quote-form-field input,
.quote-form-field textarea {
  border: 1px solid #d8d8d8;
  padding: 14px 16px;
  font-size: 15px;
  background: #fff;
}

.quote-form-field textarea {
  resize: vertical;
}

.quote-form-field input:focus-visible,
.quote-form-field textarea:focus-visible {
  outline: 2px solid var(--orange, #df7518);
  outline-offset: 2px;
  border-color: var(--orange, #df7518);
}

.quote-form-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.quote-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.quote-modal-back {
  border: 0;
  background: none;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.quote-modal-next,
.quote-modal-submit {
  margin-left: auto;
  border: 0;
  cursor: pointer;
}

@media (width <= 640px) {
  .quote-modal-overlay {
    padding: 0;
  }

  .quote-modal {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    padding: 64px 24px 32px;
  }

  .quote-form-contact {
    grid-template-columns: 1fr;
  }
}
