/* ==========================================================================
   Block: HubSpot Form
   ========================================================================== */

.hubspot-form {
    position: relative;
    overflow: hidden;
}

.hubspot-form.vp-s {
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
}

.hubspot-form.vp-l {
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
}

@media (min-width: 1024px) {
    .hubspot-form.vp-s {
        padding-top: 4rem;
        padding-bottom: 8rem;
    }

    .hubspot-form.vp-l {
        padding-top: 4rem;
        padding-bottom: 8rem;
    }
}

.hsf-wrapper {
    max-width: var(--max-w-wrapper);
    margin: 0 auto;
    padding: 4rem 24px;
}

@media (min-width: 1024px) {
    .hsf-wrapper {
        padding-left: 80px;
        padding-right: 80px;
    }
}

/* Two-column container */
.hsf-container {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 1024px) {
    .hsf-container {
        flex-direction: row;
        gap: 80px;
    }
}

/* Left tile */
.hsf-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--color-black);
    color: var(--color-white);
    clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

@media (min-width: 1024px) {
    .hsf-tile {
        flex: 0 0 calc(50% - 40px);
        clip-path: polygon(0 0, calc(100% - 64px) 0, 100% 64px, 100% 100%, 64px 100%, 0 calc(100% - 64px));
    }
}

.hsf-icon {
    width: 64px;
    height: 64px;
    color: var(--color-coral);
}

@media (min-width: 1024px) {
    .hsf-icon {
        width: 136px;
        height: 136px;
    }
}

.hsf-icon svg {
    width: 100%;
    height: 100%;
}

.hsf-heading {
    align-self: flex-end;
    max-width: 346px;
    margin: 24px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1.1;
    color: var(--color-white);
}

@media (min-width: 1024px) {
    .hsf-heading {
        font-size: 48px;
        margin: 0 40px 40px 40px;
    }
}

.hsf-form-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 1024px) {
    .hsf-form-col {
        flex: 0 0 calc(50% - 40px);
    }
}

/* Labels — base */
.hsf-form-wrap label {
    display: inline-block;
    font-size: 16px;
    line-height: 1;
}

.hsf-form-wrap label:not(:has(input[type="checkbox"], input[type="radio"])) {
    pointer-events: none;
}

/* Inputs and textareas */
.hsf-form-wrap input:not([type="checkbox"], [type="submit"]),
.hsf-form-wrap textarea {
    width: 100%;
    height: 24px;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
}

.hsf-form-wrap textarea {
    height: auto;
}

.hsf-form-wrap select {
    width: 100% !important;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    background: transparent;
    border: none;
    border-bottom: 0;
    border-color: transparent;
}

.hsf-form-wrap .input:has(> select) {
    border-bottom: 1px solid var(--color-border);
}

/* Focus states */
.hsf-form-wrap input:focus,
.hsf-form-wrap textarea:focus {
    border-bottom-color: var(--color-teal);
    transition: border-color 0.2s ease;
}

.hsf-form-wrap select:focus {
    outline: none;
}

.hsf-form-wrap .input:has(> select:focus) {
    border-bottom-color: var(--color-teal);
    transition: border-color 0.2s ease;
}

/* Placeholders */
.hsf-form-wrap input::placeholder {
    opacity: 0;
}

.hsf-form-wrap input:focus::placeholder {
    opacity: 1;
}

/* Form fields — base spacing */
.hsf-form-wrap .hs-form-field {
    margin-bottom: 19px;
}

/* ==========================================================================
   Floating Label Pattern
   ========================================================================== */

/* Fields with text/email/number/select get the floating label treatment */
.hsf-form-wrap .hs-form-field:has(.input input[type="email"]) label,
.hsf-form-wrap .hs-form-field:has(.input input[type="number"]) label,
.hsf-form-wrap .hs-form-field:has(.input input[type="text"]) label,
.hsf-form-wrap .hs-form-field:has(.input input[type="tel"]) label,
.hsf-form-wrap .hs-form-field:has(.input select) label {
    transform: translateY(21px);
    transition: all 0.15s ease;
}

@media (min-width: 1024px) {
    .hsf-form-wrap .hs-form-field:has(.input input[type="email"]) label,
    .hsf-form-wrap .hs-form-field:has(.input input[type="number"]) label,
    .hsf-form-wrap .hs-form-field:has(.input input[type="text"]) label,
    .hsf-form-wrap .hs-form-field:has(.input input[type="tel"]) label,
    .hsf-form-wrap .hs-form-field:has(.input select) label {
        transform: translateY(28px);
    }
}

