/* ───────────────  Всплывающая форма заявки  ─────────────── */

.tpopup {
	position: fixed;
	inset: 0;
	z-index: 1200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tpopup[hidden] {
	display: none;
}

.tpopup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(24, 20, 16, .55);
}

.tpopup__card {
	position: relative;
	width: 400px;
	max-width: 100%;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 32px 32px 28px;
	border: 1px solid rgba(255, 255, 255, .4);
	border-radius: var(--t-radius-lg);
	background: var(--t-paper);
	box-shadow: var(--t-shadow-card);
	color: var(--t-ink);
}

.tpopup__x {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--t-muted);
	cursor: pointer;
	transition: .15s;
}

.tpopup__x:hover {
	background: rgba(33, 29, 25, .07);
	color: var(--t-ink);
}

.tpopup__title {
	font-family: var(--t-font-display);
	font-weight: 800;
	font-size: 24px;
	line-height: 1.1;
	letter-spacing: -.02em;
	padding-right: 36px;
}

.tpopup__subtitle {
	margin: 9px 0 22px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--t-muted);
}

.tpopup__field {
	margin-bottom: 12px;
}

.tpopup__note {
	margin-top: 16px;
	text-align: center;
}

/* ───────────────  Contact Form 7 внутри попапа  ─────────────── */

.tpopup__card .wpcf7 {
	margin: 0;
}

.tpopup__card .wpcf7-form-control-wrap {
	display: block;
}

.tpopup__card input.wpcf7-submit {
	width: 100%;
}

.tpopup__card .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: 12.5px;
	line-height: 1.4;
	color: #B3261E;
}

.tpopup__card .wpcf7-not-valid {
	border-color: #B3261E;
}

.tpopup__card .wpcf7-response-output {
	margin: 14px 0 0;
	padding: 12px 14px;
	border: 1.5px solid var(--t-border);
	border-radius: var(--t-radius-md);
	font-size: 13.5px;
	line-height: 1.45;
}

.tpopup__card form.sent .wpcf7-response-output {
	border-color: var(--t-accent);
	background: rgba(188, 106, 56, .08);
	color: var(--t-accent-dark);
}

.tpopup__card form.invalid .wpcf7-response-output,
.tpopup__card form.failed .wpcf7-response-output {
	border-color: #B3261E;
	background: rgba(179, 38, 30, .07);
	color: #B3261E;
}

.tpopup__card .wpcf7-spinner {
	margin: 10px auto 0;
	display: block;
}

@media (max-width: 480px) {
	.tpopup {
		padding: 12px;
	}

	.tpopup__card {
		padding: 26px 20px 22px;
	}
}
