.gform_wrapper,
.gform_confirmation_wrapper {
    background: #FFF;
    padding: 44px;
    border-radius: 44px;
    max-width: 850px;
}
.gform_wrapper code {
    font-family: inherit;
}
.gform_footer {
    margin-top: 24px;
}

.gform_fields {
    flex-wrap: wrap;
}
.gfield {
    --custom-theme-flex-span: 12;
}
.gfield--width-five-twelfths {
    --custom-theme-flex-span: 5;
}
.gfield--width-half {
    --custom-theme-flex-span: 6;
}
.gfield--width-seven-twelfths {
    --custom-theme-flex-span: 7;
}
.gfield--width-two-thirds {
    --custom-theme-flex-span: 8;
}

.gfield--width-third {
    --custom-theme-flex-span: 4;
}
.ginput_complex .ginput_left,
.ginput_complex .ginput_right {
    --custom-theme-flex-span: 6;
}
.gform_hidden {
    display: none!important;
}
.gfield--type-section .gsection_title {
    display: none;
}
.gf_clear {
    display: none;
}


.gfield_required {
    color: var(--wp--preset--color--beige-2);
    margin-left: 0.03em;
}
.gfield_label,
.gform-field-label--type-sub {
    font-size: 1rem;
    line-height: 1.5;
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}
.hidden_label > .gfield_label {
    display: none;
}

.form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"])),
.form select,
.form textarea,
.custom-select__inner {
    border: 1px solid var(--wp--preset--color--beige-2);
    border-radius: 4px;
    background: #FFF;
    height: 40px;
    padding: 8px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s ease-out;
    color: inherit;
}
.form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"])):focus,
.form select:focus,
.form textarea:focus,
.custom-select__inner:has(.custom-select__dropdown-btn:focus),
.custom-select.is-open .custom-select__inner {
    border: 1px solid var(--wp--preset--color--brown);
    outline: 0;
}
.form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]))::placeholder,
.form select::placeholder,
.form textarea::placeholder {
    color: var(--wp--preset--color--beige-2);
    opacity: 1;
}

.form textarea {
    resize: none;
    height: 140px;
}
.form select {
    max-width: 100%;
}
.custom-select {
    position: relative;
}
.custom-select.is-open {
    z-index: 100;
}
.custom-select__inner {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    font-size: 1rem;
    line-height: 1.5;
    height: 40px;
}

.custom-select.is-open .custom-select__inner {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.custom-select__inner .icon-chevron {
    margin-right: 16px;
    flex: 0 0 8px;
}
.custom-select.is-open .custom-select__inner .icon-chevron {
    transform: scaleY(-1);
}
.custom-select__selected-content {
    display: flex;
    gap: 0.3em;
    flex: 0 0 calc(100% - 0.3em - 24px);
    width: calc(100% - 0.3em - 24px);
}
.custom-select__selected-content::before {
    content: attr(data-value);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 0 calc(100% - 2em);
}
.custom-select__selected-content::after {
    content: attr(data-extra-values);
}

.custom-select__dropdown-btn {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.custom-select__dropdown {
    position: absolute;
    top: 100%;
    background: #FFF;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border: 1px solid var(--wp--preset--color--brown);
    border-top: 0;
    padding: 8px;

    display: flex;
    flex-direction: column;
    gap: 8px;

    max-height: 200px;
    overflow: auto;
    width: 100%;
    margin: 0;
}

.custom-select__dropdown[aria-hidden="true"] {
    display: none;
}
.custom-select__option {
    position: relative;
}
.custom-select__optgroup,
.custom-select__option {
    list-style-type: none;
}
.custom-select__option__label,
.custom-select__optgroup__label {
    font-size: 0.8125rem;
    font-weight: 400;
    padding: 4px 8px;
    display: flex;
    gap: 4px;
    align-items: center;
    border-radius: 2px;
    cursor: pointer;
}
.custom-select__optgroup__label {
    font-size: 1rem;
    font-weight: 600;
}
.custom-select__optgroup__options {
    padding-left: 8px;
    list-style-type: none;
}

.custom-select__dropdown input:focus {
    opacity: 0;
}
.custom-select__dropdown input:focus-visible + .custom-select__option__label {
    outline: 1px solid;
}
.custom-select__dropdown input:hover + .custom-select__option__label {
    background: var(--wp--preset--color--beige-1);
}
.custom-select__dropdown input:checked + .custom-select__option__label {
    background: var(--wp--preset--color--beige-2);
}
.custom-select__dropdown input:disabled + .custom-select__option__label {
    pointer-events: none;
    cursor: default;
    color: var(--wp--preset--color--beige-2);
}


.gfield input[type="checkbox"],
.gfield input[type="radio"] {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

fieldset.gfield--type-consent,
fieldset.gfield--type-email,
fieldset.gfield--type-password {
    padding: 0;
    border: 0;
    margin: 0;
}
.gfield_consent_label,
.gfield_checkbox label {
    position: relative;
    padding-left: 32px;
}
.gfield_consent_label::before,
.gfield_checkbox label::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    background: #FFF;
    width: 18px;
    height: 18px;
    border: 1px solid var(--wp--preset--color--beige-2);
    border-radius: 2px;
    line-height: 18px;
    text-align: center;
}
.gfield_consent_label .gfield_required {
    display: none;
}
.gfield--type-consent input:checked + .gfield_consent_label::before,
.gfield_checkbox  input:checked + label::before{
    content: '✓';
}

.gfield_consent_label a {
    color: inherit;
    font-weight: 700;
}
.gfield_radio {
    display: flex;
}
.gfield_radio > div {
    margin-right: 20px;
    position: relative;
}
.gfield_radio label {
    position: relative;
    padding-left: 32px;
    max-width: none;
}
.gfield_radio label:before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    background: #FFF;
    width: 18px;
    height: 18px;
    border: 1px solid var(--wp--preset--color--beige-2);
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
}
.gfield_radio input:checked + label:before {
    content: '✓';
}

.gfield_validation_message {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-top: 5px;
    color: var(--wp--preset--color--red);
    font-style: italic;
}
.gform_confirmation_message {
    color: var(--wp--preset--color--green);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin-top: 10px;
}
.gform_submission_error {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wp--preset--color--red);
}
.gform_validation_errors {
    outline: 0!important;
}

