/**
 * Form controls – единый вид полей (скругление как у pill-кнопок)
 */

.ps-input,
.ps-textarea,
.ps-select__trigger,
.hero-form-container .form-group input,
.hero-form-container .form-group select,
.hero-form-container .form-group .ps-select__trigger,
.seo-cta-banner__card input[type="text"],
.seo-cta-banner__card input[type="email"],
.seo-cta-banner__card textarea,
.exit-popup__form-field input,
.exit-popup__form-field textarea,
.sidebar-cta-form input,
.sidebar-cta-form textarea,
.simple-form input,
.simple-form textarea,
.task-expand-modal textarea,
.hero-contact-form input[type="text"],
.hero-contact-form input[type="email"],
.hero-contact-form textarea {
    border-radius: var(--radius-full) !important;
    box-sizing: border-box;
}

/* textarea: чуть меньше radius, чтобы многострочное не «капсула» */
.ps-textarea,
.seo-cta-banner__card textarea,
.exit-popup__form-field textarea,
.sidebar-cta-form textarea,
.simple-form textarea,
.task-expand-modal textarea,
.hero-contact-form textarea {
    border-radius: var(--radius-xl) !important;
}

.hero-form-container .form-group input,
.hero-form-container .form-group .ps-select__trigger,
.hero-form-container .form-group .ps-select__trigger:hover,
.hero-form-container .form-group .ps-select__trigger:focus,
.hero-form-container .form-group .ps-select.is-open .ps-select__trigger {
    border-radius: var(--radius-full) !important;
}

.hero-form-container .btn-order.hero-form-submit {
    border-radius: var(--radius-full) !important;
}

/* =============================================================================
   Микрокопия доверия под формами (Trust Notes)
   ============================================================================= */
.form-trust-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--color-text-muted, #64748b);
    margin-top: 10px;
    text-align: center;
    width: 100%;
}

.form-trust-note__icon {
    font-size: 0.875rem;
    line-height: 1;
}

