/* --------------------------------------------------------------------------
 * HubSpot forms — consistent styling for every embed on the site.
 * Targets HubSpot's stable class names so any new form uses this styling
 * automatically.
 * -------------------------------------------------------------------------- */

/* ---- Outer container ---- */
.hbspt-form {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Form root ---- */
.hs-form {
    width: 100%;
    font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #212529;
}

.hs-form,
.hs-form * {
    box-sizing: border-box;
}

/* HubSpot inserts a hidden iframe at the end of the form — keep it hidden. */
.hs-form iframe[name^="target_iframe_"] {
    display: none !important;
}

/* ---- Fieldsets ----
   HubSpot outputs .form-columns-0 / -1 / -2 to control layout. Grid gives
   us reliable responsive columns without the inline-block hacks HubSpot
   ships by default.
   - form-columns-0 : single full-width slot (used for header images, etc.)
   - form-columns-1 : one column
   - form-columns-2 : two columns on desktop, stacks on mobile
*/
.hs-form fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 20px;
    /* !important beats HubSpot's per-instance rules:
       - .hs-form-<uuid>_<uuid> fieldset { max-width: 500px }
       - .hs-form-<uuid>_<uuid> fieldset { display: flex } (the `flex` class) */
    max-width: 100% !important;
    width: 100%;
    display: grid !important;
    gap: 18px 24px;
    grid-template-columns: 1fr !important;
}

.hs-form fieldset.form-columns-0,
.hs-form fieldset.form-columns-1 {
    grid-template-columns: 1fr !important;
}

