/* --- ПЕРВЫЙ ШАГ: ДИАГНОСТИКА + КОМПАКТНАЯ ФОРМА --- */
.diagnostic-section {
    position: relative;
    z-index: 10;
    padding: clamp(52px, 8vh, 80px) 0;
    border-top: 1px solid rgba(255, 215, 0, 0.12);
    background:
        radial-gradient(circle at top left, rgba(255, 215, 0, 0.16), transparent 55%),
        radial-gradient(circle at bottom right, rgba(255, 120, 0, 0.12), transparent 55%),
        linear-gradient(180deg, #050505 0%, #050507 50%, #040406 100%);
}

.diagnostic-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 48px);
}

.diagnostic-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: clamp(32px, 5vw, 56px);
    align-items: start;
    align-content: start;
}

.diagnostic-content {
    max-width: 640px;
}

.diagnostic-tag {
    display: block;
    font-family: var(--font-label), ui-monospace, monospace;
    font-size: clamp(0.58rem, 0.72vw, 0.65rem);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.92);
    margin: 0 0 clamp(0.55rem, 1.2vw, 0.85rem);
    opacity: 1;
}

.diagnostic-title {
    margin: 0 0 clamp(1rem, 2vw, 1.35rem);
    max-width: min(42rem, 100%);
}

.diagnostic-title__line {
    display: block;
    font-family: var(--font-hero-display), var(--font-display), system-ui, sans-serif;
    font-weight: 900;
    line-height: 0.94;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.diagnostic-title__line--w {
    color: var(--text, #f7f7f5);
    font-size: clamp(1.15rem, 2.65vw, 2.1rem);
}

.diagnostic-title__line--accent {
    margin-top: 0.08em;
    font-size: clamp(1.28rem, 3vw, 2.45rem);
    color: var(--accent);
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.12);
}

/* Точечное УТП: 4–5 пунктов, привлекающие CTA */
.diagnostic-utp {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.diagnostic-utp li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 14px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.5;
}

.diagnostic-utp li:last-child {
    margin-bottom: 0;
}

.diagnostic-utp li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.diagnostic-utp li strong {
    color: #fff;
    font-weight: 700;
}

.diagnostic-cta {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
    margin: 0;
    padding: 18px 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.28);
    border-radius: 12px;
}

/* Блок формы — акцентный */
.diagnostic-form-wrap {
    position: sticky;
    top: 100px;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(160deg, rgba(255, 215, 0, 0.12), rgba(255, 180, 0, 0.06));
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 215, 0, 0.08);
}

.diagnostic-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.diagnostic-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.diagnostic-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.diagnostic-label .required {
    color: var(--accent);
}

.diagnostic-select {
    appearance: none;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.25);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' opacity='0.9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    color-scheme: dark;
    accent-color: var(--accent);
}

.diagnostic-select option {
    background: #16161a;
    color: #fff;
}

.diagnostic-select option:checked,
.diagnostic-select option:hover {
    background: rgba(255, 215, 0, 0.18);
    color: #fff;
}

.diagnostic-phone-row .lead-phone-wrap {
    display: flex;
    gap: 10px;
}

.diagnostic-phone-row .lead-country-select {
    width: 90px;
    flex-shrink: 0;
}

.diagnostic-input {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-b);
    font-size: 0.95rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.diagnostic-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.diagnostic-input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

/* .diagnostic-submit — unified style in main.css */
.diagnostic-submit {
    margin-top: 6px;
}

.diagnostic-privacy {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
}

/* --- Единая карточка успеха после отправки формы --- */
.form-success-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 32px 28px 28px;
    border-radius: 18px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(34, 158, 217, 0.14), transparent 60%),
        linear-gradient(145deg, #060608, #050507);
    border: 1px solid rgba(34, 158, 217, 0.4);
    box-shadow:
        0 18px 40px -18px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(34, 158, 217, 0.12);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    position: relative;
    text-align: center;
}

.form-success-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("../img/logo.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: min(180px, 55%);
    opacity: 0.04;
    pointer-events: none;
    filter: blur(0.3px);
    z-index: 0;
    border-radius: 18px;
}

.form-success-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.form-success-card[hidden] {
    display: none !important;
}

.form-success-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.form-success-close::before,
.form-success-close::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 1.5px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.8);
}

.form-success-close::before {
    transform: rotate(45deg);
}

