/* Попап «Хотите дешевле?» (module/form_cheaper.tpl, #nice--pp--modal).
   Разметка .modal > .modal-content как у попапов вопроса/отзыва/комментария (experts.css),
   оформление — как у попапа входа: Inter, скруглённые поля, кнопка отправки — общая .bt.bt-primary.
   Файл подключается из шаблона после bootstrap, поэтому id-селекторы ниже перебивают его .modal-content */

#nice--pp--modal.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    overflow: auto;
    margin: 0;
    background: rgba(0, 0, 0, .4);
    -webkit-overflow-scrolling: touch;
}
#nice--pp--modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    overflow-y: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 22px 22px 24px;
    text-align: left;
    background: #fff;
    border: none;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    font-family: 'Inter', Arial, sans-serif;
}
#nice--pp--modal .close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 30px;
    height: 30px;
    line-height: 28px;
    text-align: center;
    font-size: 26px;
    font-weight: normal;
    font-style: normal;
    color: #9a9a9a;
    cursor: pointer;
    border-radius: 50%;
    opacity: 1;
    transition: background-color .15s, color .15s;
}
#nice--pp--modal .close:hover {
    background: #f0f0f0;
    color: #272727;
}

.nice--pp--modal--form .pp-title {
    margin: 0 0 16px;
    padding-right: 32px;
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.25;
    color: #272727;
    text-transform: none !important;
}

/* товар и цена: серая плашка; при выборе скидки — старая цена зачёркнута, новая красным */
.nice--pp--modal--form .product-name {
    margin: 0 0 16px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.45;
    color: #555;
    background: #f4f8fb;
    border-radius: 8px;
}
.nice--pp--modal--form .product-name .price-block,
.nice--pp--modal--form .product-name .new-price,
.nice--pp--modal--form .product-name .old-price {
    font-size: 16px;
    font-weight: 600;
    color: #171716;
}
.nice--pp--modal--form .product-name .old-price {
    font-weight: normal;
    color: #9d9d9d;
    text-decoration: line-through;
}
.nice--pp--modal--form .product-name .new-price {
    color: #ff3516;
}

.nice--pp--modal--form .mb-3 {
    margin: 0 0 14px;
}
.nice--pp--modal--form .form-label {
    display: block;
    float: none;
    margin: 0 0 6px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #171716;
    cursor: default;
}
.nice--pp--modal--form .form-label .require {
    color: #d9534f;
}
.nice--pp--modal--form .form-control,
.nice--pp--modal--form input[type="text"],
.nice--pp--modal--form input[type="tel"],
.nice--pp--modal--form input[type="email"],
.nice--pp--modal--form textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 9px 14px !important;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #171716;
    background: #fff !important;
    border: 1px solid #d0d1d0 !important;
    border-radius: 8px;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.nice--pp--modal--form .form-control:focus {
    outline: 0;
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
.nice--pp--modal--form textarea.form-control {
    min-height: 72px;
    resize: vertical;
}
.nice--pp--modal--form .error-price_field {
    border-color: #d9534f !important;
    background: #fdecea !important;
}

/* быстрые скидки -3% / -5% … : чипы под полем цены */
.nice--pp--modal--form #cheaper-percent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
}
.nice--pp--modal--form #cheaper-percent .percent-label {
    display: inline-block;
    float: none;
    margin: 0;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #272727;
    background: #eef1f4;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s, color .15s;
}
.nice--pp--modal--form #cheaper-percent .percent-label:hover {
    background: #e2e8ee;
}
.nice--pp--modal--form #cheaper-percent label.percent-checked {
    color: #fff;
    background: #1ea3d2;
}
.nice--pp--modal--form .percent-description {
    margin: -4px 0 14px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #555;
    background: #f4f8fb;
    border-radius: 8px;
}

/* чекбоксы и кнопка отправки */
.nice--pp--modal--form .buttons-row-full {
    display: flex;
    flex-flow: column;
    align-items: stretch;
    gap: 10px;
    margin: 4px 0 0;
}
.nice--pp--modal--form .pp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    font-weight: normal;
    color: #555;
    cursor: pointer;
}
.nice--pp--modal--form .pp-check input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: none;
    accent-color: #2dc5ff;
}
.nice--pp--modal--form .buttons-row-full .bt {
    display: flex;
    width: 100%;
    max-width: none;
    margin: 6px 0 0;
}
.nice--pp--modal--form .bt-primary:disabled {
    border-color: #9f9f9f;
    background: #9f9f9f;
    color: #fff;
    cursor: default;
}

.nice--pp--modal--form .nice--links.agree {
    margin: 10px 0 0;
    text-align: center;
}
.nice--pp--modal--form .nice--links.agree p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #888;
}
.nice--pp--modal--form .nice--links.agree a {
    font-size: 12px;
    color: #1ea3d2;
}

/* ошибки от сервера (send(): .error после поля) и «спасибо» вместо формы */
.nice--pp--modal--form .error {
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #d9534f;
}
.nice--pp--modal--form .notification {
    margin: 0;
}

/* «Есть уцененный»: карточка с картинкой, ценой и кнопкой */
.nice--pp--modal--form .pp-subtitle {
    margin: 22px 0 10px;
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    color: #272727;
    text-transform: none !important;
}
.nice--pp--modal--form .nice--links {
    display: flex;
    flex-flow: column;
    gap: 10px;
}
.nice--pp--modal--form .cheapest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: auto; /* stylesheet.css даёт .cheapest 230px по центру */
    margin: 0;
    padding: 10px 12px;
    text-align: left;
    border: 1px solid #d0d1d0;
    border-radius: 12px;
    background: #fff;
}
.nice--pp--modal--form .cheapest img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex: none;
    border-radius: 8px;
}
.nice--pp--modal--form .cheapest .price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #171716;
}
.nice--pp--modal--form .cheapest .price-block .new-price {
    font-size: 18px;
    color: #ff3516;
}
.nice--pp--modal--form .cheapest .price-block .old-price {
    font-size: 14px;
    font-weight: normal;
    color: #9d9d9d;
    text-decoration: line-through;
}
.nice--pp--modal--form .cheapest .bt {
    flex: none;
    padding: 7px 16px;
    color: #fff !important;
}

/* телефон: окно обычным потоком с отступами, без fixed-центровки (см. experts.css, #358357) */
@media (max-width: 767px) {
    #nice--pp--modal .modal-content {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: auto;
        max-width: none;
        max-height: none;
        margin: 16px;
        border-radius: 16px;
    }
    .nice--pp--modal--form .cheapest {
        flex-wrap: wrap;
    }
}
