/* ============================================
   HAEvn AECT Tool — Main Styles
   ============================================ */

/* Visibility toggles — class names are owned by Site Studio interactions
   (cpt_horizontal_feature_card modifierName: "visible" / "hidden"). */
.visible {
  display: block !important;
}
.hidden {
  display: none !important;
}

.haevn-aect-form {
  background-image: url("/modules/custom/haevn_patient_tool/assets/bg-desk.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 16px;
  color: #535459;
}

@media (max-width: 1024px) {
  .haevn-aect-form {
    background-image: url("/modules/custom/haevn_patient_tool/assets/bg-mobile.png");
    margin: 24px;
  }
}

/* Layout: two-column (left info + right form). Top-align so "The power
   in knowing your number" sits next to the FIRST NAME row of the form
   rather than drifting toward the middle when the right panel is tall. */
.haevn-aect-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
  padding: 0 1rem;
}

.haevn-aect-left,
.haevn-aect-right {
  width: 50%;
  padding: 2rem 1rem;
}

@media (max-width: 1024px) {
  .haevn-aect-left,
  .haevn-aect-right {
    width: 100%;
  }
}

/* Left panel — informational text */
.haevn-aect-info h2 {
  margin-bottom: 16px;
}

.haevn-aect-info p {
  margin-top: 0;
  font-weight: 400;
}

/* Right panel */
.haevn-aect-right {
  margin-top: 60px;
  margin-bottom: 60px;
}

/* Match the right panel's vertical offset so "The power in knowing your
   number" sits flush with the right panel's top bar / Required-fields
   row, putting the heading near the FIRST NAME row instead of drifting
   above it. Falls away at the stacked breakpoint where alignment is moot. */
.haevn-aect-left {
  margin-top: 60px;
  margin-bottom: 60px;
}