.form-trust-note__link {
    color: var(--color-primary, #2563eb);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.form-trust-note__link:hover {
    color: var(--color-primary-dark, #1d4ed8);
}

/* =============================================================================
   Минималистичная модалка заказа и консультации (Чистый дизайн)
   ============================================================================= */

.exit-popup {
    --ps-modal-max-w: 460px;
}

.exit-popup__content {
    max-width: 460px !important;
    height: auto !important;
    max-height: min(600px, calc(100vh - 32px)) !important;
    max-height: min(600px, calc(100dvh - 32px)) !important;
    padding: 28px 28px 24px !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}

@media (max-width: 480px) {
    .exit-popup__content {
        padding: 22px 18px 20px !important;
    }
}

.exit-popup__close,
button.exit-popup__close,
span.exit-popup__close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 32px !important;
    height: 32px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #94a3b8 !important;
    z-index: 20 !important;
    transition: color 0.2s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
}

.exit-popup__close:hover,
.exit-popup__close:focus,
.exit-popup__close:active,
button.exit-popup__close:hover,
button.exit-popup__close:focus,
button.exit-popup__close:active,
span.exit-popup__close:hover,
span.exit-popup__close:focus,
span.exit-popup__close:active {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #475569 !important;
}

.exit-popup__head {
    margin-bottom: 16px !important;
    text-align: center;
}

.exit-popup__title {
    font-size: 1.375rem !important;
    font-weight: 800 !important;
    color: var(--color-text-dark, #1e293b) !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.25 !important;
}

.exit-popup__subtitle {
    font-size: 0.84375rem !important;
    color: var(--color-text-muted, #64748b) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.exit-popup__reviews-link {
    color: var(--color-primary, #2563eb);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-left: 2px;
    transition: color 0.2s ease;
}

.exit-popup__reviews-link:hover {
    color: var(--color-primary-dark, #1d4ed8);
}

.exit-popup__form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    overflow: visible !important;
}

.exit-popup__form-field {
    width: 100%;
    text-align: left;
}

.exit-popup__form-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-dark, #1e293b);
    margin-bottom: 5px;
}

.exit-popup__optional {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-muted, #64748b);
    margin-left: 4px;
}

.exit-popup__input,
.exit-popup__select {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: var(--radius-full, 9999px) !important;
    font-size: 0.9375rem !important;
    font-family: inherit !important;
    color: var(--color-text-dark, #1e293b) !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.exit-popup__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px 16px !important;
    padding-right: 38px !important;
    cursor: pointer;
}

.exit-popup__input:focus,
.exit-popup__select:focus {
    outline: none !important;
    border-color: var(--color-primary, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* Выпадающий список в модалке */
.exit-popup .ps-select {
    width: 100% !important;
}

.exit-popup .ps-select__trigger {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: var(--color-text-dark, #1e293b) !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: var(--radius-full, 9999px) !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    box-shadow: none !important;
    outline: none !important;
}

.exit-popup .ps-select__trigger:hover {
    border-color: #cbd5e1 !important;
}

.exit-popup .ps-select.is-open .ps-select__trigger,
.exit-popup .ps-select__trigger:focus-visible {
    border-color: var(--color-primary, #2563eb) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.exit-popup .ps-select:not(.is-open) .ps-select__trigger:not(:focus-visible):not(:hover) {
    border-color: #e2e8f0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.exit-popup__input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted, #64748b);
    padding-left: 8px;
    margin-top: 4px;
    line-height: 1.3;
}

.exit-popup__btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 12px 18px !important;
    background: var(--gradient-primary, linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%)) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--radius-full, 9999px) !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    box-shadow: var(--shadow-primary, 0 4px 14px rgba(37, 99, 235, 0.25)) !important;
    cursor: pointer;
    margin-top: 4px !important;
    transition: all 0.2s ease !important;
}

.exit-popup__btn:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
    opacity: 0.96;
}

.exit-popup__btn:active {
    transform: scale(0.99);
}

.exit-popup__trust-foot {
    font-size: 0.78125rem !important;
    color: var(--color-text-muted, #64748b) !important;
    text-align: center !important;
    margin: 10px 0 0 0 !important;
    line-height: 1.35 !important;
}

/* Подсказка о калькуляторе (чистый зеленый текст без фона и рамок) */
.exit-popup__comment-hint {
    display: block;
    font-size: 0.75rem;
    color: #16a34a;
    background: transparent !important;
    border: none !important;
    padding: 2px 0 0 8px !important;
    margin-top: 3px;
    line-height: 1.3;
    white-space: nowrap;
}

/* Список гарантий в калькуляторе (чистый текст, без рамок и фонов) */
.calc-result__trust,
.calc-result__payment-note {
    margin: 14px auto 18px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: 440px !important;
    text-align: center !important;
}

.calc-result__trust-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    font-size: 0.8125rem !important;
    color: var(--color-text-muted, #64748b) !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

.calc-result__trust-list li {
    margin: 0 !important;
    padding: 0 !important;
}

.calc-result__trust-link {
    color: var(--color-primary, #2563eb) !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    transition: color 0.2s ease !important;
}

.calc-result__trust-link:hover {
    color: var(--color-primary-dark, #1d4ed8) !important;
}

/* Фикс тени у кнопки калькулятора (убираем тень, меняем только фон) */
.btn-calc-order,
.btn-calc-order:hover,
.btn-calc-order:focus,
.btn-calc-order:active {
    box-shadow: none !important;
    transform: none !important;
}

.btn-calc-order:hover {
    background: var(--gradient-primary-hover, linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%)) !important;
}

/* Текстовый вывод услуг в режиме калькулятора */
.exit-popup__calc-works-text {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: var(--color-text-dark, #1e293b) !important;
    padding: 2px 0 4px !important;
    line-height: 1.4 !important;
    text-align: left !important;
}
