/* Quote chooser module (.ms-*), used by the seven /quote/ pages.
 *
 * WHY THIS FILE EXISTS: on the live store this markup is a Divi "Code Module"
 * that carried its own CSS and JS inline. The stage-2 capture keeps
 * post_content but not the style and script tags Divi rendered around it, so
 * the port arrived with thirteen ms-* classes and ZERO rules anywhere, i.e.
 * unstyled divs on the pages whose whole job is lead capture. Rebuilt here in
 * the house tokens rather than by pasting the donor's stylesheet back, so it
 * matches the rest of the site and there is one place to change it.
 *
 * The module's own <link> to Google Fonts Poppins was dropped with it: this
 * site sets its typography in style.css and does not need a third font.
 */

.qm-wrap {
  max-width: var(--maxw);
  margin: 0 auto 48px;
}

.qm-heading {
  text-align: center;
  margin-bottom: 8px;
}

.qm-heading h2 {
  margin: 0 0 8px;
  color: var(--ink);
}

.qm-heading p {
  margin: 0;
  color: var(--ink-soft);
}

.qm-divider {
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold);
  margin: 20px auto 32px;
}

.qm-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.qm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 24px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.qm-card:hover,
.qm-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
  outline: none;
}

.qm-card h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.qm-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .98rem;
  line-height: 1.55;
}

.qm-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--gold);
  color: var(--white);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 5px 14px;
  border-radius: 999px;
}

.qm-rep-photo-wrap,
.qm-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 2px;
}

.qm-rep-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cream);
}

.qm-icon-wrap svg {
  width: 56px;
  height: 56px;
  color: var(--gold);
}

.qm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}

.qm-btn svg {
  width: 16px;
  height: 16px;
}

.qm-card:hover .qm-btn,
.qm-card:focus-visible .qm-btn {
  background: var(--gold);
}

/* The panel is toggled by the first card. Collapsed by default, and collapsed
   is also what a visitor with no JavaScript gets, so the noscript fallback
   beside the form div is the one that has to carry the email address. */
.qm-form-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .3s ease, opacity .3s ease, margin .3s ease;
}

.qm-form-panel.is-open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 28px;
}

.qm-form-inner {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 24px;
}

.qm-form-inner h4 {
  margin: 0 0 6px;
  color: var(--ink);
}

.qm-form-sub {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .qm-card,
  .qm-form-panel {
    transition: none;
  }
}
