.credit-popup [hidden] {
    display: none !important;
}
/* Visible at once on open: during the fade-in a hidden container cannot give focus to the first field. */
.credit-popup-container:has(.popup:not(.is-closed)) {
    transition:
        opacity 0.2s ease-in,
        visibility 0s;
}
.credit-popup-container .popup.credit-popup {
    flex: 0 1 30rem;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    justify-content: flex-start;
    gap: 1.25rem;
}
.credit-popup .credit-popup__header {
    align-items: flex-start;
    gap: 1rem;
}
.credit-popup__heading {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}
.credit-popup .popup__title {
    line-height: 1.2;
}
.credit-popup__product {
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--color-ck-grey);
    overflow-wrap: anywhere;
}
.credit-popup .credit-popup__close {
    flex: 0 0 auto;
}
.credit-popup .credit-popup__close svg {
    width: 1.5rem;
    height: 1.5rem;
}
.credit-wizard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.credit-wizard__progress {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.credit-wizard__progress-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--color-ck-grey);
}
.credit-wizard__progress-item::before {
    content: "";
    display: block;
    height: 0.25rem;
    border-radius: 0.125rem;
    background: var(--color-grey);
    transition: background 0.2s ease-in;
}
.credit-wizard__progress-item.is-active,
.credit-wizard__progress-item.is-completed {
    color: var(--color-base-text);
}
.credit-wizard__progress-item.is-active::before,
.credit-wizard__progress-item.is-completed::before {
    background: var(--color-active);
}
.credit-form__fieldset {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}
.credit-form__lead {
    margin: 0;
    line-height: 1.5;
    color: var(--color-base-text);
}
.credit-form__phone {
    font-weight: 600;
    white-space: nowrap;
}
.credit-form .inputs-wrapper {
    flex: 0 0 auto;
}
.credit-form .inputs-wrapper label {
    line-height: 1.3;
    color: var(--color-base-text);
}
.credit-form__optional {
    color: var(--color-ck-grey);
}
.credit-form input.inputs__element-text,
.credit-form textarea.inputs__element-area {
    color: var(--color-base-text);
    transition:
        border-color 0.2s ease-in,
        box-shadow 0.2s ease-in;
}
.credit-form .inputs__element-text:focus,
.credit-form .inputs__element-area:focus {
    border-color: var(--color-active);
    box-shadow: 0 0 0 0.25rem rgba(250, 209, 46, 0.25);
    outline: none;
}
.credit-form .credit-form__code {
    letter-spacing: 0.25em;
}
.credit-form .inputs-wrapper:has(.form__field-violations) .inputs__element-text,
.credit-form .inputs-wrapper:has(.form__field-violations) .inputs__element-area,
.credit-form .inputs-wrapper:has(.form__field-violations) .form-checkbox__checkmark {
    border-color: #f04438;
}
.credit-form .form-checkbox {
    padding: 0;
}
.credit-form .form-checkbox label {
    align-items: flex-start;
    overflow: visible;
}
.credit-form .form-checkbox__checkmark {
    flex: 0 0 auto;
}
.credit-form .form-checkbox input:focus-visible ~ label .form-checkbox__checkmark {
    border-color: var(--color-active);
    box-shadow: 0 0 0 0.25rem rgba(250, 209, 46, 0.25);
}
.credit-form .form-checkbox__title {
    font-size: 0.875rem;
    line-height: 1.4;
}
.credit-form ul.form__field-violations {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.credit-form ul.form__field-violations .form-field-violation {
    line-height: 1.3;
}
.credit-form__error,
.credit-form__notice {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
}
.credit-form__error {
    background: #fef3f2;
    color: #b42318;
}
.credit-form__notice {
    background: #ecfdf3;
    color: #067647;
}
.credit-popup .credit-form__submit {
    width: 100%;
    min-height: 3.25rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
}
.credit-popup .credit-form__submit:disabled {
    background: var(--color-active);
    opacity: 0.6;
    cursor: not-allowed;
}
.credit-form__fieldset:disabled .credit-form__submit {
    cursor: progress;
}
.credit-form__link {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    color: var(--color-link);
    cursor: pointer;
    transition: color 0.2s ease-in;
}
.credit-form__link:hover {
    color: var(--color-link-hover);
}
.credit-form__resend {
    align-self: center;
    font-size: 0.875rem;
}
.credit-form__resend:disabled,
.credit-form__resend:disabled:hover {
    color: var(--color-ck-grey);
    cursor: default;
}
.credit-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
    text-align: center;
}
.credit-done__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #ecfdf3;
    color: #079455;
}
.credit-done__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-base-text);
}
.credit-done__text {
    margin: 0;
    line-height: 1.5;
    color: var(--color-ck-grey);
}
@media (max-width: 550px) {
    .credit-popup-container {
        padding: 0.75rem;
    }
    .credit-popup-container .popup.credit-popup {
        flex-basis: 100%;
        max-height: calc(100vh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        padding: 1.25rem;
    }
    .credit-popup .popup__title {
        font-size: 1.25rem;
    }
}
