/* Единый блок данных заказчика — один на все чекауты и типы услуг. */

.checkout-identity {
    margin: 0 0 22px;
    padding: 22px;
    border: 1px solid #e2e9ee;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
    box-shadow: 0 10px 26px rgba(22, 50, 63, 0.05);
}

.checkout-identity__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 18px;
}

.checkout-identity__intro {
    min-width: 0;
    flex: 1 1 auto;
}

.checkout-identity__title {
    margin: 0 0 6px;
    color: #183b49;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}

.checkout-identity__hint {
    max-width: 720px;
    margin: 0;
    color: #6b7b83;
    font-size: 14px;
    line-height: 1.55;
}

.checkout-identity__login-slot {
    flex: 0 0 auto;
    padding-top: 2px;
}

.checkout-identity__login-slot:empty {
    display: none;
}

.checkout-identity__login-slot .checkout-auth__open-login {
    display: inline-flex !important;
    align-items: center;
    margin: 0 !important;
    padding: 10px 16px !important;
    border: 1px solid var(--red-color, #0b9f6d) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none;
    color: var(--red-color, #0b9f6d) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.checkout-identity__login-slot .checkout-auth__open-login:hover {
    background: rgba(var(--red-color-rgb, 11, 159, 109), 0.08) !important;
    color: var(--red-color, #0b9f6d) !important;
}

.checkout-identity__role {
    margin-bottom: 18px;
}

.checkout-identity__role-label,
.checkout-identity__label {
    display: block;
    margin-bottom: 6px;
    color: #45565f;
    font-size: 14px;
    font-weight: 600;
}

.checkout-identity__role-select,
.checkout-identity__cell .form-control,
.checkout-identity__cell input,
.checkout-identity__cell select {
    width: 100%;
    max-width: none;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: #101828;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    appearance: none;
}

.checkout-identity__role-select:focus,
.checkout-identity__cell .form-control:focus,
.checkout-identity__cell input:focus,
.checkout-identity__cell select:focus {
    border-color: #98a2b3;
    outline: 0;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16, 24, 40, 0.08);
}

.checkout-identity__cell .form-group {
    margin: 0;
}

.checkout-identity__cell label,
.checkout-identity__label {
    display: block;
    margin: 0 0 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

.checkout-identity__cell .iti {
    display: block;
    width: 100%;
}

.checkout-identity__role-hint {
    margin: 8px 0 0;
    color: #6b7b83;
    font-size: 13px;
    line-height: 1.5;
}

.checkout-identity__grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
    justify-content: stretch;
    width: 100%;
    margin-bottom: 16px;
}

.checkout-identity__grid--agent,
.checkout-identity__grid--profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkout-identity__grid--profile > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.checkout-identity__section {
    margin: 4px 0 0;
    padding: 18px 0 0;
    border-top: 1px solid #edf0f3;
}

.checkout-identity__section-title {
    margin: 0 0 14px;
    color: #183b49;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.checkout-identity__section .checkout-identity__grid {
    margin-bottom: 0;
}

.checkout-identity__grid:last-child {
    margin-bottom: 0;
}

.checkout-identity__cell,
.checkout-identity__grid > .customer__block_input {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    flex: none;
}

.checkout-identity__cell[hidden],
.checkout-identity__grid[hidden],
.checkout-identity__header[hidden],
.checkout-identity__role[hidden],
.checkout-identity__section[hidden] {
    display: none;
}

/* Свёрнутое состояние: вошёл, профиль полный — спрашивать нечего. */
.checkout-identity__summary {
    display: flex;
    align-items: center;
    gap: 14px;
}

.checkout-identity__summary-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eaf6f1;
    color: #168565;
}

.checkout-identity__summary-icon svg {
    width: 22px;
    height: 22px;
}

.checkout-identity__summary-body {
    min-width: 0;
    flex: 1 1 auto;
}

.checkout-identity__summary-body strong {
    display: block;
    color: #183b49;
    font-size: 15px;
    font-weight: 700;
}

.checkout-identity__summary-body span {
    display: block;
    overflow: hidden;
    color: #6b7b83;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-identity__summary-link {
    flex: 0 0 auto;
    color: #168565;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 991px) {
    .checkout-identity__grid,
    .checkout-identity__grid--agent,
    .checkout-identity__grid--profile {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .checkout-identity {
        padding: 16px;
    }

    .checkout-identity__header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .checkout-identity__login-slot .checkout-auth__open-login {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .checkout-identity__grid,
    .checkout-identity__grid--agent,
    .checkout-identity__grid--profile {
        grid-template-columns: minmax(0, 1fr);
    }

    .checkout-identity__summary {
        flex-wrap: wrap;
    }

    .checkout-identity__summary-link {
        flex-basis: 100%;
    }
}

/* Корзина задаёт полям flex + 24.7% — из-за этого ряд из трёх «прыгает»,
   два поля разъезжаются по краям, а пять сжимаются в одну линию. */
.bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid,
.main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    justify-content: stretch;
}

.bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid--agent,
.bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid--profile,
.main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid--agent,
.main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid--profile {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid .customer__block_input,
.main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid .customer__block_input {
    width: auto !important;
    max-width: none !important;
}

.bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid .customer__block_input input,
.bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid .customer__block_input select,
.main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid .customer__block_input input,
.main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid .customer__block_input select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #fff;
    color: #101828;
    font-size: 14px;
}

@media (max-width: 991px) {
    .bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid,
    .main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid,
    .bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid--agent,
    .bascket .bascket__box .bascket__order .order .order__customer .customer__box .customer__block form .customer__block_input_box.checkout-identity__grid--profile,
    .main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid,
    .main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid--agent,
    .main__basket-body .main__basket-form-body .main__basket-form .order__customer .customer__box .customer__block .customer__block_input_box.checkout-identity__grid--profile {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Ошибки полей — под инпутом, на всех чекаутах. */
.checkout-identity .form-group {
    position: relative;
}

.checkout-identity .error-text,
.checkout-identity .help-block,
.checkout-identity .invalid-feedback {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none !important;
    box-shadow: none;
    color: var(--error-color, #cf454c);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    text-overflow: unset;
    pointer-events: auto;
}

.checkout-identity .error-text .help-block:not(:empty),
.checkout-identity .error-text .invalid-feedback:not(:empty),
.checkout-identity .error-text:not(:empty):not(:has(.help-block, .invalid-feedback)) {
    margin-top: 6px;
}

.checkout-identity .error-text:empty,
.checkout-identity .help-block:empty,
.checkout-identity .invalid-feedback:empty {
    display: none !important;
    margin: 0 !important;
}

.checkout-identity .has-error input,
.checkout-identity .has-error select,
.checkout-identity .has-error .form-control {
    padding-right: 14px !important;
    background-image: none !important;
    border-color: var(--error-color, #cf454c) !important;
}

.checkout-identity .has-error .iti {
    border: 1px solid var(--error-color, #cf454c);
    border-radius: 10px;
}

.checkout-identity .has-error .iti input,
.checkout-identity .has-error .iti input:focus {
    border: 0 !important;
    box-shadow: none !important;
    padding-right: 14px !important;
}

.checkout-consents {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: max-content;
    max-width: 100%;
    margin: 22px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

.checkout-consents .block__accept-checkbox-personal-data,
.checkout-consents .block__accept-checkbox-conditions {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
}

.checkout-consents .form__custom-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    appearance: none;
    pointer-events: none;
}

.checkout-consents .form__custom-label {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
    margin: 0;
    color: #344054;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    text-align: left;
    cursor: pointer;
}

.checkout-consents .form__custom-label > span:first-child {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    border: 2px solid #c8c8c8;
    border-radius: 4px;
    background: #fff;
}

.checkout-consents .checkout-consents__text,
.checkout-consents .form__custom-label > span.checkout-consents__text {
    display: block;
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    line-height: 20px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.checkout-consents .form__custom-checkbox:checked + .form__custom-label > span:first-child {
    border-color: var(--red-color, #0b9f6d);
}

.checkout-consents .form__custom-checkbox:checked + .form__custom-label > span:first-child::before {
    content: none !important;
    display: none !important;
    animation: none !important;
}

.checkout-consents .form__custom-checkbox:checked + .form__custom-label > span:first-child::after {
    content: "";
    box-sizing: border-box;
    width: 5px;
    height: 8px;
    margin: -1px 0 1px;
    border: solid var(--red-color, #0b9f6d);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkout-consents .form__custom-label a,
.checkout-consents .btn-basket-personal,
.checkout-consents .btn-basket-offerta {
    color: var(--red-color, #0b9f6d);
    font-weight: 700;
}

.checkout-consents .error__personal-data,
.checkout-consents .error__conditions {
    min-height: 0;
    margin-top: 4px;
    color: #8b0e0e;
    font-size: 12px;
}

.checkout-consents .error__personal-data:empty,
.checkout-consents .error__conditions:empty {
    display: none;
}
