/* Request-a-quote popup (#staticBackdrop.qm-modal, markup in layout/footer.blade.php).
   Selectors start with "html body" so they outrank the legacy
   body.v5-layout / body.home-v5-page #staticBackdrop rules. */

html body #staticBackdrop.qm-modal {
  --qm-green: #5f8f22;
  --qm-green-dark: #4d7a17;
  --qm-green-tint: #f3f8ea;
  --qm-green-line: #c9dfa8;
  --qm-ink: #111827;
  --qm-muted: #6b7280;
  --qm-line: #dfe3e8;
  --qm-radius: 10px;
  font-family: Poppins, sans-serif;
}

html body #staticBackdrop.qm-modal .modal-dialog {
  max-width: min(640px, calc(100vw - 24px));
  margin: 12px auto;
}

html body #staticBackdrop.qm-modal .qm-card {
  display: block;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 22px 14px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  scrollbar-width: thin;
}

/* Header */

html body #staticBackdrop.qm-modal .qm-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

html body #staticBackdrop.qm-modal .qm-head-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--qm-green-tint);
  color: var(--qm-green);
}

html body #staticBackdrop.qm-modal .qm-head-text {
  flex: 1;
  min-width: 0;
}

html body #staticBackdrop.qm-modal .qm-title {
  margin: 0;
  color: var(--qm-ink);
  font-family: Poppins, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
}

html body #staticBackdrop.qm-modal .qm-subtitle {
  margin: 2px 0 0;
  color: var(--qm-muted);
  font-size: 13px;
  line-height: 1.4;
}

html body #staticBackdrop.qm-modal .qm-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  align-self: flex-start;
  width: 36px;
  height: 36px;
  margin: -4px -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4b5563;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html body #staticBackdrop.qm-modal .qm-close:hover {
  background: #f3f4f6;
  color: var(--qm-ink);
}

/* Form */

html body #staticBackdrop.qm-modal .qm-form {
  position: relative;
  margin: 0;
  padding: 0;
}

html body #staticBackdrop.qm-modal .qm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

html body #staticBackdrop.qm-modal .qm-field {
  position: relative;
  display: block;
  margin: 0;
}

html body #staticBackdrop.qm-modal .qm-field-icon,
html body #staticBackdrop.qm-modal .qm-chip-icon,
html body #staticBackdrop.qm-modal .qm-stat-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html body #staticBackdrop.qm-modal .qm-field-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #6b7280;
  transform: translateY(-50%);
  pointer-events: none;
}

html body #staticBackdrop.qm-modal .qm-input {
  display: block;
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 6px 12px 6px 40px;
  border: 1px solid var(--qm-line);
  border-radius: var(--qm-radius);
  background: #fff;
  box-shadow: none;
  color: var(--qm-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html body #staticBackdrop.qm-modal .qm-input::placeholder {
  color: #6b7280;
  opacity: 1;
}

html body #staticBackdrop.qm-modal .qm-input:focus {
  border-color: var(--qm-green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(95, 143, 34, 0.15);
}

html body #staticBackdrop.qm-modal .qm-label,
html body #staticBackdrop.qm-modal .qm-interests .qm-label {
  display: block;
  float: none;
  width: auto;
  margin: 10px 0 6px;
  padding: 0;
  color: var(--qm-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

html body #staticBackdrop.qm-modal .qm-interests {
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

html body #staticBackdrop.qm-modal .qm-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html body #staticBackdrop.qm-modal .qm-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--qm-green-line);
  border-radius: 8px;
  background: #fff;
  color: var(--qm-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

html body #staticBackdrop.qm-modal .qm-chip-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

html body #staticBackdrop.qm-modal .qm-chip-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--qm-green);
}

html body #staticBackdrop.qm-modal .qm-chip:hover {
  border-color: var(--qm-green);
  background: var(--qm-green-tint);
}

html body #staticBackdrop.qm-modal .qm-chip:has(.qm-chip-input:checked),
html body #staticBackdrop.qm-modal .qm-chip.active {
  border-color: var(--qm-green);
  background: var(--qm-green);
  color: #fff;
}

html body #staticBackdrop.qm-modal .qm-chip:has(.qm-chip-input:checked) .qm-chip-icon,
html body #staticBackdrop.qm-modal .qm-chip.active .qm-chip-icon {
  color: #fff;
}

html body #staticBackdrop.qm-modal .qm-chip:has(.qm-chip-input:focus-visible) {
  outline: 2px solid var(--qm-green);
  outline-offset: 2px;
}

html body #staticBackdrop.qm-modal .qm-textarea {
  height: 52px;
  min-height: 52px;
  padding: 8px 12px;
  resize: vertical;
}

html body #staticBackdrop.qm-modal .qm-recaptcha {
  display: block;
  height: 62px;
  min-height: 62px;
  margin: 10px 0 0;
  padding: 0;
  transform: none;
}

html body #staticBackdrop.qm-modal .qm-recaptcha .g-recaptcha {
  transform: scale(0.8);
  transform-origin: 0 0;
}

html body #staticBackdrop.qm-modal .qm-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  margin: 10px 0 0;
  border: 0;
  border-radius: var(--qm-radius);
  background: var(--qm-green);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease;
}