.hsf-form-wrap .hs-form-field:has(.input input[type="email"]),
.hsf-form-wrap .hs-form-field:has(.input input[type="number"]),
.hsf-form-wrap .hs-form-field:has(.input input[type="text"]),
.hsf-form-wrap .hs-form-field:has(.input input[type="tel"]),
.hsf-form-wrap .hs-form-field:has(.input select) {
    margin-top: -21px;
    transition: all 0.15s ease;
}

@media (min-width: 1024px) {
    .hsf-form-wrap .hs-form-field:has(.input input[type="email"]),
    .hsf-form-wrap .hs-form-field:has(.input input[type="number"]),
    .hsf-form-wrap .hs-form-field:has(.input input[type="text"]),
    .hsf-form-wrap .hs-form-field:has(.input input[type="tel"]),
    .hsf-form-wrap .hs-form-field:has(.input select) {
        margin-top: -28px;
    }
}

.hsf-form-wrap fieldset.form-columns-1 input:not([type="checkbox"], [type="submit"]) {
    width: 100% !important;
}

/* Textarea floating label */
.hsf-form-wrap .hs-form-field:has(.input textarea) {
    margin-top: 15px;
    transition: all 0.15s ease;
}

.hsf-form-wrap .hs-form-field:has(.input textarea) label {
    transform: translateY(31px);
    transition: all 0.15s ease;
}

/* Label floats UP when focused or filled */
.hsf-form-wrap .hs-form-field:has(.input input[type="email"]):focus-within label,
.hsf-form-wrap .hs-form-field:has(.input input[type="email"]:not([value=""])) label,
.hsf-form-wrap .hs-form-field:has(.input input[type="number"]):focus-within label,
.hsf-form-wrap .hs-form-field:has(.input input[type="number"]:not([value=""])) label,
.hsf-form-wrap .hs-form-field:has(.input input[type="text"]):focus-within label,
.hsf-form-wrap .hs-form-field:has(.input input[type="text"]:not([value=""])) label,
.hsf-form-wrap .hs-form-field:has(.input input[type="tel"]):focus-within label,
.hsf-form-wrap .hs-form-field:has(.input input[type="tel"]:not([value=""])) label,
.hsf-form-wrap .hs-form-field:has(.input select):focus-within label,
.hsf-form-wrap .hs-form-field:has(.input textarea):focus-within label,
.hsf-form-wrap .hs-form-field:has(.input textarea.filled) label,
.hsf-form-wrap .hs-form-field:has(.input > select:not(.is-placeholder)) label {
    transform: none;
    padding-bottom: 8px;
}

.hsf-form-wrap .hs-form-field:has(.input input[type="email"]):focus-within,
.hsf-form-wrap .hs-form-field:has(.input input[type="email"]:not([value=""])),
.hsf-form-wrap .hs-form-field:has(.input input[type="number"]):focus-within,
.hsf-form-wrap .hs-form-field:has(.input input[type="number"]:not([value=""])),
.hsf-form-wrap .hs-form-field:has(.input input[type="text"]):focus-within,
.hsf-form-wrap .hs-form-field:has(.input input[type="text"]:not([value=""])),
.hsf-form-wrap .hs-form-field:has(.input input[type="tel"]):focus-within,
.hsf-form-wrap .hs-form-field:has(.input input[type="tel"]:not([value=""])),
.hsf-form-wrap .hs-form-field:has(.input select):focus-within,
.hsf-form-wrap .hs-form-field:has(.input textarea):focus-within,
.hsf-form-wrap .hs-form-field:has(.input textarea.filled),
.hsf-form-wrap .hs-form-field:has(.input > select:not(.is-placeholder)) {
    margin-top: 0;
    transition: all 0.15s ease;
}

.hsf-form-wrap select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.81066 6.75L3.75 7.81066L9.0533 13.114L14.3566 7.81066L13.2959 6.75L9.0533 10.9926L4.81066 6.75Z' fill='%23414042'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 18px 18px;
    padding-right: 24px;
}

.hsf-form-wrap select:not(:focus):has([disabled]:checked) {
    color: transparent;
}

/* Errors */
.hsf-form-wrap [role="alert"] {
    padding-top: 4px;
    font-size: 14px;
    line-height: 1.25;
    color: var(--color-gray-dark);
}

.hsf-form-wrap .hs-error-msg {
    color: var(--color-error);
    margin-top: 0;
    transform: none;
}

.hsf-form-wrap .hs-form-field:has(.hs-error-msgs) label {
    color: var(--color-error);
}