.form-success-close::after {
    transform: rotate(-45deg);
}

.form-success-close:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(248, 250, 252, 0.9);
    transform: translateY(-1px);
}

.form-success-close:active {
    transform: translateY(0);
}

.form-success-card--centered {
    align-items: center;
}

/* Telegram CTA */
.form-success-telegram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.form-success-telegram-text {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
    text-align: center;
    max-width: 280px;
}

.form-success-telegram-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid rgba(34, 158, 217, 0.7);
    background: rgba(34, 158, 217, 0.1);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.form-success-telegram-link:hover {
    background: rgba(34, 158, 217, 0.18);
    border-color: rgba(34, 158, 217, 1);
    box-shadow: 0 0 22px -6px rgba(34, 158, 217, 0.6);
    transform: translateY(-2px);
}

.form-success-telegram-link:active {
    transform: translateY(0);
    box-shadow: none;
}

.form-success-telegram-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background-color: #229ED9;
    background-image: url("https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/telegram.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    box-shadow: 0 0 10px rgba(34, 158, 217, 0.5);
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .diagnostic-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .diagnostic-form-wrap {
        position: static;
        max-width: 100%;
        padding: 22px 20px 24px;
    }
}

@media (max-width: 600px) {
    .diagnostic-section {
        padding: 40px 0 52px;
    }

    .diagnostic-title {
        margin-bottom: 14px;
    }

    .diagnostic-title__line--w {
        font-size: clamp(1.02rem, 4.8vw, 1.38rem);
    }

    .diagnostic-title__line--accent {
        font-size: clamp(1.12rem, 5.2vw, 1.48rem);
    }

    .diagnostic-utp {
        margin-bottom: 20px;
    }

    .diagnostic-cta {
        margin-top: 8px;
        padding: 14px 14px;
    }

    .diagnostic-phone-row .lead-phone-wrap {
        flex-direction: column;
    }

    .diagnostic-phone-row .lead-country-select {
        width: 100%;
    }
}

/* --- СЕКЦИЯ ФОРМЫ ЗАЯВКИ + ПРИЗЫВ К ДЕЙСТВИЮ --- */
.lead-section {
    background: #050505;
    padding: clamp(48px, 8vh, 80px) 0;
    position: relative;
    z-index: 10;
    border-top: 1px solid rgba(255, 215, 0, 0.08);
}

.lead-section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 48px);
}

.lead-section-header {
    text-align: center;
    margin-bottom: clamp(32px, 5vh, 48px);
}

.lead-section-tag {
    display: block;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.lead-section-title {
    font-family: var(--font-h);
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
    text-transform: uppercase;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 8px;
}

.lead-section-title span {
    color: var(--accent);
}

.lead-section-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Двухколоночный layout: CTA | Форма */
.lead-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 5vw, 56px);
    align-items: start;
}

/* --- Блок призыва (CTA) --- */
.lead-cta-block {
    position: sticky;
    top: 100px;
}

.lead-cta-inner {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.06), rgba(0, 0, 0, 0.4));
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 20px;
    padding: clamp(24px, 3vw, 32px);
    box-shadow: 0 16px 48px -16px rgba(0, 0, 0, 0.5);
}

.lead-cta-headline {
    font-family: var(--font-h);
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 14px;
}

.lead-cta-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 20px;
}

.lead-cta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.lead-cta-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 10px;
}

.lead-cta-list li:last-child {
    margin-bottom: 0;
}

.lead-cta-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
}

.lead-cta-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lead-cta-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.lead-layout--single {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
}

.lead-cta-btn-wrap {
    margin-top: 24px;
    margin-bottom: 0;
}

.lead-cta-btn {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-h);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.lead-cta-btn:hover {
    background: #ffe033;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -6px rgba(255, 215, 0, 0.45);
}

.lead-cta-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* --- Форма --- */
.lead-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: clamp(24px, 3vw, 36px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.lead-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lead-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lead-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.lead-required {
    color: var(--accent);
}

.lead-input,
.lead-select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-b);
    font-size: 0.95rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lead-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.lead-input:focus,
.lead-select:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.08);
}

.lead-input:hover,
.lead-select:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.lead-select {
    cursor: pointer;
    appearance: none;
    background-color: rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' opacity='0.9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    color-scheme: dark;
    accent-color: var(--accent);
}

