/* order-modal.css — модальная форма «Получить КП» для карточек товара ds-assistent.ru
   Стили полностью изолированы префиксом .kp- и не затрагивают вёрстку Тильды. */

.kp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: none;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 16px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.kp-modal.kp-modal_open {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.kp-modal *,
.kp-modal *:before,
.kp-modal *:after {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.kp-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 22, 44, 0.62);
}

.kp-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 470px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: auto;
    padding: 30px 30px 26px;
    background: #ffffff;
    border-radius: 16px;
    -webkit-box-shadow: 0 24px 64px rgba(12, 22, 44, 0.35);
    box-shadow: 0 24px 64px rgba(12, 22, 44, 0.35);
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1b2430;
    text-align: left;
}

.kp-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6f7a8d;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 26px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    -webkit-transition: background-color .15s ease, color .15s ease;
    transition: background-color .15s ease, color .15s ease;
}

.kp-modal__close:hover,
.kp-modal__close:focus {
    background: #eef1f7;
    color: #1b2430;
    outline: none;
}

.kp-modal__title {
    margin: 0 30px 6px 0;
    padding: 0;
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: #12275c;
}

.kp-modal__product {
    margin: 0 0 6px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #1555a3;
}

.kp-modal__product:empty {
    display: none;
}

.kp-modal__subtitle {
    margin: 0 0 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #5b6476;
}

/* ---------- поля ---------- */

.kp-field {
    margin: 0 0 12px;
}

.kp-field__label {
    display: block;
    margin: 0 0 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #33405a;
}

.kp-field__req {
    color: #b3261e;
}

.kp-input,
.kp-textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #c9d0dc;
    border-radius: 8px;
    background: #ffffff;
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.35;
    color: #1b2430;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    -webkit-transition: border-color .15s ease, box-shadow .15s ease;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.kp-textarea {
    min-height: 66px;
    resize: vertical;
}

.kp-input:focus,
.kp-textarea:focus {
    border-color: #1555a3;
    box-shadow: 0 0 0 3px rgba(21, 85, 163, 0.12);
}

.kp-input::-webkit-input-placeholder,
.kp-textarea::-webkit-input-placeholder {
    color: #98a1b2;
}

.kp-input:-ms-input-placeholder,
.kp-textarea:-ms-input-placeholder {
    color: #98a1b2;
}

.kp-input::placeholder,
.kp-textarea::placeholder {
    color: #98a1b2;
}

.kp-field_error .kp-input,
.kp-field_error .kp-textarea {
    border-color: #b3261e;
}

.kp-field__error {
    display: none;
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #b3261e;
}

.kp-field_error .kp-field__error {
    display: block;
}

/* ---------- согласия ---------- */

.kp-consent {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin: 10px 0 0;
    padding: 0;
    font-size: 10px;
    line-height: 1.6;
    color: #6f7a8d;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}

.kp-consent__box {
    width: 14px;
    height: 14px;
    margin: 2px 0 0;
    padding: 0;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 14px;
    flex: 0 0 14px;
    accent-color: #244ba6;
    cursor: pointer;
}

.kp-consent__text {
    display: block;
    margin: 0 0 0 7px;
}

.kp-consent a {
    color: #244ba6;
    text-decoration: underline;
}

.kp-consent a:hover {
    color: #12275c;
}

.kp-consent-error {
    display: none;
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #b3261e;
}

.kp-consent-error_show {
    display: block;
}

.kp-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- кнопка и сообщения ---------- */

.kp-form__submit {
    display: block;
    width: 100%;
    margin: 18px 0 0;
    padding: 15px 20px;
    border: 0;
    border-radius: 24px;
    background: #1555a3;
    color: #ffffff;
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    cursor: pointer;
    -webkit-transition: background-color .15s ease, opacity .15s ease;
    transition: background-color .15s ease, opacity .15s ease;
}

.kp-form__submit:hover,
.kp-form__submit:focus {
    background: #12468a;
    outline: none;
}

.kp-form__submit[disabled] {
    opacity: .65;
    cursor: default;
}

.kp-form__error {
    display: none;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fdecea;
    font-size: 12px;
    line-height: 1.5;
    color: #b3261e;
}

.kp-form__error_show {
    display: block;
}

/* ---------- спасибо ---------- */

.kp-thanks {
    padding: 6px 0 0;
    text-align: center;
}

.kp-thanks[hidden] {
    display: none;
}

.kp-thanks__icon {
    display: block;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #e8f0fb;
    color: #1555a3;
    font-size: 26px;
    line-height: 52px;
    text-align: center;
}

.kp-thanks__title {
    margin: 0 0 8px;
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #12275c;
}

.kp-thanks__text {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #5b6476;
}

.kp-thanks__product {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: #1555a3;
}

.kp-thanks__close {
    display: inline-block;
    margin: 8px 0 0;
    padding: 12px 30px;
    border: 0;
    border-radius: 24px;
    background: #1555a3;
    color: #ffffff;
    font-family: Montserrat, Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
}

.kp-thanks__close:hover,
.kp-thanks__close:focus {
    background: #12468a;
    outline: none;
}

/* ---------- кнопка на карточке ---------- */

.t-store__prod-popup__btn.js-kp-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.t-store__prod-popup__btn.js-kp-open td {
    opacity: 1 !important;
}

/* ---------- блокировка прокрутки ---------- */

.kp-modal-lock,
.kp-modal-lock body {
    overflow: hidden !important;
}

/* ---------- мобильные ---------- */

@media screen and (max-width: 480px) {
    .kp-modal {
        padding: 10px;
    }

    .kp-modal__dialog {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        padding: 24px 18px 20px;
        border-radius: 14px;
    }

    .kp-modal__title {
        font-size: 19px;
    }

    .kp-input,
    .kp-textarea {
        font-size: 16px;
    }
}