.hsf-form-wrap .input.error:has(> select),
.hsf-form-wrap textarea.error,
.hsf-form-wrap input:not([type="file"]).error {
    border-bottom-color: var(--color-error);
    color: var(--color-error);
}

/* Two-column form fields */
.hsf-form-wrap .form-columns-2 {
    display: block;
}

@media (min-width: 768px) {
    .hsf-form-wrap .form-columns-2 {
        display: flex;
        gap: 20px;
        align-items: flex-end;
    }

    .hsf-form-wrap .form-columns-2 > div {
        flex: 1;
    }
}

/* Submit button */
.hsf-form-wrap [type="submit"] {
    margin-top: 16px;
    background: var(--color-black);
    color: var(--color-white);
    padding: 14px 20px;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
	border-bottom: 1px solid rgb(160 160 160);
}

.hsf-form-wrap [type="submit"]:hover {
    background: var(--color-gray-dark);
}

/* Legal consent */
.hsf-form-wrap .legal-consent-container .hs-richtext,
.hsf-form-wrap .legal-consent-container p {
    font-size: 12px;
    margin-top: 19px;
}

.hsf-form-wrap .legal-consent-container a {
    color: var(--color-teal);
    text-decoration: underline;
}

/* ==========================================================================
   Checkbox / Radio
   ========================================================================== */

.hsf-form-wrap input[type="checkbox"],
.hsf-form-wrap input[type="radio"] {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    margin: 0;
    opacity: 0;
    z-index: 1;
    cursor: pointer;
}

.hsf-form-wrap ul > li > label:has(input[type="checkbox"], input[type="radio"]) {
    position: relative;
    display: flex;
    width: fit-content;
    cursor: pointer;
    justify-content: flex-start;
    padding-left: 30px;
}

.hsf-form-wrap ul > li:not(:last-child) > label:has(input[type="checkbox"], input[type="radio"]) {
    padding-bottom: 10px;
}

.hsf-form-wrap .hs-form-field > label:first-child,
.hsf-form-wrap label.hs-error-msg:before {
    content: none !important;
}

.hsf-form-wrap .hs-form-field:has(.input input[type="checkbox"]) > label:first-child,
.hsf-form-wrap .hs-form-field:has(.input input[type="radio"]) > label:first-child {
    padding-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
}

/* Checkbox box */
.hsf-form-wrap ul > li > label:has(input[type="checkbox"]):before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    border: 2px solid var(--color-gray-medium);
}

.hsf-form-wrap ul > li > label:has(input[type="checkbox"]:focus-visible):before {
    outline: 2px solid #ff9682;
}

.hsf-form-wrap ul > li > label:has(input[type="checkbox"]):hover:before,
.hsf-form-wrap ul > li > label:has(input[type="checkbox"]:checked):before {
    border-color: var(--color-teal);
    background-color: var(--color-teal);
    transition: all 0.15s ease;
}

.hsf-form-wrap ul > li > label:has(input[type="checkbox"]:checked):after {
    content: "";
    position: absolute;
    top: 0;
    left: 5.5px;
    height: 17px;
    width: 8.5px;
    transform: rotate(45deg);
    border-radius: 4px;
    border-bottom: 2px solid var(--color-white);
    border-right: 2px solid var(--color-white);
}

.hsf-form-wrap .hs-fieldtype-checkbox .hs-error-msgs {
    padding-top: 12px;
}

/* Radio circle */
.hsf-form-wrap ul > li > label:has(input[type="radio"]):before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    border-radius: 9999px;
    border: 2px solid var(--color-gray-medium);
}

.hsf-form-wrap ul > li > label:has(input[type="radio"]:checked):before {
    border-radius: 9999px;
    border: 6px solid var(--color-teal);
}

.hsf-form-wrap form h1 {
    font-size: 32px;
    padding-top: 24px;
    padding-bottom: 24px;
    line-height: 1;
    font-weight: 300;
	margin: 0;
}

@media (min-width: 1024px) {
    .hsf-form-wrap form h1 {
        font-size: 48px;
    }
}

.hsf-form-wrap form h3 {
    padding-bottom: 24px;
}

/* Dark background variant — force white text in form inputs, since HubSpot's
   default styles hardcode dark input text regardless of surrounding theme */
.hubspot-form--dark .hs-input {
    color: #ffffff;
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.4);
}

.hubspot-form--dark .hs-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.hubspot-form--dark select.hs-input {
    color: #ffffff;
}

.hubspot-form--dark select.hs-input option {
    color: #000000; /* dropdown options render in a native OS popup — force dark text there since the popup itself is typically white-backgrounded */
}