body {position: relative;}
header.init:has( + #compare-header) {
    
    position: relative;
    z-index: 9999;
}



h2 {
  font-size: 1.8rem;
  margin-bottom: 0rem;
}

#form_close_button {
    font-size: 1rem;
    color: var(--h-color);
    display: none;
}



body.mobile #form_close_button {
    display: inline-block;
}
#form {
    width: 600px;
    max-width: 940px;
    margin: 0 auto;
    position: relative;
}

body.mobile #form {
    width: 100%;
    padding: 1rem 1rem 0;
    top: 80px;
}

body.mobile .contact_form_footer {
    margin-left: -1rem;
    margin-right: -1rem;
    border-radius: 0;
}

body.mobile #contact-button {
    display: block;
    z-index: 10001;
}

.form-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.contact_form_footer p {
  margin: 0.2rem 0;
  color: #fff;
}

.contact_form_footer {
  position: relative;
  bottom: auto;
  left: auto;
  margin: 1.25rem -2rem 0;
  padding: 1rem 2rem;
  width: auto;
  min-height: 1rem;
  text-align: left;
  z-index: 1;
  font-size: 1rem;
  color: #fff;
  background-color: var(--brand);
  border-radius: 0 0 0 8px;
  flex-shrink: 0;
}

section.hs_form_section {
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  background-size: cover;
  background-position: center;
  overflow: visible !important;
}
form.hbspt-form {
  z-index: 2;
}

.hs_form {
  position: relative;
  background-color: white !important;
  border-radius: 16px;
  border-shape: squircle;
  max-width: 600px;
  padding: 2rem 3rem;
  overflow: visible !important;
}

[data-hs-forms-root] {
  position: relative;
  z-index: 3;
}



#compare-header {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
    padding: 0;
    background-image: linear-gradient(180deg, #f9f9f9 74px, #aaaaaa22 75px, transparent 80px);
    position: relative;
    z-index: 1999;
    margin-bottom: -1rem;
}
#compare-header.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    background-color: hsla(200, 20%, 93%, 1);
    box-shadow: inset 0 0 10px 0 rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}

header.init nav {
    position: relative;
    z-index: 10000; /* Higher than header.init */
    transform: translateZ(0);
}

#contact-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

#contact-button button {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7.5rem;
    min-height: 2.2rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.92rem;
    border-radius: 6px;
    background-color: #49aec8;
    color: white;
    border: 3px solid #49aec8;
    transition: background-color 100ms linear, color 100ms linear, border-color 100ms linear;
    cursor: pointer;
}
#contact-button button:hover {
    background-color: white;
    color: #49aec8;
}

#contact-button button span {
    display: block;
    line-height: 1.2;
}
#contact-button button span:nth-child(2) {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}
#contact-button.active button span:nth-child(2) {
    opacity: 1;
}
#contact-button.active button span:nth-child(1) {
    opacity: 0;
}
#contact-button button span:nth-child(1) {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    #contact-button button span:nth-child(2) {
        position: static;
        display: none;
        opacity: 1;
    }
    #contact-button.active button span:nth-child(2) {
        display: flex;
    }
    #contact-button.active button span:nth-child(1) {
        display: none;
        opacity: 1;
    }
}

#compare-header .compare-header-logo {
    grid-column: 1 / 2;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.0rem;
}

#compare-header .compare-header-logo a {
    width: 86px;
    height: 86px;
    margin-top: 8px;
    background-color: white;
    border: 3px solid white;
    border-radius: 43px;
    box-shadow: 0 2px 4px 0px rgba(0, 0, 0, 0.1);
}

#compare-header.scrolled .compare-header-logo a {
    width: 64px;
    height: 64px;
    margin-top: 2px;
    border-radius: 32px;
}
#compare-header.scrolled .compare-header-logo {
    width: 60px;
    margin-left: auto;
    margin-right: 1.5rem;
    margin-top: 0rem;
    /* margin-left: auto; */
}
#compare-header .compare-header-logo img {
    width: 80px;
    padding: 0rem;

}
#compare-header.scrolled .compare-header-logo img {
    width: 60px;
    padding: 0rem;
}
.compare-header-nav {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    line-height: 1.1;
}

body.mobile .compare-header-nav {
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
}

@media (max-width: 1152px) {
    #compare-header {
        grid-template-columns: 0px 1fr 240px;
        padding-top: 0.5rem;
        background-color: #f9f9f9;
        background-image: none
    }
    #compare-header .compare-header-logo {
        display: none;
    }
}
.compare-header-nav a,
.compare-header-nav a:visited,
.compare-header-nav a:link {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0;

    padding: 1.00rem 1rem;
    /* margin: 0.65rem 0.25rem; */

    background-color: transparent;

    transition: 0.3s ease-in-out;
    border-radius: 3px;
}
.compare-header-nav a:hover {
    color: white;
    font-size: 0.9rem;
    background-color: #49aec8;
}

@media (max-width: 1268px) {
    .compare-header-nav a,
    .compare-header-nav a:visited,
    .compare-header-nav a:link {
        padding: 0.5rem 0.7rem;
    }

}

#form {
    position: fixed;
    display: flex;
    flex-direction: column;
    top: 167px;
    height: auto;
    max-height: calc(100vh - 180px);
    right: 0;
    padding: 2rem 2rem 0;
    z-index: 2000;
    background-color: white;
    border-radius: 8px 0 0 8px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    border-right: 3px solid var(--h-color);
    overflow-x: hidden;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, opacity;
}
#compare-header.scrolled + #form.active {
    top: 87px;
}

#form.active {
    border-right: 8px solid var(--h-color);
}

.form-result {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0 1rem;
    max-width: 28ch;
}

.form-result h3 {
    margin: 0;
}

.form-result p {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    #form {
        will-change: auto;
    }
}

#form .input {
    display: flex;
    flex-direction: column;
    margin: 0.5rem 0;
}
#form label {
    font-size: 0.8rem;
    color: #616161;
}

#form label:has(+ :focus-visible) {
    color: var(--h-color);
}
#form input {
    border: 0;
    border-bottom: 1px solid #e9e9e9;
}
#form input:focus-visible {
    outline: none;
    border-bottom: 1px solid var(--h-color);
}
#form input[type="datetime-local"] {
    font-size: 0.95em;
}
#form button {
    border-color: var(--h-color);
    color: var(--h-color);
    transition: all 0.3s;
}
#form button:hover {
    background-color: var(--h-color);
    color: white;
}

.req {
    color: red;
    font-size: inherit;
}
legend {
    font-size: 0.8rem;
    font-weight: normal;
    color: #616161;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    #compare-header.scrolled + #form.active,
    form#form {
        top: 127px;
    }
    .compare-header-nav a,
    .compare-header-nav a:visited,
    .compare-header-nav a:link {
        padding: 0.25rem 0.37rem;
    }

    .compare-header-nav {
        grid-column: 1 / -1;
        gap: 0rem 0.5rem;
        grid-column: 1 / 2;
    }
    #compare-header {
        grid-template-columns: 1fr 156px;
    }
    #compare-header .compare-header-logo {
        display: none;
    }
    #contact-button {
        margin-top: 0rem;
        grid-column: 2 / 3;
        margin-right: 1rem;
    }
}