.lead-select option {
    background: #16161a;
    color: #fff;
}

.lead-select option:checked,
.lead-select option:hover {
    background: rgba(255, 215, 0, 0.18);
    color: #fff;
}

.lead-textarea {
    min-height: 88px;
    resize: vertical;
}

/* Телефон: код страны + поле */
.lead-phone-wrap {
    display: flex;
    gap: 10px;
}

.lead-country-select {
    width: 140px;
    flex-shrink: 0;
}

.lead-phone-input {
    flex: 1;
}

/* Способ связи: радио + доп. поле */
.lead-contact-method {
    border: none;
    padding: 0;
    margin: 0;
}

.lead-contact-method .lead-label {
    display: block;
    margin-bottom: 10px;
}

.lead-contact-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.lead-radio-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.lead-radio {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.lead-radio-label {
    user-select: none;
}

.lead-contact-extra {
    margin-top: 4px;
}

.lead-contact-extra .lead-input {
    max-width: 280px;
}

/* Кнопка отправки */
.lead-submit {
    margin-top: 8px;
    padding: 16px 28px;
    font-family: var(--font-h);
    font-size: 0.95rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.lead-submit:hover {
    background: #ffe033;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -6px rgba(255, 215, 0, 0.45);
}

.lead-submit:active {
    transform: translateY(0);
}

.lead-submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Адаптив */
@media (max-width: 992px) {
    .lead-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .lead-cta-block {
        position: static;
    }

    .lead-cta-inner {
        order: -1;
    }
}

@media (max-width: 600px) {
    .lead-form-row--half {
        grid-template-columns: 1fr;
    }

    .lead-phone-wrap {
        flex-direction: column;
    }

    .lead-country-select {
        width: 100%;
    }

    .lead-contact-options {
        flex-direction: column;
    }

    .lead-contact-extra .lead-input {
        max-width: 100%;
    }
}

/* --- ОВЕРЛЕЙ: быстрая форма «Получить разбор» (без прокрутки) --- */
.form-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    pointer-events: none;
    opacity: 0;
    overflow-y: auto;
    transition: opacity 0.2s ease-out;
    will-change: opacity;
}

.form-overlay.is-open {
    pointer-events: auto;
    opacity: 1;
}

/* Состояние после успешной отправки заявки в оверлее:
   оставляем только компактное окно с подтверждением */
.form-overlay.has-success {
    align-items: center;
    justify-content: center;
}

.form-overlay.has-success .form-overlay-tag,
.form-overlay.has-success .form-overlay-title,
.form-overlay.has-success .form-overlay-hint {
    display: none;
}

.form-overlay.has-success .js-form-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 18px 18px;
}

.form-overlay.has-success .js-form-shell > .form-success-card {
    width: 100%;
    max-width: 360px;
}

.form-overlay.has-success .form-overlay-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 420px;
    position: relative;
}

.form-overlay.has-success .form-overlay-panel::before {
    content: none;
}

.form-overlay.has-success .form-overlay-inner {
    padding: 0;
}

.form-overlay.has-success .form-overlay-close {
    display: none;
}

.form-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-overlay-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: linear-gradient(145deg, rgba(18, 18, 22, 0.98), rgba(12, 12, 16, 0.98));
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 20px;
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    will-change: transform, opacity;
}

.form-overlay.is-open .form-overlay-panel {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.form-overlay-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 2;
}

.form-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 215, 0, 0.3);
}

.form-overlay-close span {
    position: absolute;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.form-overlay-close span:first-child { transform: rotate(45deg); }
.form-overlay-close span:last-child { transform: rotate(-45deg); }

.form-overlay-inner {
    padding: 24px 22px 22px;
}

.form-overlay-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 8px;
}

.form-overlay-title {
    font-family: var(--font-h);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
}

.form-overlay-hint {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 24px;
}

.form-overlay-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-overlay-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.js-contact-link-row[hidden],
.diagnostic-form-row.js-contact-link-row[hidden] {
    display: none !important;
}

.form-overlay-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.form-overlay-required {
    color: var(--accent);
}

.form-overlay-input,
.form-overlay-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-overlay-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-overlay-input:focus,
.form-overlay-select:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.form-overlay-select {
    cursor: pointer;
    appearance: none;
    background-color: rgba(255, 255, 255, 0.06);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffd700' opacity='0.9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    color-scheme: dark;
    accent-color: var(--accent);
}

