/* ----- Shared ----- */
.input__required,
.select__required { color: var(--color-fg-error); }

.input__inner,
.select__inner { position: relative; }



/* ----- Regular text input ----- */
.input,
.input__field,
.input-text {
    display: block;
    width: 100%;
}

.input__label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 1.5rem;
    color: var(--color-fg-dark);
    transition: all .2s;
    pointer-events: none;
}

.input__field,
.input-text {
    padding: 1.188rem 1.438rem;
    color: var(--color-fg-dark);
    background: transparent;
    border: 1px solid var(--color-fg-border-input);
    border-radius: var(--border-radius-2xs);
    transition: all .2s;
}
.input--textarea .input__field { height: 12.375rem; }

.input__field:-webkit-autofill,
.input__field:-webkit-autofill:focus,
.input__field:-webkit-autofill:hover,
.input__field:-webkit-autofill:active,
.input-text:-webkit-autofill,
.input-text:-webkit-autofill:focus,
.input-text:-webkit-autofill:hover,
.input-text:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    background-color: transparent !important;
    transition: background-color 9999s ease-in-out 0s;
    -webkit-text-fill-color: var(--color-fg-dark) !important;
}

.input:has(.input__field:focus) .input__label,
.input:has(.input__field:not(:placeholder-shown)) .input__label {
    padding-block: 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
}

.input__label + .input__field:focus,
.input__label + .input__field:not(:placeholder-shown),
.input:has(.input__field:focus) .input__field,
.input:has(.input__field:not(:placeholder-shown)) .input__field {
    padding-top: 1.688rem;
    padding-bottom: 0.688rem;
}

@media ( hover: hover ) {
    .input__field:hover:not(:focus),
    .input-text:hover:not(:focus) { box-shadow: inset 0 0 0 1px var(--color-fg-border-input-focus); }
}



/* ----- Checkbox / radio ----- */
.checkbox,
.radio,
.wpcf7-acceptance,
.wpcf7-checkbox { position: relative; }

.checkbox,
.radio,
.wpcf7-acceptance label,
.wpcf7-checkbox label {
    display: block;
    overflow: hidden;
    cursor: pointer;
}

.wpcf7-acceptance span,
.wpcf7-checkbox span { display: block; }

.checkbox__input,
.radio__input,
.wpcf7-acceptance input[type="checkbox"],
.wpcf7-checkbox input[type="checkbox"] {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
}

.checkbox__label,
.radio__label,
.wpcf7-acceptance .wpcf7-list-item-label,
.wpcf7-checkbox .wpcf7-list-item-label {
    position: relative;
    padding-left: calc(var(--checkbox-size) + var(--spacing-sm));
}

.checkbox__label::before,
.radio__label::before,
.wpcf7-acceptance .wpcf7-list-item-label::before,
.wpcf7-checkbox .wpcf7-list-item-label::before {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: var(--checkbox-size);
    height: var(--checkbox-size);
    border: 1px solid var(--color-fg-border-input);
    border-radius: var(--border-radius-3xs);
    background: transparent;
    transition: background-color .2s, border-color .2s, border-width .1s;
    content: '';
}
.radio__label::before { border-radius: 50%; }

.checkbox__label-text a,
.radio__label-text a,
.wpcf7-acceptance .wpcf7-list-item-label a,
.wpcf7-checkbox .wpcf7-list-item-label a {
    font-weight: 500;
    color: var(--color-fg-primary);
}

.checkbox input:checked + .checkbox__label::before,
.wpcf7-acceptance input:checked + .wpcf7-list-item-label::before,
.wpcf7-checkbox input:checked + .wpcf7-list-item-label::before {
    background-color: var(--color-bg-primary);
    background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M4.27004 8C4.0476 8.00007 3.8342 7.91788 3.67652 7.77142L0.245842 4.56629C0.0884322 4.41934 0 4.22004 0 4.01222C0 3.80441 0.0884322 3.6051 0.245842 3.45816C0.403252 3.31121 0.616746 3.22865 0.839358 3.22865C1.06197 3.22865 1.27546 3.31121 1.43287 3.45816L4.27004 6.10674L10.5405 0.253024C10.6174 0.175176 10.7103 0.112645 10.8138 0.0691888C10.9172 0.0257328 11.0289 0.00225036 11.1423 0.000153953C11.2557 -0.00194245 11.3684 0.0173903 11.4735 0.0569897C11.5787 0.096589 11.6742 0.155637 11.7543 0.230582C11.8344 0.305527 11.8975 0.394823 11.9397 0.493097C11.9818 0.591371 12.0023 0.696594 11.9998 0.802438C11.9973 0.908283 11.9719 1.01256 11.9251 1.109C11.8783 1.20545 11.8111 1.29206 11.7276 1.36364L4.86621 7.77142C4.7074 7.9178 4.49322 7.99992 4.27004 8Z" fill="%23fff"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75rem 0.5rem;
    border-color: var(--color-fg-primary);
}

