/* ==========================================================================
   Content HubSpot Form
   Styles the HubSpot embed form (.hs-form) to match the existing
   content-form design system.
   ========================================================================== */

.content-hubspot-form {
    position: relative;
}

/* Form layout
   ========================================================================== */

.content-hubspot-form .hs-form {
    margin-left: -15px;
    margin-right: -15px;
}

/* Clearfix */
.content-hubspot-form .hs-form:before,
.content-hubspot-form .hs-form:after {
    content: " ";
    display: table;
}
.content-hubspot-form .hs-form:after {
    clear: both;
}

/* Form field groups
   ========================================================================== */

.content-hubspot-form .hs-form-field {
    position: relative;
    float: left;
    width: 100%;
    margin-bottom: 45px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Labels
   ========================================================================== */

.content-hubspot-form .hs-form-field > label {
    display: inline-block;
    font-weight: 500;
    margin: 0 0 5px 0;
    padding: 0;
    white-space: nowrap;
}

.content-hubspot-form .hs-form-required {
    margin-left: 2px;
}

/* Inputs & Textarea
   ========================================================================== */

.content-hubspot-form .hs-input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    height: 60px;
    border: 1px solid rgba(203, 201, 200, 1);
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 1rem;
    padding: 0 15px;
    -webkit-appearance: none;
    min-width: 0;
    transition: border-color .2s;
}


.content-hubspot-form .hs-input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #f96915;
    outline: none;
}

.content-hubspot-form .hs-fieldtype-textarea {
    height: auto;
    min-height: 120px;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    resize: vertical;
}

/* Select
   ========================================================================== */

.content-hubspot-form select.hs-input {
    width: 100%;
    height: 60px;
    border: 1px solid rgba(203, 201, 200, 1);
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 1rem;
    padding: 0 15px;
    -webkit-appearance: none;
    cursor: default;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23777'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.content-hubspot-form select.hs-input.is-placeholder {
    color: #777;
}

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

.content-hubspot-form .inputs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.content-hubspot-form .inputs-list li.hs-form-booleancheckbox {
    display: flex;
}
.content-hubspot-form .legal-consent-container .hs-form-booleancheckbox-display > span {
    margin-left: 0;
}

.content-hubspot-form .hs-form-booleancheckbox-display {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.content-hubspot-form .hs-form-booleancheckbox-display input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    cursor: default;

    @media (min-width: 768px) {
        margin-top: 6px;
    }
    @media (min-width: 992px) {
        margin-top: 7px;
    }
}

/* Legal consent container
   ========================================================================== */

.content-hubspot-form .legal-consent-container {
    padding-left: 15px;
    padding-right: 15px;
    float: left;
    width: 100%;
    margin-bottom: 45px;
    overflow: visible;
}

.content-hubspot-form .legal-consent-container .hs-form-field {
    float: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 20px;
}

.content-hubspot-form .hs-richtext {
    font-size: .875rem;
    color: #777;
    line-height: 1.5;
    width: 100%;
    display: block;
    clear: both;
}
.content-hubspot-form .hs-fieldtype-select .input {
    position: relative;
}
.content-hubspot-form .hs-fieldtype-select .input:after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    margin-top: -2px;
    border-top: 6px solid #f96915;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

.content-hubspot-form .hs-data_protection_accepted .hs-field-desc {
    margin-bottom: 1rem;
}

/* Validation errors
   ========================================================================== */
.content-hubspot-form .hs-form-field:has(.hs-error-msgs) > label {
    color: #ff0606;
}
.content-hubspot-form .hs-error-msgs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.content-hubspot-form .hs-error-msg {
    display: block;
    padding: 2px 5px;
    font-size: .8em;
    font-weight: bold;
    color: #fff;
    background: #ff0606;
    border-radius: 0 0 3px 3px;
}

/* Boolean checkbox error: no input element above, so round all corners */
.content-hubspot-form .hs-fieldtype-booleancheckbox .hs-error-msgs {
    margin-top: 5px;
}
.content-hubspot-form .hs-fieldtype-booleancheckbox .hs-error-msg {
    border-radius: 3px;
}

/* Override HubSpot inline style that sets label color to light red */
.content-hubspot-form .legal-consent-container .hs-error-msgs label {
    color: #fff !important;
}

.content-hubspot-form .hs-form-field.error .hs-input,
.content-hubspot-form .hs-form-field.invalid.error .hs-input {
    border-color: #ff0606;
}

/* Submit button
   ========================================================================== */

.content-hubspot-form .hs-submit {
    padding-left: 15px;
    padding-right: 15px;
    float: left;
    width: 100%;
    text-align: right;
    margin-bottom: 0;
}

.content-hubspot-form .hs-button {
    display: inline-block;
    position: relative;
    padding: 12px 20px;
    font-size: 1rem;
    line-height: 1.5;
    text-decoration: none;
    border: 0;
    border-radius: 2.5px;
    color: #fff;
    background: #F96916;
    cursor: pointer;
    -webkit-appearance: none;
    transition: background .2s;
}

.content-hubspot-form .hs-button:hover,
.content-hubspot-form .hs-button:focus {
    background: #e05c10;
    outline: none;
}

/* Hidden iframe used by HubSpot for form submission
   ========================================================================== */

.content-hubspot-form iframe[name^="target_iframe_"] {
    display: none !important;
}

/*  Success Message
    ========================================================================= */
.content-hubspot-form .submitted-message {
    background: #fff;
    padding: 1rem;
    border: 1px solid #e05c10;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

@media ( min-width: 768px ) {
    .content-hubspot-form .hs-form-field {
        width: 50%;
    }
    .content-hubspot-form .hs-data_protection_accepted,
    .content-hubspot-form .hs-form-field.hs-fieldtype-textarea,
    .content-hubspot-form .legal-consent-container,
    .content-hubspot-form .hs-submit {
        width: 100%;
    }
}

