/* ==========================================================================
   AVL Form Hero
   ========================================================================== */

/* AVL Form Hero */
.avl-heroform {
  position: relative;
  overflow: visible;
  padding: var(--avl-hf-pad-y, 84px) 0;
  min-height: var(--avl-hf-minh, 0px);
  display: flex;
  align-items: center;

  /* Base background ONLY (no hard-coded purple radials) */
  background: linear-gradient(
    var(--avl-hf-grad-dir, 135deg),
    var(--avl-hf-bg1, #070A2A),
    var(--avl-hf-bg2, #2A1254)
  );
}

/* Optional ambient glow derived from bg colors (not hard-coded).
   When bg1/bg2 are black, this effectively disappears. */
@supports (background: color-mix(in srgb, #000 50%, transparent)) {
  .avl-heroform {
    background:
      radial-gradient(
        1000px 600px at 20% 20%,
        color-mix(in srgb, var(--avl-hf-bg1, #070A2A) 55%, transparent),
        transparent 60%
      ),
      radial-gradient(
        800px 500px at 80% 25%,
        color-mix(in srgb, var(--avl-hf-bg2, #2A1254) 45%, transparent),
        transparent 55%
      ),
      linear-gradient(
        var(--avl-hf-grad-dir, 135deg),
        var(--avl-hf-bg1, #070A2A),
        var(--avl-hf-bg2, #2A1254)
      );
  }
}

.avl-heroform__container {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.avl-heroform__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, var(--avl-hf-card-max, 560px));
  gap: var(--avl-hf-gap, 56px);
  align-items: center;
}

.avl-heroform__left {
  min-width: 0;
}

.avl-heroform__headline {
  color: var(--avl-hf-left, #EEF0FF);
  letter-spacing: -0.02em;
  line-height: 1.04;
  font-weight: 650;
  max-width: var(--avl-hf-left-max, 680px);
}

/* Rich text: force visible + strip weird backgrounds */
.avl-heroform__headline * {
  color: inherit !important;
  background: transparent !important;
}

.avl-heroform__headline p,
.avl-heroform__headline h1,
.avl-heroform__headline h2,
.avl-heroform__headline h3,
.avl-heroform__headline h4,
.avl-heroform__headline h5,
.avl-heroform__headline h6 {
  margin: 0;
  padding: 0;
}

.avl-heroform__accent {
  color: var(--avl-hf-accent, #6960D4);
  margin-right: 0.22em;
}

.avl-heroform__headline.is-h1 { font-size: clamp(40px, 4.8vw, 68px); }
.avl-heroform__headline.is-h2 { font-size: clamp(36px, 4.2vw, 58px); }
.avl-heroform__headline.is-h3 { font-size: clamp(32px, 3.6vw, 50px); }
.avl-heroform__headline.is-h4 { font-size: clamp(28px, 3.0vw, 42px); }
.avl-heroform__headline.is-h5 { font-size: clamp(24px, 2.5vw, 34px); }
.avl-heroform__headline.is-h6 { font-size: clamp(20px, 2.2vw, 28px); }
.avl-heroform__headline.is-body {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0;
}

.avl-heroform__right {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

.avl-heroform__card {
  width: 100%;
  max-width: var(--avl-hf-card-max, 560px);
  background: var(--avl-hf-card-bg, #fff);
  border-radius: var(--avl-hf-card-radius, 44px);
  padding: var(--avl-hf-card-pad, 48px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.avl-heroform__card-title {
  text-align: center;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 650;
  margin: 0 0 10px 0;
  color: #0c0c12;
}

.avl-heroform__card-desc {
  text-align: center;
  color: rgba(12, 12, 18, 0.74);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 18px 0;
}

/* card description: strip any background formatting */
.avl-heroform__card-desc,
.avl-heroform__card-desc * {
  background: transparent !important;
}

.avl-heroform__card-desc p { margin: 0; }
.avl-heroform__card-desc p + p { margin-top: 8px; }

/* placeholder when no form selected */
.avl-heroform__placeholder {
  background: rgba(0,0,0,0.04);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 13px;
  color: rgba(0,0,0,0.65);
}

/* Form base */
.avl-heroform__form {
  font-size: 14px;
}

/* HubSpot form styling (scoped) */
.avl-heroform__form .hs-form { margin: 0 !important; }

/* Grey bar fix (this is your exact element) */
.avl-heroform__form .form-title,
.avl-heroform__form h3.form-title,
.avl-heroform__form .hs_cos_wrapper.form-title,
.avl-heroform__form h1[id^="hs_cos_wrapper_form_"][id$="_title"],
.avl-heroform__form h2[id^="hs_cos_wrapper_form_"][id$="_title"],
.avl-heroform__form h3[id^="hs_cos_wrapper_form_"][id$="_title"],
.avl-heroform__form h4[id^="hs_cos_wrapper_form_"][id$="_title"],
.avl-heroform__form h5[id^="hs_cos_wrapper_form_"][id$="_title"],
.avl-heroform__form h6[id^="hs_cos_wrapper_form_"][id$="_title"],
.avl-heroform__form [id^="hs_cos_wrapper_form_"][id$="_title"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Extra safety: hide any top-level hs-richtext + hr that a theme might inject */
.avl-heroform__form .hs-form > .hs-richtext,
.avl-heroform__form .hs-form > hr {
  display: none !important;
}

/* If theme gives richtext blocks backgrounds/padding, strip them */
.avl-heroform__form .hs-form .hs-richtext,
.avl-heroform__form .hs-form .hs-richtext * {
  background: transparent !important;
}

/* fieldsets */
.avl-heroform__form .hs-form fieldset {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.avl-heroform__form .hs-form .hs-form-field { margin-bottom: 12px !important; }

/* labels */
.avl-heroform__form .hs-form label {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  margin: 0 0 7px 0 !important;
  color: rgba(12, 12, 18, 0.72) !important;
}

/* hide most labels but keep checkbox/radio list labels visible below */
.avl-heroform__form.is-hide-labels .hs-form label {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Inputs */
.avl-heroform__form .hs-form .hs-input,
.avl-heroform__form .hs-form input[type="text"],
.avl-heroform__form .hs-form input[type="email"],
.avl-heroform__form .hs-form input[type="tel"],
.avl-heroform__form .hs-form input[type="number"],
.avl-heroform__form .hs-form input[type="url"],
.avl-heroform__form .hs-form input[type="password"],
.avl-heroform__form .hs-form textarea,
.avl-heroform__form .hs-form select {
  width: 100% !important;
  box-sizing: border-box !important;

  height: 46px !important;
  padding: 0 16px !important;

  border: 0 !important;
  border-radius: 14px !important;
  background: var(--avl-hf-inputs-bg, #EFEFEF) !important;
  color: #0c0c12 !important;

  font-size: 14px !important;
  line-height: 1.25 !important;
  font-family: inherit !important;

  outline: none !important;
  box-shadow: inset 0 0 0 1px rgba(12, 12, 18, 0.10) !important;
}

.avl-heroform__form .hs-form textarea {
  height: auto !important;
  min-height: 96px !important;
  padding: 12px 16px !important;
  resize: vertical !important;
}

.avl-heroform__form .hs-form input:focus,
.avl-heroform__form .hs-form textarea:focus,
.avl-heroform__form .hs-form select:focus {
  box-shadow: inset 0 0 0 2px rgba(105, 96, 212, 0.45) !important;
}

/* Make 2-col spacing look nicer */
.avl-heroform__form .hs-form fieldset.form-columns-2 .hs-form-field {
  padding-right: 12px !important;
}
.avl-heroform__form .hs-form fieldset.form-columns-2 .hs-form-field:last-child {
  padding-right: 0 !important;
}

/* checkbox/radio list styles */
.avl-heroform__form .hs-form .inputs-list {
  margin: 10px 0 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.avl-heroform__form .hs-form .inputs-list > li {
  margin: 0 0 10px 0 !important;
}

.avl-heroform__form .hs-form input[type="checkbox"],
.avl-heroform__form .hs-form input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 10px 0 0 !important;
  vertical-align: middle !important;
}

/* keep list labels visible even when hide-labels is enabled */
.avl-heroform__form .hs-form .inputs-list label {
  position: static !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  display: inline !important;
  font-size: 13px !important;
  color: rgba(12, 12, 18, 0.78) !important;
}

/* Privacy / legal consent block */
.avl-heroform__form .hs-form .legal-consent-container,
.avl-heroform__form .hs-form .legal-consent-container .hs-richtext,
.avl-heroform__form .hs-form .legal-consent-container p,
.avl-heroform__form .hs-form .legal-consent-container span {
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: rgba(12, 12, 18, 0.70) !important;
}

.avl-heroform__form .hs-form .legal-consent-container p {
  margin: 10px 0 0 0 !important;
}

.avl-heroform__form .hs-form .legal-consent-container * {
  background: transparent !important;
}

/* error text */
.avl-heroform__form .hs-form .hs-error-msgs {
  margin: 7px 0 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
  color: #b30838 !important;
  font-size: 12px !important;
}

/* submit button */
.avl-heroform__form .hs-form .hs_submit { margin-top: 14px !important; }

.avl-heroform__form .hs-form input[type="submit"],
.avl-heroform__form .hs-form .hs-button {
  width: 100% !important;
  height: 52px !important;

  border: 0 !important;
  border-radius: 999px !important;

  background: linear-gradient(90deg, var(--avl-hf-btn1, #4840B0), var(--avl-hf-btn2, #1B103B)) !important;
  color: #fff !important;

  font-size: 15px !important;
  font-weight: 650 !important;
  cursor: pointer !important;

  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24) !important;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease !important;
}

.avl-heroform__form .hs-form input[type="submit"]:hover,
.avl-heroform__form .hs-form .hs-button:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.03) !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28) !important;
}

.avl-heroform__form .hs-form input[type="submit"]:active,
.avl-heroform__form .hs-form .hs-button:active {
  transform: translateY(0px) !important;
}

/* Responsive */
@media (max-width: 980px) {
  .avl-heroform__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .avl-heroform__right { justify-content: flex-start; }

  .avl-heroform__card { max-width: 720px; }

  .avl-heroform__headline { max-width: none; }
}

@media (max-width: 680px) {
  .avl-heroform__container {
    width: min(1240px, calc(100% - 28px));
  }

  .avl-heroform__card {
    padding: 28px;
    border-radius: 32px;
  }

  .avl-heroform__grid.is-center-mobile .avl-heroform__left { text-align: center; }
  .avl-heroform__grid.is-center-mobile .avl-heroform__right { justify-content: center; }

  .avl-heroform__form .hs-form fieldset.form-columns-2 .hs-form-field {
    padding-right: 0 !important;
  }
}
