/* On-page quote form (product pages). Loaded only on pages that set $quote_product.
   Field styling mirrors the contact form (css/_contact-us.scss .contact-us-form):
   same borders, radius, floating labels, green icons, consent checkbox and submit button. */

.quote-section {
  --quote-green: var(--powerpump-green, #57b009);
  --quote-ink: #0a281b;
  --quote-muted: #667d70;
  position: relative;
  padding: clamp(60px, 6vw, 120px) 0;
  background: linear-gradient(180deg, #f6faf3 0%, #fff 100%);
  color: #0b271a;
  font-family: "Poppins", sans-serif;
  scroll-margin-top: 90px;
}

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

.quote-section__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 110px);
  align-items: start;
}

/* ---------- Copy column ---------- */
.quote-section__eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 22px;
  padding: 5px 20px;
  border: 1px solid var(--quote-green);
  border-radius: 100px;
  color: var(--quote-green);
  font-size: clamp(0.85rem, 0.95vw, 1.1rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quote-section h2 {
  margin: 0 0 18px;
  color: var(--quote-ink);
  font-size: clamp(1.9rem, 2.6vw, 3.3rem);
  letter-spacing: -0.036em;
  line-height: 1.13;
}

.quote-section__intro {
  max-width: 560px;
  margin: 0 0 26px;
  color: var(--quote-muted);
  font-size: clamp(0.95rem, 1vw, 1.25rem);
  line-height: 1.6;
}

.quote-section__points {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.quote-section__points li {
  position: relative;
  padding-left: 36px;
  color: #19392b;
  font-size: clamp(0.92rem, 0.95vw, 1.15rem);
  line-height: 1.5;
}

.quote-section__points li::before {
  position: absolute;
  top: 1px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--quote-green) 14%, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2357b009' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
  content: "";
}

.quote-section__call {
  margin: 0;
  color: var(--quote-muted);
  font-size: clamp(0.92rem, 0.95vw, 1.15rem);
}

.quote-section__call a {
  color: var(--quote-green);
  text-decoration: none;
}

.quote-section__call a:hover {
  text-decoration: underline;
}

/* ---------- Form card ---------- */
.quote-form {
  width: 100%;
  padding: clamp(24px, 2.6vw, 50px);
  border: 1px solid #e3e8e5;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(10, 40, 27, 0.08);
}

.quote-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 1.5vw, 31px);
  row-gap: clamp(15px, 1.2vw, 25px);
}

.quote-form__field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: clamp(55px, 3.45vw, 72px);
  margin: 0;
  border: 1px solid #e3e8e5;
  border-radius: 16px;
  background: #fff;
}

.quote-form__field--full {
  grid-column: 1 / -1;
}