@media (max-width: 1024px) {
  .haevn-aect-left {
    margin-top: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .haevn-aect-right {
    margin-top: 0;
    margin-bottom: 0;
  }
}

.haevn-aect-right h3 {
  margin-bottom: 16px;
  font-style: unset;
}

/* Top bar: back | step counter | close */
.haevn-aect-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.haevn-aect-back-placeholder {
  width: 60px; /* reserve space so counter stays centred */
}

/* "Complete!" heading in the score-summary and email-form top bar.
   Lives in the centre slot of the flex row so it sits between Back/X. */
.haevn-aect-complete {
  font-weight: 700;
  text-align: center;
  flex: 1;
}

/* Render the chevron on the button itself (not the wrapper) so clicks on
   the icon trigger the button's click handler — DONI-432.
   Recolor via CSS mask + background-color (not filter:) — DONI-456:
   filter:hue-rotate() chains render unreliably on iOS Safari, leaving the
   chevron in its source color. mask-image + background-color is fully
   supported on iOS 15.4+ and inherits cleanly from the button's color. */
.haevn-aect-back::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-image: url("/modules/custom/haevn_patient_tool/assets/back.png");
  mask-image: url("/modules/custom/haevn_patient_tool/assets/back.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.haevn-aect-back {
  padding: 0;
  background: transparent;
  border: none;
  font-weight: 700;
  color: #a20067;
  cursor: pointer;
  font-size: inherit;
  text-transform: uppercase;
}

.haevn-aect-back:focus-visible {
  text-decoration: underline;
  outline: 1px solid #000;
  outline-offset: 2px;
}

.haevn-aect-close {
  font-weight: 700;
  color: #a20067;
}

/* Recolor the close X via CSS mask + background-color (not filter:) — DONI-456.
   iOS Safari renders long filter:hue-rotate() chains on <img> unreliably,
   leaving the icon in the source SVG's hardcoded fill color (#F16B50, a
   bright red-coral) instead of the intended brand magenta.
   <img> renders SVG in an isolated document where parent CSS color does
   NOT cascade, so neither filter:hue-rotate nor currentColor inside the
   SVG can reliably recolor it across browsers. Fix: hide the <img>'s
   rendered pixels (a11y label lives on the parent <a aria-label="Close">)
   and paint the X via a pseudo-element using mask-image + background-color.
   mask-image is supported on iOS Safari 15.4+. */
.haevn-aect-close img {
  display: none;
}

.haevn-aect-close::after {
  content: "";
  display: inline-block;
  width: 25px;
  height: 24px;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-image: url("/modules/custom/haevn_patient_tool/assets/close.svg");
  mask-image: url("/modules/custom/haevn_patient_tool/assets/close.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.haevn-aect-close:focus-visible {
  text-decoration: underline;
  outline: 1px solid #000;
  outline-offset: 2px;
}

/* Step counter */
.haevn-aect-counter {
  font-weight: 700;
}

/* Fieldset — hides native styling */
.haevn-aect-fieldset {
  border: none;
  padding: 0;
  margin: 24px 0 0;
}

.haevn-aect-fieldset legend {
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 0;
  padding: 0;
}

/* Radio options rendered as pill buttons */
.haevn-aect-option {
  background-color: #fff;
  border-radius: 100px;
  border: 3px solid #a20067;
  font-weight: 700;
  color: #a20067;
  padding: 12px;
  margin: 1rem;
  text-align: center;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.haevn-aect-option:hover {
  background-color: rgba(235, 223, 236, 1);
}

.haevn-aect-option:focus-visible {
  text-decoration: underline;
  outline: 1px solid #000;
  outline-offset: 2px;
}

.haevn-aect-option--selected {
  background-color: #a20067;
  color: #fff;
}

.haevn-aect-option-label {
  font-size: 20px;
  width: 100%;
}

/* Score summary step — reuses question layout */
.haevn-aect-summary .haevn-aect-actions {
  margin-top: 24px;
}

.haevn-aect-summary-message {
  color: #535459;
}

/* Q&A list (used in PDF export) */
.haevn-aect-qa-list {
  width: 100%;
  padding: 0;
  margin: 0;
}

.haevn-aect-qa-item {
  list-style: none;
  margin-left: 0;
  margin-bottom: 16px;
}

.haevn-aect-qa-item:last-child {
  margin-bottom: 0;
}

.haevn-aect-qa-question {
  color: #535459;
}

.haevn-aect-qa-answer {
  color: #a20067;
  font-weight: 600;
}

/* Score card */
.haevn-aect-score-card {
  background-color: #e5ebe6;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
}

.haevn-aect-score-card h5 {
  margin-top: 0;
}

.haevn-aect-score-value {
  color: #a20067;
}

.haevn-aect-disclaimer {
  font-size: 0.85em;
  color: #535459;
  margin-bottom: 0;
}

/* Action buttons */
.haevn-aect-actions {
  width: 100%;
  margin-top: 40px;
  text-align: center;
}

.haevn-aect-actions h4 {
  text-align: left;
  font-size: 1rem;
}

.haevn-aect-btn {
  background-color: #fff;
  border-radius: 100px;
  border: 3px solid #a20067;
  font-size: 19px;
  font-weight: 700;
  color: #a20067;
  padding: 12px 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  max-width: 300px;
  width: 100%;
  margin: 0 auto 16px;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.haevn-aect-btn:focus-visible {
  text-decoration: underline;
  outline: 1px solid #000;
  outline-offset: 2px;
}

.haevn-aect-btn::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 18px;
  background-image: url("/modules/custom/haevn_patient_tool/assets/next.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 12px;
}

.haevn-aect-btn--download::after {
  background-image: url("/modules/custom/haevn_patient_tool/assets/d-btn.svg");
  width: 24px;
  height: 24px;
}

/* Ensure the signup link looks like a block-level button */
.haevn-aect-btn--signup {
  display: flex;
}

@media (max-width: 768px) {
  .haevn-aect-btn {
    max-width: 100%;
  }
}