@media (min-width: 640px) {
    .hs-form fieldset.form-columns-2 {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Rich-text blocks, dependent-fields, terms-checkbox rows, and the message
   textarea should span both columns when inside a form-columns-2 fieldset. */
.hs-form fieldset.form-columns-2 > .hs-richtext,
.hs-form fieldset.form-columns-2 > .hs-main-font-element,
.hs-form fieldset.form-columns-2 > .hs-dependent-field,
.hs-form fieldset.form-columns-2 > .hs_i_accept_the_above_terms_and_conditions_,
.hs-form fieldset.form-columns-2 > .hs_message {
    grid-column: 1 / -1 !important;
}

.hs-form fieldset .input,
.hs-form fieldset > div {
    max-width: none;
}

/* ---- Field wrapper ----
   HubSpot ships per-instance rules that set width: 50% + float: left on
   fields inside .form-columns-2 to fake a two-column layout. We're using
   CSS Grid, so those rules break our layout — kill them here. */
.hs-form-field,
.hs-form fieldset.form-columns-2 .hs-form-field,
.hs-form fieldset.form-columns-1 .hs-form-field {
    margin: 0;
    position: relative;
    width: auto !important;
    float: none !important;
    max-width: none !important;
}

.hs-form-field > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

/* Most inputs use empty <label><span></span></label> and rely on placeholder.
   Hide the empty label to prevent an unwanted gap above the field. */
.hs-form-field > label:has(> span:empty:only-child) {
    display: none;
}

.hs-form-required {
    color: #F3740D;
    margin-left: 3px;
    font-weight: 700;
}

/* ---- Inputs ---- */
.hs-form .hs-input {
    width: 100% !important;
    display: block;
    height: 48px;
    padding: 10px 16px;
    font: inherit;
    color: #212529;
    background-color: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 10px;
    box-shadow: none;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.hs-form textarea.hs-input,
.hs-form .hs-fieldtype-textarea .hs-input {
    height: auto;
    min-height: 130px;
    resize: vertical;
    line-height: 1.5;
    padding-top: 12px;
    padding-bottom: 12px;
}

.hs-form select.hs-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23495057' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.hs-form .hs-input::placeholder {
    color: #6c757d;
    opacity: 1;
}

.hs-form .hs-input:hover {
    border-color: #adb5bd;
}

.hs-form .hs-input:focus {
    border-color: #0457A5;
    box-shadow: 0 0 0 3px rgba(4, 87, 165, 0.15);
    background-color: #ffffff;
}

.hs-form .hs-input:disabled,
.hs-form .hs-input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* ---- Error / invalid state ---- */
.hs-form .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 6px 0 0;
    font-size: 13px;
    color: #d63384;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hs-form .hs-input.invalid,
.hs-form .hs-input.error,
.hs-form .invalid .hs-input {
    border-color: #d63384;
}

.hs-form .hs-input.invalid:focus,
.hs-form .hs-input.error:focus {
    box-shadow: 0 0 0 3px rgba(214, 51, 132, 0.15);
}

/* ---- Radios & checkboxes ---- */
.hs-form .inputs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hs-form .inputs-list.multi-container {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px 18px;
}

.hs-form .hs-form-radio,
.hs-form .hs-form-checkbox,
.hs-form .hs-form-booleancheckbox {
    padding: 0;
    margin: 0;
}

.hs-form .hs-form-radio-display,
.hs-form .hs-form-checkbox-display,
.hs-form .hs-form-booleancheckbox-display {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: #212529;
    cursor: pointer;
    line-height: 1.4;
    margin: 0;
}

/* Custom-styled radios & checkboxes.
   Tailwind Preflight sets appearance: none on inputs, killing native
   checked visuals. We paint our own so the checked state is always
   clearly visible regardless of browser/theme reset order. */
.hs-form .hs-form-radio-display input[type="radio"],
.hs-form .hs-form-checkbox-display input[type="checkbox"],
.hs-form .hs-form-booleancheckbox-display input[type="checkbox"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    width: 18px !important;
    height: 18px !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    background-color: #ffffff !important;
    border: 1.5px solid #adb5bd !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    display: inline-block !important;
    position: relative !important;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

/* Radios are round. */
.hs-form .hs-form-radio-display input[type="radio"] {
    border-radius: 50% !important;
}

/* Checkboxes are rounded-square. */
.hs-form .hs-form-checkbox-display input[type="checkbox"],
.hs-form .hs-form-booleancheckbox-display input[type="checkbox"] {
    border-radius: 4px !important;
}

/* Hover / focus visuals. */
.hs-form .hs-form-radio-display input[type="radio"]:hover,
.hs-form .hs-form-checkbox-display input[type="checkbox"]:hover,
.hs-form .hs-form-booleancheckbox-display input[type="checkbox"]:hover {
    border-color: #0457A5 !important;
}

.hs-form .hs-form-radio-display input[type="radio"]:focus-visible,
.hs-form .hs-form-checkbox-display input[type="checkbox"]:focus-visible,
.hs-form .hs-form-booleancheckbox-display input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(4, 87, 165, 0.25) !important;
    border-color: #0457A5 !important;
}

/* --- Checked states --- */

/* Radio: brand-blue border + filled dot in the center. */
.hs-form .hs-form-radio-display input[type="radio"]:checked {
    border-color: #0457A5 !important;
    background-color: #ffffff !important;
    background-image: radial-gradient(circle, #0457A5 45%, #ffffff 50%) !important;
}

/* Checkbox: brand-blue background + white check icon. */
.hs-form .hs-form-checkbox-display input[type="checkbox"]:checked,
.hs-form .hs-form-booleancheckbox-display input[type="checkbox"]:checked {
    border-color: #0457A5 !important;
    background-color: #0457A5 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8 7 12 13 4'/%3E%3C/svg%3E") !important;
    background-size: 12px 12px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Disabled state (visual only — HubSpot doesn't usually disable). */
.hs-form .hs-form-radio-display input[type="radio"]:disabled,
.hs-form .hs-form-checkbox-display input[type="checkbox"]:disabled,
.hs-form .hs-form-booleancheckbox-display input[type="checkbox"]:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.hs-form .hs-form-radio-display > span,
.hs-form .hs-form-checkbox-display > span,
.hs-form .hs-form-booleancheckbox-display > span {
    flex: 1;
}

/* Terms checkbox usually has a longer label with a required asterisk. */
.hs-form .hs-form-booleancheckbox-display {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

/* ---- Rich-text sections (headings, paragraphs, images inside the form) ----
   HubSpot ships inline styles for typography (Urbanist font, brand colors,
   specific sizes). Keep those working while providing sensible spacing
   and image behaviour. */
.hs-form .hs-richtext,
.hs-form .hs-main-font-element {
    color: #495057;
    font-size: 15px;
    line-height: 1.6;
    grid-column: 1 / -1;
}

.hs-form .hs-richtext p,
.hs-form .hs-main-font-element p {
    margin: 0 0 12px;
}

.hs-form .hs-richtext p:last-child,
.hs-form .hs-main-font-element p:last-child {
    margin-bottom: 0;
}

.hs-form .hs-richtext br + p,
.hs-form .hs-main-font-element br + p {
    margin-top: 8px;
}

.hs-form .hs-richtext img,
.hs-form .hs-main-font-element img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 0 auto 20px;
}

.hs-form .hs-richtext h1,
.hs-form .hs-richtext h2,
.hs-form .hs-richtext h3,
.hs-form .hs-richtext h4,
.hs-form .hs-main-font-element h1,
.hs-form .hs-main-font-element h2,
.hs-form .hs-main-font-element h3,
.hs-form .hs-main-font-element h4 {
    color: #0457A5;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 8px;
}

.hs-form .hs-richtext a,
.hs-form .hs-main-font-element a {
    color: #0457A5;
    text-decoration: underline;
}

.hs-form .hs-richtext a:hover,
.hs-form .hs-main-font-element a:hover {
    color: #F3740D;
}

/* Strong emphasis (e.g. "Privacy Statement" heading in the terms block). */
.hs-form .hs-richtext strong,
.hs-form .hs-main-font-element strong {
    color: #212529;
    font-weight: 700;
}

/* ---- Submit button ---- */
.hs-form .hs-submit {
    margin-top: 28px;
}

.hs-form .hs-submit .hs-field-desc {
    display: none !important;
}

.hs-form .hs-submit .actions {
    display: flex;
    justify-content: flex-start;
}

.hs-form .hs-button,
.hs-form input[type="submit"].hs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 40px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    background-color: #F3740D;
    border: 1px solid #F3740D;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    letter-spacing: 0.02em;
}

.hs-form .hs-button:hover,
.hs-form input[type="submit"].hs-button:hover {
    background-color: #d75208;
    border-color: #d75208;
}

.hs-form .hs-button:active,
.hs-form input[type="submit"].hs-button:active {
    transform: translateY(1px);
}

.hs-form .hs-button:focus-visible,
.hs-form input[type="submit"].hs-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 116, 13, 0.30);
}

.hs-form .hs-button[disabled],
.hs-form input[type="submit"].hs-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Submitted / thank-you state ---- */
.submitted-message,
.hbspt-form > .submitted-message,
.hs-form + .submitted-message {
    padding: 28px;
    background-color: #F0F7FF;
    border: 1px solid #0457A5;
    border-radius: 14px;
    color: #0457A5;
    font-size: 16px;
    line-height: 1.6;
}

/* ---- Dark-background variant ----
   Wrap the embed in an element with class="hs-form-on-dark" for forms placed
   on dark sections. */
.hs-form-on-dark .hs-form,
.hs-form-on-dark.hs-form {
    color: #ffffff;
}

.hs-form-on-dark .hs-form-field > label,
.hs-form-on-dark .hs-form .hs-form-radio-display,
.hs-form-on-dark .hs-form .hs-form-checkbox-display,
.hs-form-on-dark .hs-form .hs-form-booleancheckbox-display,
.hs-form-on-dark .hs-form .hs-richtext,
.hs-form-on-dark .hs-form .hs-main-font-element,
.hs-form-on-dark .hs-form .hs-richtext p,
.hs-form-on-dark .hs-form .hs-main-font-element p,
.hs-form-on-dark .hs-form .hs-richtext strong,
.hs-form-on-dark .hs-form .hs-main-font-element strong {
    color: rgba(255, 255, 255, 0.92);
}

.hs-form-on-dark .hs-form .hs-richtext h1,
.hs-form-on-dark .hs-form .hs-richtext h2,
.hs-form-on-dark .hs-form .hs-richtext h3,
.hs-form-on-dark .hs-form .hs-richtext h4,
.hs-form-on-dark .hs-form .hs-main-font-element h1,
.hs-form-on-dark .hs-form .hs-main-font-element h2,
.hs-form-on-dark .hs-form .hs-main-font-element h3,
.hs-form-on-dark .hs-form .hs-main-font-element h4 {
    color: #ffffff;
}

.hs-form-on-dark .hs-form .hs-input {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

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

.hs-form-on-dark .hs-form .hs-input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.hs-form-on-dark .hs-form .inputs-list.multi-container {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}