.gfield--type-honeypot {
    display: none !important;
    left: -9000px;
    position: absolute !important;
}

@media screen and (max-width: 767px) {

    .gfield--width-half,
    .gfield--width-seven-twelfths,
    .gfield--width-two-thirds,
    .gfield--width-third,
    .gfield--width-five-twelfths,
    .ginput_complex .ginput_left,
    .ginput_complex .ginput_right {
        --custom-theme-flex-span: 12;
    }

}


/* Filters */

.filter--search-terms {
    position: relative;
}
.filter--search-terms .icon-magnifying-glass {
    pointer-events: none;
    position: absolute;
    top: 13px;
    right: 15px;
}
.filter-tag-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5625;
    border: 1px solid;
    padding: 4.5px 11px;
    border-radius: 3px;
    transition: 0.2s ease-out;
}
.filter-tag-btn:hover {
    border-color: var(--wp--preset--color--red);
}

.filter-tag-btn:not([aria-pressed="true"]) .icon-remove {
    display: none;
}

.form--filters .custom-select__inner {
    padding: 8px 16px;
    background: #FFF;
    border-radius: 20px;

}

.form--filters .custom-select__option__label {
    border-radius: 8px;
}
.form--filters .custom-select__dropdown {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border: 0;
}


.form--filters input:where(:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"])),
.form--filters textarea,
.form--filters .custom-select__inner {
    border: 0!important;
}

.selected-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.selected-filters__title {
    font-size: 0.8125rem;
    line-height: 1.61;
    font-weight: 600;
}
.selected-filters__list {
    display: flex;
    gap: 4px;
}
.selected-filters__reset {
    font-size: 0.8125rem;
    line-height: 1.61;
    font-weight: 600;
    text-decoration: underline;
}
.selected-filters__filter {
    display: flex;
    white-space: nowrap;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8125rem;
    line-height: 1.54;
    font-weight: 600;
    padding: 3px 8px 3px 10px;
    border: 1px solid #7E8C9F;
    border-radius: 14px;
}
.selected-filters__filter:nth-child(4) ~ .selected-filters__filter {
    display: none;
}
.selected-filters__list::after {
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid #7E8C9F;
    border-radius: 50%;
}
.selected-filters__list:has(.selected-filters__filter:nth-child(5))::after {
    content: "+" attr(data-count-extra-filters);
}

.form-toggle-bar,
.sticky-filters__actions {
    display: none;
}
.form.sticky-filters {
    position: sticky;
    z-index: var(--custom-theme-z-index-sticky);
    background: var(--wp--preset--color--beige-0);
    display: block;
    border-bottom: 1px solid var(--wp--preset--color--brown);
    transition: top 0.3s ease-out;
}


@media screen and (max-width: 1439px) {
    .form-toggle-bar {
        display: flex;
        justify-content: space-between;
        position: sticky;
        z-index: var(--custom-theme-z-index-sticky);
        top: var(--custom-theme-site-header-height);
        padding-top: 12px;
        padding-bottom: 12px;
        background: var(--wp--preset--color--beige-2);
        margin-bottom: 24px;
        transition: top 0.3s ease-out;
    }
    .site:has(.site-header.is-scrolling-down) .form-toggle-bar {
        top: 0;
    }
    .form-toggle-btn {
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
        font-weight: 600;
        margin-left: auto;
    }
    .form-toggle-btn .icon {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--wp--preset--color--beige-1);
        padding: 10px;
    }

    .selected-filters.is-enabled + .form-toggle-btn > span {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .form.sticky-filters {
        position: fixed;
        left: 0;
        opacity: 0;
        pointer-events: none;
        margin: 0!important;
        border: 0;
        bottom: 0;
        padding-top: 44px;
        padding-bottom: 44px;

        transition: opacity 0.5s ease-out, top 0.3s ease-out;
    }
    .form.sticky-filters[aria-hidden="false"] {
        opacity: 1;
        pointer-events: initial;
    }

    .sticky-filters__actions {
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: flex-end;
        --custom-theme-flex-span: 12;
    }
    .sticky-filters__actions__close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: 600;
    }
    .sticky-filters__actions__close-btn .icon {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--wp--preset--color--beige-2);
        padding: 10px;
    }
}

@media screen and (max-width: 991px) {
    .selected-filters__filter {
        display: none;
    }

    .selected-filters__list::after {
        content: attr(data-count-filters) !important;
    }
}

@media screen and (max-width: 767px) {
    .gform_wrapper {
        padding: 32px;
        margin-left: -12px;
        margin-right: -12px;
    }
    .sticky-filters {
        padding-top: 32px;
        padding-bottom: 32px;
        overflow: auto;
    }
    .sticky-filters .selected-filters {
        order: 101;
    }
    .form-toggle-btn {
        font-size: 0.8125rem;
    }
}
@media screen and (max-width: 374px) {
    .form-toggle-bar {
        padding-left: 12px!important;
        padding-right: 12px!important;
    }
}