/* reCAPTCHA (scaled to 80%, so 244px wide) with Submit filling the rest of the row. */
html body #staticBackdrop.qm-modal .qm-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

html body #staticBackdrop.qm-modal .qm-actions .qm-recaptcha {
  flex: 0 0 244px;
  width: 244px;
  margin: 0;
}

html body #staticBackdrop.qm-modal .qm-actions .qm-submit {
  flex: 1 1 auto;
  min-width: 0;
  height: 52px;
  margin: 0;
}

html body #staticBackdrop.qm-modal .qm-submit:hover {
  background: var(--qm-green-dark);
}

html body #staticBackdrop.qm-modal .qm-submit svg {
  transition: transform 0.25s ease;
}

html body #staticBackdrop.qm-modal .qm-submit:hover svg {
  transform: translateX(3px);
}

html body #staticBackdrop.qm-modal .loader-overlay {
  border-radius: var(--qm-radius);
}

/* Stats */

html body #staticBackdrop.qm-modal .qm-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 0 0;
  padding: 7px 8px;
  border-radius: 12px;
  background: #f6f8f3;
  list-style: none;
}

html body #staticBackdrop.qm-modal .qm-stats li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0 10px;
}

html body #staticBackdrop.qm-modal .qm-stats li + li {
  border-left: 1px solid #e3e8dc;
}

html body #staticBackdrop.qm-modal .qm-stat-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--qm-green);
}

html body #staticBackdrop.qm-modal .qm-stats span {
  color: var(--qm-muted);
  font-size: 11.5px;
  line-height: 1.25;
}

html body #staticBackdrop.qm-modal .qm-stats strong {
  display: block;
  color: var(--qm-green);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
}

/* Brands */

html body #staticBackdrop.qm-modal .qm-brands {
  margin-top: 10px;
  text-align: center;
}

html body #staticBackdrop.qm-modal .qm-brands-title {
  margin: 0 0 4px;
  color: var(--qm-ink);
  font-size: 12.5px;
  font-weight: 600;
}

html body #staticBackdrop.qm-modal .qm-brand-row {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  /* Soft fade at both ends of the scrolling row */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* One row of logos, rendered twice; moving it by half its width loops seamlessly. */
html body #staticBackdrop.qm-modal .qm-brand-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  animation: qm-brand-marquee 22s linear infinite;
}

html body #staticBackdrop.qm-modal .qm-brand-row:hover .qm-brand-track {
  animation-play-state: paused;
}

html body #staticBackdrop.qm-modal .qm-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 34px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  background: none;
}

html body #staticBackdrop.qm-modal .qm-brand img {
  width: auto;
  height: auto;
  max-width: 76px;
  max-height: 30px;
  object-fit: contain;
}

@keyframes qm-brand-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html body #staticBackdrop.qm-modal .qm-brand-track {
    animation: none;
  }
}

/* Mobile */

@media (max-width: 575.98px) {
  html body #staticBackdrop.qm-modal .modal-dialog {
    max-width: calc(100vw - 16px);
    margin: 8px auto;
  }

  html body #staticBackdrop.qm-modal .qm-card {
    max-height: calc(100dvh - 16px);
    padding: 20px 16px 18px;
    border-radius: 16px;
  }

  html body #staticBackdrop.qm-modal .qm-head {
    gap: 12px;
    margin-bottom: 18px;
  }

  html body #staticBackdrop.qm-modal .qm-head-icon {
    width: 46px;
    height: 46px;
  }

  html body #staticBackdrop.qm-modal .qm-title {
    font-size: 20px;
  }

  html body #staticBackdrop.qm-modal .qm-subtitle {
    font-size: 13px;
  }

  html body #staticBackdrop.qm-modal .qm-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  html body #staticBackdrop.qm-modal .qm-chip {
    padding: 7px 11px;
    font-size: 12.5px;
  }

  html body #staticBackdrop.qm-modal .qm-recaptcha {
    min-height: 70px;
  }

  html body #staticBackdrop.qm-modal .qm-recaptcha .g-recaptcha {
    transform: scale(0.9);
    transform-origin: 0 0;
  }

  html body #staticBackdrop.qm-modal .qm-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  html body #staticBackdrop.qm-modal .qm-actions .qm-recaptcha {
    flex: 0 0 auto;
    width: auto;
  }

  html body #staticBackdrop.qm-modal .qm-actions .qm-submit {
    flex: 0 0 auto;
    height: 44px;
  }

  html body #staticBackdrop.qm-modal .qm-stats {
    padding: 12px 4px;
  }

  html body #staticBackdrop.qm-modal .qm-stats li {
    flex-direction: column;
    gap: 4px;
    padding: 0 6px;
    text-align: center;
  }

  html body #staticBackdrop.qm-modal .qm-stat-icon {
    width: 24px;
    height: 24px;
  }

  html body #staticBackdrop.qm-modal .qm-stats strong {
    font-size: 16px;
  }

  html body #staticBackdrop.qm-modal .qm-brand img {
    max-width: 64px;
    max-height: 30px;
  }
}

html body #staticBackdrop.qm-modal .qm-interests .qm-label {
  margin-top: 0;
}
