.vf-form-wrap {
	max-width: 760px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.4;
	box-sizing: border-box;
}
.vf-form-wrap *, .vf-form-wrap *::before, .vf-form-wrap *::after { box-sizing: border-box; }

.vf-section {
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	padding: 16px;
	margin: 0 0 16px;
}
.vf-section-title {
	font-weight: 600;
	font-size: 1.05em;
	padding: 0 6px;
}

.vf-fields-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 16px;
}
.vf-field { min-width: 0; }
/* Одна колонка: поля идут строго друг за другом, порядок читается сверху вниз. */
.vf-form-wrap--single .vf-fields-grid { grid-template-columns: 1fr; }
.vf-field--file, .vf-field--file_link, .vf-field--radio, .vf-field--checkbox_group, .vf-field--consent, .vf-field--date_range, .vf-field--doctor_zone {
	grid-column: 1 / -1;
}

.vf-label {
	display: block;
	font-weight: 500;
	margin-bottom: 6px;
}
.vf-req { color: #d32f2f; }

.vf-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font-size: 1em;
	background: #fff;
}
.vf-input:focus { outline: 2px solid #2271b1; border-color: #2271b1; }

.vf-date-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vf-date-range .vf-input { width: auto; flex: 1 1 160px; }

.vf-help { color: #666; font-size: 0.85em; margin: 6px 0 0; }
.vf-error { color: #d32f2f; font-size: 0.85em; margin-top: 4px; min-height: 1em; }

.vf-options { display: flex; flex-direction: column; gap: 8px; }
.vf-option { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-weight: normal; }
.vf-option input { margin-top: 3px; }

.vf-consent { background: #f7f7f7; padding: 10px 12px; border-radius: 8px; }
.vf-consent input { pointer-events: none; }

.vf-file-drop {
	border: 2px dashed #ccc;
	border-radius: 10px;
	padding: 18px;
	text-align: center;
	position: relative;
	background: #fafafa;
	transition: border-color .15s, background .15s;
}
.vf-file-drop.is-dragover { border-color: #2271b1; background: #eef6fc; }
.vf-file-drop.has-file { border-color: #46b450; }
.vf-file-drop .vf-file-input {
	position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.vf-file-drop-label { color: #555; font-size: .9em; }
.vf-file-name { margin-top: 6px; font-weight: 500; word-break: break-all; }

.vf-blank-link { display: inline-block; margin-bottom: 10px; color: #2271b1; text-decoration: underline; }

.vf-group-item {
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 12px;
	background: #fcfcfc;
}
.vf-btn {
	appearance: none;
	border: none;
	border-radius: 8px;
	padding: 10px 18px;
	font-size: 1em;
	cursor: pointer;
}
.vf-btn--add { background: #eef6fc; color: #2271b1; margin-top: 4px; }
.vf-btn--remove { background: #fdeeee; color: #d32f2f; margin-top: 8px; }
.vf-btn--submit { background: #2271b1; color: #fff; font-weight: 600; padding: 12px 28px; }
.vf-btn--submit:disabled { opacity: .6; cursor: default; }

.vf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.vf-submit-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.vf-submit-status { font-size: .9em; }
.vf-status-error { color: #d32f2f; }

.vf-success-message {
	padding: 20px;
	background: #eefaf0;
	border: 1px solid #b7e4c7;
	border-radius: 10px;
	text-align: center;
	font-weight: 500;
}

@media (max-width: 640px) {
	.vf-fields-grid { grid-template-columns: 1fr; }
	.vf-form-wrap { font-size: 15px; }
	.vf-section { padding: 12px; }
	.vf-btn--submit { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────
   Модальный режим ([virilis_form id="X" mode="modal"]).
   Стили перенесены из callback-modal.php темы один в один,
   чтобы вид формы «Перезвоните мне» в футере не изменился.
   ───────────────────────────────────────────────────────────── */
.vf-modal-overlay {
	display: none; position: fixed; inset: 0; background: rgba(10,22,40,.6);
	z-index: 9000; align-items: center; justify-content: center; padding: 20px;
	backdrop-filter: blur(6px);
}
.vf-modal-overlay.vf-modal-open { display: flex; }
.vf-modal-box {
	background: #fff; border-radius: 22px; padding: 44px 40px 36px; max-width: 420px;
	width: 100%; position: relative; box-shadow: 0 28px 80px rgba(0,0,0,.22);
	animation: vfModalIn .28s cubic-bezier(.22,.68,0,1.2);
	max-height: calc(100vh - 40px); overflow-y: auto;
}
@keyframes vfModalIn { from { opacity: 0; transform: scale(.94) translateY(16px); } to { opacity: 1; transform: none; } }
.vf-modal-close {
	position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
	background: #f0f4f8; border: none; cursor: pointer; display: flex; align-items: center;
	justify-content: center; color: #4E6478; transition: background .2s; padding: 0;
}
.vf-modal-close:hover { background: #dde4ea; }
.vf-modal-icon {
	width: 56px; height: 56px; border-radius: 16px; background: #E6F7F5;
	display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.vf-modal-icon svg { color: #009F8F; }
.vf-modal-box h3 {
	font-family: 'Montserrat', sans-serif; font-size: 21px; font-weight: 800; color: #18293C;
	margin: 0 0 8px; line-height: 1.22; letter-spacing: -.02em;
}
.vf-modal-desc { font-size: 14px; color: #4E6478; margin: 0 0 26px; line-height: 1.65; }

/* Поля формы внутри модалки — под айдентику модалки, а не общую vf-* */
.vf-modal-box .vf-section { border: none; padding: 0; margin: 0; }
.vf-modal-box .vf-fields-grid { display: block; }
.vf-modal-box .vf-field { margin-bottom: 0; }
.vf-modal-box .vf-label {
	display: block; font-size: 11.5px; font-weight: 700; color: #4E6478; margin-bottom: 6px;
	font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: .07em;
}
.vf-modal-box .vf-input {
	width: 100%; padding: 14px 16px; border-radius: 11px; border: 1.5px solid #C2E4E0;
	font-size: 16px; font-family: inherit; color: #18293C; background: #fff; outline: none;
	transition: border-color .2s, box-shadow .2s; box-sizing: border-box;
}
.vf-modal-box .vf-input:focus { border-color: #009F8F; box-shadow: 0 0 0 3px rgba(0,159,143,.12); outline: none; }
.vf-modal-box .vf-field.vf-has-error .vf-input { border-color: #E2378D; box-shadow: 0 0 0 3px rgba(226,55,141,.10); }
.vf-modal-box .vf-error { color: #E2378D; font-size: 12px; }
.vf-modal-box .vf-consent { background: transparent; padding: 0; margin-top: 12px; }
.vf-modal-box .vf-consent span { font-size: 11.5px; color: #90A6BA; line-height: 1.65; }
.vf-modal-box .vf-consent a { color: #009F8F; font-weight: 600; text-decoration: none; }
.vf-modal-box .vf-consent a:hover { text-decoration: underline; }
.vf-modal-box .vf-submit-row { display: block; margin-top: 0; }
.vf-modal-box .vf-btn--submit {
	width: 100%; margin-top: 18px; padding: 16px; background: #009F8F; color: #fff;
	font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; border: none;
	border-radius: 50px; cursor: pointer;
	transition: background .22s, transform .18s, box-shadow .18s;
	box-shadow: 0 4px 18px rgba(0,159,143,.28);
}
.vf-modal-box .vf-btn--submit:hover { background: #007A6E; transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0,159,143,.36); }
.vf-modal-box .vf-btn--submit:disabled { background: #90A6BA; box-shadow: none; transform: none; cursor: not-allowed; }
.vf-modal-box .vf-submit-status { display: block; font-size: 12px; margin-top: 10px; text-align: center; }

/* Экраны: форма / ожидание / успех / фолбэк */
.vf-modal-screen { display: none; }
.vf-modal-screen.is-active { display: block; }

.vf-modal-screen[data-screen="loading"] { text-align: center; padding: 24px 0 8px; }
.vf-modal-spinner {
	width: 44px; height: 44px; border: 3px solid #E6F7F5; border-top-color: #009F8F;
	border-radius: 50%; animation: vfModalSpin .7s linear infinite; margin: 0 auto 18px;
}
@keyframes vfModalSpin { to { transform: rotate(360deg); } }
.vf-modal-screen[data-screen="loading"] p { font-size: 14px; color: #4E6478; margin: 0; }

.vf-modal-screen[data-screen="success"] { text-align: center; padding: 8px 0 4px; }
.vf-modal-result-ico {
	width: 64px; height: 64px; border-radius: 50%; background: #E6F7F5; display: flex;
	align-items: center; justify-content: center; margin: 0 auto 20px;
}
.vf-modal-result-ico svg { color: #009F8F; }
.vf-modal-screen h4 {
	font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 800; color: #18293C;
	margin: 0 0 8px; letter-spacing: -.02em;
}
.vf-modal-screen[data-screen="success"] p { font-size: 14px; color: #4E6478; line-height: 1.65; margin: 0; }

.vf-modal-screen[data-screen="fallback"] { text-align: center; padding: 8px 0 4px; }
.vf-modal-screen[data-screen="fallback"] .vf-modal-result-ico { background: #FDE9F4; }
.vf-modal-screen[data-screen="fallback"] .vf-modal-result-ico svg { color: #E2378D; }
.vf-modal-screen[data-screen="fallback"] h4 { font-size: 18px; }
.vf-modal-screen[data-screen="fallback"] p { font-size: 14px; color: #4E6478; line-height: 1.65; margin: 0 0 16px; }
.vf-modal-tel {
	display: inline-flex; align-items: center; gap: 8px; font-family: 'Montserrat', sans-serif;
	font-weight: 800; font-size: 20px; color: #009F8F; text-decoration: none;
}
.vf-modal-tel:hover { color: #007A6E; }

/* Кнопка-триггер, если её выводит шорткод */
.vf-modal-trigger {
	display: inline-block; padding: 14px 28px; background: #009F8F; color: #fff;
	font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 15px; border: none;
	border-radius: 50px; cursor: pointer; transition: background .22s, transform .18s;
}
.vf-modal-trigger:hover { background: #007A6E; transform: translateY(-2px); color: #fff; }

@media (max-width: 480px) {
	.vf-modal-box { padding: 36px 22px 28px; border-radius: 18px; }
	.vf-modal-box h3 { font-size: 19px; }
}

/* Подсветка поля, не прошедшего собственную проверку JS (например, неполный телефон) */
.vf-field.vf-has-error .vf-input { border-color: #d32f2f; }

/* ---- Поле «адрес на карте» (вызов врача) ---- */
.vf-doctor { display: block; }
.vf-doctor .vf-doctor-map {
	width: 100%;
	height: 460px;
	margin-top: 12px;
	border-radius: 12px;
	overflow: hidden;
	background: #eef1f4;
	border: 1px solid #e3e8ee;
}
.vf-doctor-zone {
	margin-top: 10px;
	font-size: 14px;
	color: #4E6478;
}
.vf-doctor-zone:empty { display: none; }
.vf-doctor-price {
	margin-top: 8px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 17px;
	font-weight: 700;
	color: #18293C;
	background: #FFF6E0;
}
.vf-doctor-price:empty { display: none; }
.vf-doctor-price--error {
	background: #FDE9F4;
	color: #B0246B;
	font-weight: 600;
}

@media (max-width: 640px) {
	.vf-doctor .vf-doctor-map { height: 320px; }
	.vf-doctor-price { font-size: 16px; }
}
