/*
 * HubSpot Form Styling
 * Targets a Raw HTML Form Embed
 */

/* Main container for the form, creating the card effect. */
.hubspot-form-container {
    padding: 0;
    width: 100%;
    max-width: 600px;
    min-width: 315px;
}

.fancybox-slide #contact-modal {
    background-color: transparent;
}

.hubspot-form-container .hsfc-Step__Content {
    padding: 0 !important;
}

.hubspot-form-container .hsfc-Row .hsfc-TextField {
    width: unset;
}

.hubspot-form-container h2 {
    color: #ffffff;
    font-weight: bold;
    font-size: 22px;
    text-align: left;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    border-left: 5px solid #63d8c2;
    padding-left: 15px;
    text-transform: uppercase;
}

.hubspot-form-container iframe {
    border-radius: unset;
    padding: 0;
    margin: 0;
    background-color: unset;
    backdrop-filter: unset;
}

.hsfc-FieldLabel {
    color: var(--color-white) !important;
    display: block !important; /* Ensure labels are visible */
}

/* General styling for all text inputs and dropdowns */
.hsfc-TextInput,
.hsfc-DropdownInput .hsfc-TextInput {
    background-color: #ffffff !important;
    border: 1px solid #cbd5db !important;
    border-radius: var(--border-radius) !important; /* Use the custom border-radius variable */
    padding: 15px 20px !important;
    font-size: 15px !important;
    color: #33475b !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Add space between form field rows */
form > .hsfc-Step > .hsfc-Step__Content > .hsfc-Row {
    margin-bottom: 20px;
}

/* For rows with two fields (e.g., First and Last Name) */
.hsfc-Row .hsfc-TextField {
  width: 100%;
}

@media (min-width: 768px) {
    .hsfc-Row {
        display: flex;
        justify-content: space-between;
    }
    .hsfc-Row .hsfc-TextField,
    .hsfc-Row .hsfc-DropdownField {
        width: 49%; /* Adjusted to 49% to allow for space-between */
    }
    .hsfc-Row .hsfc-TextField:only-child,
    .hsfc-Row .hsfc-EmailField:only-child,
    .hsfc-Row .hsfc-DropdownField:only-child {
        width: 100%;
    }
}


/* Style dropdowns to look like text inputs */
.hsfc-DropdownInput .hsfc-TextInput--button {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23506172%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 18px;
}

.hsfc-DropdownInput__Caret {
    display: none; /* Hide default caret, we use a background image */
}

/* Checkbox styling */
.hsfc-CheckboxFieldGroup {
    color: #fff;
    font-size: 14px;
}

.hsfc-CheckboxFieldGroup .hsfc-FieldLabel {
    display: inline-flex !important; /* Show checkbox labels */
    align-items: center;
    color: #fff;
    margin-bottom: 10px;
    width: 100%;
}

.hsfc-CheckboxInput {
    margin-right: 10px;
}


/* Submit Button */
.hsfc-Button {
    background-color: #63d8c2 !important;
    border: none !important;
    border-radius: 25px !important;
    color: white !important;
    font-weight: bold !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    padding: 16px 30px !important;
    cursor: pointer !important;
    margin: 15px auto 0 auto !important; /* Center the button */
    display: table !important;
    transition: background-color 0.3s ease;
}

.hsfc-Button:hover {
    background-color: #74e0ca !important;
}

/* Legal consent text at the bottom */
.hsfc-DataPrivacyField .hsfc-RichText {
    color: #ffffff !important;
    font-size: 12px !important;
    text-align: center !important;
    max-width: 90%;
    margin: 0 auto;
    padding-top: 10px;
}

.hsfc-DataPrivacyField .hsfc-RichText a {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Hide the initial paragraph text if you add a title */
.hsfc-Form .hsfc-RichText:first-child p {
    color: var(--color-white) !important;
    text-wrap: balance;
}

/* Phone Number Field Styling */
.hsfc-PhoneField {
    display: flex !important;
    width: 100% !important;
    flex-direction: column;
}

/* Country code dropdown part */
.hsfc-PhoneField .hsfc-DropdownInput .hsfc-TextInput {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
    width: auto !important; /* Allow dropdown to size naturally */
    flex-shrink: 0; /* Prevent it from shrinking */
}

/* Phone number input part */
.hsfc-PhoneField .hsfc-TextField {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: none !important;
    flex-grow: 1; /* Allow it to take remaining space */
}

/* Adjust padding for dropdown to align text */
.hsfc-PhoneField .hsfc-DropdownInput .hsfc-TextInput--button {
    padding-right: 10px !important; /* Adjust if the caret image causes misalignment */
}

/* Ensure phone field label and input group stack vertically */
.hsfc-TextField:has(.hsfc-PhoneField) {
    display: flex !important;
    flex-direction: column !important; /* Stack label and input group */
}
.hsfc-TextField:has(.hsfc-PhoneField) .hsfc-FieldLabel {
    margin-bottom: 5px !important; /* Space after label */
}

.hsfc-PhoneInput {
    display: flex;
    width: 100%;
}

.hsfc-PhoneInput .hsfc-PhoneInput__FlagAndCaret {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: 0;
    box-shadow: none;
    border: none;
}

.hsfc-PhoneInput .hsfc-TextInput {
    border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}

.hubspot-form-container .hsfc-DropdownOptions {
    border-radius: var(--border-radius);
    border: none;
}

.hubspot-form-container .hsfc-DropdownOptions .hsfc-DropdownOptions__Search .hsfc-TextInput {
    border-radius: var(--border-radius) !important;
}

.fancybox-close-small {
    --bg-color: rgb(251, 45, 18);
    background-color: var(--bg-color);
    border-radius: 50% !important;
}

.fancybox-close-small::after {
    background-color: transparent;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    font-size: 2rem;
    border: none;
    color: var(--color-white) !important;
    transition: 0.8s;
}

.fancybox-close-small:hover::after {
    background-color: transparent;
    border: none;
    color: var(--color-white) !important;
    transform: translate(-50%, -50%) rotate(180deg);
}

.fancybox-close-small:hover::after {
    outline: none !important;
}

.hsfc-ReCaptchaV2 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.4rem;
}

.hubspot-form-container .hsfc-NavigationRow {
    margin-top: 0 !important;
}

.hubspot-form-container .hsfc-NavigationRow__Alerts {
    margin-bottom: 0 !important;
}

.hubspot-form-container .hsfc-Button {
    margin-bottom: 20px !important;
    margin-top: 0px !important;
    padding: 14px 64px !important;
}