.radio input:checked + .radio__label::before {
    border-color: var(--color-fg-primary);
    border-width: 2px;
    background: radial-gradient(circle, var(--color-fg-primary) 0%, var(--color-fg-primary) 40%, transparent 40%);
}

@media ( hover: hover ) {
    .checkbox:hover .checkbox__input:not(:checked) ~ .checkbox__label::before,
    .radio:hover .radio__input:not(:checked) ~ .radio__label::before,
    .wpcf7-acceptance:hover .wpcf7-list-item-label::before,
    .wpcf7-checkbox:hover .wpcf7-list-item-label::before {
        border-color: var(--color-fg-primary);
        border-width: 2px;
    }

    .checkbox__label-text a:hover,
    .radio__label-text a:hover,
    .wpcf7-acceptance .wpcf7-list-item-label a:hover,
    .wpcf7-checkbox .wpcf7-list-item-label a:hover { text-decoration: underline; }
}

@media ( max-width: 1099px ) {
    .checkbox.fs-md-sm,
    .radio.fs-md-sm { line-height: 1.375rem; }

    .checkbox.fs-md-sm .checkbox__label,
    .radio.fs-md-sm .radio__label { padding-left: 2rem; }
}



/* ----- Radio buttons ----- */
.radio-button,
.radio-button__label {
    position: relative;
    display: block;
}

.radio-button__input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
}

.radio-button__label {
    padding: 1.188rem;
    color: var(--color-fg-dark);
    border: 1px solid var(--color-fg-border-input);
    border-radius: var(--border-radius-2xs);
    cursor: pointer;
    transition: all .2s;
}

.radio-button__input:checked + .radio-button__label {
    font-weight: 500;
    background: var(--color-bg-light);
}

@media ( hover: hover ) {
    .radio-button:hover .radio-button__input:not(:checked) ~ .radio-button__label { background: var(--color-bg-light); }
}

@media ( max-width: 1099px ) {
    .radio-button__label { border-radius: var(--border-radius-2xs); }
}



/* ----- Select (select2)  ----- */
.select,
.select .select2-container { display: block; }

.select .select2-container { width: 100% !important; }

.select .select2:focus-visible,
.select .select2-container--focus { outline: none; }

.select .select2-container .select2-selection--single {
    height: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 1px solid var(--color-fg-border-input);
    border-radius: var(--border-radius-2xs);
    outline: none !important;
    transition: all .2s;
}

.select .select2-container--default .select2-selection--single .select2-selection__rendered,
.select .select2-container--default .select2-selection--single .select2-selection__placeholder {
    padding: 0;
    line-height: inherit;
    color: var(--color-fg-dark);
}

.select__current-value { padding: 1.188rem 1.438rem; }
.select__current-value.has-placeholder { padding: 0.438rem 1.438rem 0.688rem; }

.select__placeholder {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
}

.select .select2-selection__arrow { display: none; }

@media ( hover: hover ) {
    .select .select2-container--default .select2-selection--single:hover { box-shadow: inset 0 0 0 1px var(--color-fg-border-input-focus); }
}



/* ----- Validation ----- */
.error-tip,
.wpcf7-not-valid-tip {
    display: block;
    margin-top: 0.5rem;
    color: var(--color-fg-error);
}

.input.input-error .input__label,
.checkbox.input-error .checkbox__label,
.radio.input-error .radio__label { color: var(--color-fg-error); }



/* ----- Disabled state ----- */
.checkbox__input:disabled + .checkbox__label,
.radio__input:disabled + .radio__label { opacity: 0.5; }



/* ----- Response ----- */
.wpcf7-response-output:not(:empty) {
    margin-top: var(--spacing-md);
    text-align: center;
}

.wpcf7-form.invalid .wpcf7-response-output { color: var(--color-fg-error); }