.quote-form__field:focus-within,
.quote-form__message:focus-within {
  border-color: var(--quote-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--powerpump-green, #57b009) 12%, transparent);
}

.quote-form__field input,
.quote-form__field select {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 54px 0 clamp(16px, 1.4vw, 28px);
  border: 0;
  outline: 0;
  border-radius: inherit;
  color: #61786c;
  background: transparent;
  font-family: inherit;
  font-size: clamp(0.95rem, 1vw, 1.3rem);
}

.quote-form__field input::placeholder,
.quote-form__message textarea::placeholder {
  color: transparent;
  opacity: 0;
}

.quote-form__label {
  position: absolute;
  top: 50%;
  left: clamp(16px, 1.4vw, 28px);
  z-index: 1;
  color: #667c71;
  font-size: clamp(0.95rem, 1vw, 1.3rem);
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
  transition: top 0.22s ease, left 0.22s ease, font-size 0.22s ease, color 0.22s ease;
}

/* Floating label: moves to the top-left when the field is focused or filled (same as contact form). */
.quote-form__field input:focus ~ .quote-form__label,
.quote-form__field input:not(:placeholder-shown) ~ .quote-form__label,
.quote-form__field--select .quote-form__label {
  top: 7px;
  left: clamp(13px, 1.1vw, 23px);
  padding: 0 4px;
  color: var(--quote-green);
  background: transparent;
  font-size: 0.72rem;
  transform: none;
}

.quote-form__field input:focus,
.quote-form__field input:not(:placeholder-shown),
.quote-form__field--select select {
  padding-top: 12px;
}

.quote-form__field svg {
  position: absolute;
  top: 50%;
  right: clamp(18px, 1.15vw, 25px);
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--quote-green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Selects always have a value, so their label stays floated. */
.quote-form__field--select select {
  appearance: none;
  -webkit-appearance: none;
  color: #19392b;
  cursor: pointer;
  text-overflow: ellipsis;
}

.quote-form__message {
  position: relative;
  display: block;
  height: clamp(130px, 8.5vw, 180px);
  margin: clamp(15px, 1.2vw, 25px) 0 0;
  border: 1px solid #e3e8e5;
  border-radius: 16px;
  background: #fff;
}

.quote-form__message textarea {
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(15px, 1.2vw, 22px) clamp(22px, 2.1vw, 43px) clamp(14px, 1.2vw, 22px) clamp(18px, 1.7vw, 35px);
  resize: none;
  border: 0;
  outline: 0;
  border-radius: inherit;
  color: #61786c;
  background: transparent;
  font-family: inherit;
  font-size: clamp(0.95rem, 1vw, 1.25rem);
  line-height: 1.5;
}

.quote-form__message .quote-form__label {
  top: clamp(15px, 1.2vw, 22px);
  left: clamp(18px, 1.7vw, 35px);
  font-size: clamp(0.95rem, 1vw, 1.25rem);
  line-height: 1.3;
  transform: none;
}

.quote-form__message textarea:focus ~ .quote-form__label,
.quote-form__message textarea:not(:placeholder-shown) ~ .quote-form__label {
  top: 7px;
  left: clamp(13px, 1.1vw, 23px);
  padding: 0 4px;
  color: var(--quote-green);
  background: #fff;
  font-size: 0.72rem;
}

.quote-form__message textarea:focus,
.quote-form__message textarea:not(:placeholder-shown) {
  padding-top: clamp(37px, 2.5vw, 40px);
}

.quote-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: clamp(20px, 1.5vw, 32px);
  color: var(--quote-muted);
  font-size: clamp(0.85rem, 0.9vw, 1.1rem);
  line-height: 1.66;
}

.quote-form__consent input {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 5px 0 0;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--quote-green);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.quote-form__consent input:checked {
  background: var(--quote-green);
  box-shadow: inset 0 0 0 4px #fff;
}

.quote-form__consent input:focus-visible,
.quote-form__submit:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--powerpump-green, #57b009) 30%, transparent);
  outline-offset: 3px;
}

.quote-form__policy {
  color: #19392b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quote-form__captcha {
  min-height: 78px; /* reCAPTCHA checkbox height, reserved so the form does not jump when it loads */
  margin-top: clamp(20px, 1.5vw, 32px);
}

.quote-form__captcha-error {
  margin: clamp(20px, 1.5vw, 32px) 0 0;
  color: #a33636;
}

.quote-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(24px, 1.8vw, 38px);
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(110deg, var(--powerpump-green, #239744), #79bd2b);
  font-family: inherit;
  font-size: clamp(0.8rem, 0.85vw, 1rem);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.quote-form__submit:hover {
  transform: translateY(-2px);
}

.quote-form__submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.quote-form__submit span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .quote-section__inner {
    grid-template-columns: 1fr;
  }

  .quote-section__intro {
    max-width: none;
  }
}

@media (max-width: 575px) {
  .quote-form {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .quote-form__grid {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .quote-form__message {
    height: 150px;
    margin-top: 14px;
  }

  .quote-form__consent {
    gap: 12px;
    font-size: 0.81rem;
    line-height: 1.5;
  }

  .quote-form__consent input {
    width: 20px;
    height: 20px;
    margin-top: 3px;
  }

  .quote-form__captcha {
    transform: scale(0.92);
    transform-origin: left top;
  }
}