.form-overlay-select option {
    background: #16161a;
    color: #fff;
    padding: 8px 12px;
}

.form-overlay-select option:checked,
.form-overlay-select option:hover {
    background: rgba(255, 215, 0, 0.18);
    color: #fff;
}

.form-overlay-input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: rgba(255, 100, 100, 0.4);
}

.form-overlay-phone {
    display: flex;
    gap: 10px;
}

.form-overlay-phone .form-overlay-select {
    width: auto;
    min-width: 90px;
    flex-shrink: 0;
}

.form-overlay-phone .form-overlay-input {
    flex: 1;
}

.form-overlay-row--accent {
    margin-top: 4px;
}

/* Чекбокс согласия с политикой конфиденциальности (общий для всех форм) */
.form-overlay-row--checkbox,
.diagnostic-form-row--checkbox {
    margin-bottom: 6px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-overlay-row--checkbox:hover,
.diagnostic-form-row--checkbox:hover {
    border-color: rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.06);
}

.form-privacy-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(226, 232, 240, 0.95);
    line-height: 1.55;
    position: relative;
}

/* Скрываем нативный чекбокс, оставляем для доступности и клика */
.form-privacy-checkbox {
    position: absolute;
    left: 0;
    top: 3px;
    width: 22px;
    height: 22px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    -webkit-appearance: none;
    appearance: none;
}

/* Кастомный чекбокс — чёткий контур, аккуратная галочка */
.form-privacy-checkbox-label::before {
    content: '';
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 6px;
    background: rgba(8, 12, 22, 0.9);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.form-privacy-checkbox-label:hover::before {
    border-color: rgba(255, 215, 0, 0.7);
    background: rgba(255, 215, 0, 0.06);
}

/* Галочка */
.form-privacy-checkbox-label::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    width: 6px;
    height: 11px;
    border: solid #0c0e14;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.form-privacy-checkbox-label:has(.form-privacy-checkbox:checked)::before {
    border-color: #facc15;
    background: linear-gradient(135deg, #facc15, #eab308);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.4);
}

.form-privacy-checkbox-label:has(.form-privacy-checkbox:checked)::after {
    transform: rotate(45deg) scale(1);
}

.form-privacy-checkbox:focus-visible + .form-privacy-checkbox-text,
.form-privacy-checkbox:focus-visible ~ .form-privacy-checkbox-text {
    outline: none;
}

.form-privacy-checkbox-label:has(.form-privacy-checkbox:focus-visible)::before {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.35);
}

.form-privacy-checkbox-text {
    letter-spacing: 0.01em;
    flex: 1;
    min-width: 0;
}

/* Ссылка на политику — без кричащего подчёркивания, в стиле сайта */
.form-privacy-checkbox-text a {
    color: #fcd34d;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(252, 211, 77, 0.4);
    padding-bottom: 0;
    transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.form-privacy-checkbox-text a:hover {
    color: #fde68a;
    border-bottom-color: rgba(253, 230, 138, 0.8);
}
.form-privacy-checkbox-text a:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.6);
    outline-offset: 2px;
    border-radius: 2px;
}

/* .form-overlay-submit — unified style in main.css */

.form-overlay-submit-error,
.diagnostic-form-error {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 10px;
}

.form-overlay-privacy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
    margin: 0;
}

@media (max-width: 480px) {
    .form-overlay {
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .form-overlay-panel {
        max-width: 100%;
        border-radius: 16px;
    }

    .form-overlay-inner {
        padding: 24px 20px 20px;
    }

    .form-overlay-title {
        font-size: 1.25rem;
    }

    .form-overlay-hint {
        font-size: 0.82rem;
        margin-bottom: 18px;
    }

    .form-overlay-phone {
        flex-direction: column;
        gap: 8px;
    }

    .form-overlay-phone .form-overlay-select {
        width: 100%;
        min-width: 0;
    }

    .form-overlay-input,
    .form-overlay-select {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .form-overlay-submit {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 0.8rem;
    }

    .form-overlay-privacy {
        font-size: 0.68rem;
    }

    .form-overlay-close {
        top: max(10px, env(safe-area-inset-top));
        right: 10px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Honeypot: скрыто от пользователей, не скрыто от автозаполнения ботов */
.form-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.form-honeypot label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
