:root {
    --c-color-white: #fff;
    --c-color-nero: #212121;
    --c-color-white-smoke: #f8f8f8;
    --c-color-whisper: #e4e4e4;
    --c-color-whisper-light: #ececec;
    --c-color-ivory: #fbfbf9;
    --c-color-grey: #7d7d7d;
    --c-color-tahiti-gold: #e86f2a;
    --c-color-blue-gem: #534496;
    --c-color-lavender-blue: #d7ceff;
    --c-color-apricot: #fed3ac;
    --c-color-seashell: #fff6ee;
    --c-color-astronaut-blue: #17455f;
    --c-color-sapphire: #12326e;
    --c-color-indian-red: #cd5c5c;
}

.visually-hidden {
    position: absolute;
    overflow: hidden;
    clip: rect(0 0 0 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    white-space: nowrap;
    border: 0;
    clip-path: inset(100%);
}

.custom-form__inputs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.custom-form__title {
    font-weight: 500;
    font-size: 30px;
    text-transform: uppercase;
    color: var(--c-color-nero);
    text-align: center;
    margin-bottom: 40px;
}

.custom-form--hidden-content .custom-form__inputs-wrapper,
.custom-form--hidden-content .custom-form__title {
    display: none;
}

.custom-input label,
.custom-textarea label {
    display: block;
}

.custom-input input,
.custom-textarea textarea {
    font-size: 16px;
    color: var(--c-color-grey);
    border-bottom: 1px solid var(--c-color-grey);
    background-color: transparent;
    padding: 20px 0;
    outline: none;
    transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.custom-input input::placeholder,
.custom-textarea textarea::placeholder {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.custom-textarea textarea {
    resize: vertical;
    min-height: 120px;
    appearance: none;
}

.custom-input input:hover,
.custom-input input:focus,
.custom-textarea textarea:hover,
.custom-textarea textarea:focus {
    color: var(--c-color-nero);
    border-color: var(--c-color-tahiti-gold);
}

.custom-input.is-invalid input,
.custom-textarea.is-invalid textarea {
    border-color: var(--c-color-indian-red);
}

.custom-input--phone-iti .iti {
    width: 100%;
}

.custom-input--phone-iti .iti .iti__selected-dial-code {
    font-weight: 600;
    font-size: 16px;
    line-height: 125%;
    color: var(--c-color-nero);
}

.custom-input--phone-iti .iti .iti__selected-dial-code::after {
    top: 2px;
}

.custom-toggles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.custom-toggle label {
    position: relative;
    cursor: pointer;
    display: flex;
    padding-top: 3px;
    padding-bottom: 3px;
}

.custom-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    clip: rect(0 0 0 0);
}

.custom-toggle--checkbox .custom-toggle__icon {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 5px;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background-color: var(--c-color-apricot);
}

.custom-toggle--checkbox .custom-toggle__icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.75 3.58L3.58 6.41L9.25 0.75' stroke='%23E86F2A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' /%3E%3C/svg%3E");
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity  0.3s ease-in-out;
}

.custom-toggle--radio .custom-toggle__icon {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 5px;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background-color: var(--c-color-apricot);
}

.custom-toggle--radio .custom-toggle__icon::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    background-color: var(--c-color-tahiti-gold);
    border-radius: 3px;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity  0.3s ease-in-out;
}

.custom-toggle input:checked + .custom-toggle__icon::before {
    opacity: 1;
}

.custom-toggle__label,
.custom-form__text-offer {
    font-size: 12px;
    color: var(--c-color-nero);
    padding-left: 34px;
}

.custom-form__text-offer {
    padding-left: 0;
}

.custom-toggle__label a,
.custom-form__text-offer a {
    display: inline;
    text-decoration: underline;
}

.custom-toggle.is-invalid .custom-toggle__label {
    color: var(--c-color-indian-red);
}

.custom-form__submit {
    font-family: inherit;
    width: 100%;
}

.custom-fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.custom-fieldset__legend {
    font-size: 16px;
    color: var(--c-color-grey);
    margin-bottom: 10px;
}

.custom-form__policy-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.custom-form__error {
    display: none;
    padding: 20px 0;
    text-align: center;
}

.custom-form__success {
    display: none;
    padding: 40px 0;
    text-align: center;
}

.custom-form__error--show,
.custom-form__success--show {
   display: block;

}

.custom-form__error-text {
    font-size: 18px;
    color: var(--c-color-indian-red);
}

.custom-form__success-title {
    font-weight: 600;
    font-size: 24px;
    color: var(--c-color-nero);
    margin-bottom: 30px;
}

.custom-form__success-text {
    font-size: 18px;
    color: var(--c-color-nero);
}

@media (max-width: 992px) {
    .custom-form__title {
        font-size: 25px;
        margin-bottom: 20px;
    }

    .custom-input input,
    .custom-textarea textarea {
        font-size: 15px;
    }

    .custom-form__error-text {
        font-size: 15px;
    }

    .custom-form__success {
        padding: 20px;
    }

    .custom-form__success-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .custom-form__success-text {
        font-size: 15px;
    }
}
