.overlay {
	position: fixed;
	inset: 0;
	z-index: 9998;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}
.overlay.active {
	opacity: 1;
	visibility: visible;
}

.calc-popup--credit.popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 9999;
	width: calc(100% - 32px);
	max-width: 460px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	display: flex;
	flex-direction: column;
}
.calc-popup--credit.popup.active {
	opacity: 1;
	visibility: visible;
}

/* Шапка с кнопкой закрытия */
.calc-popup--credit .popup__header {
	position: relative;
	flex-shrink: 0;
	padding: 12px 16px 0;
	text-align: right;
}
.calc-popup--credit .popup-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	cursor: pointer;
	opacity: 0.7;
	border-radius: 50%;
	transition: opacity 0.2s;
}
.calc-popup--credit .popup-close:hover {
	opacity: 1;
}
.calc-popup--credit .popup-close img {
	width: 20px;
	height: 20px;
}

.calc-popup--credit .popup__body {
	flex: 1;
	overflow-y: auto;
	padding: 4px 24px 28px;
	-webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
	.calc-popup--credit .popup__body {
		padding: 4px 32px 32px;
	}
}

.calc-popup--credit .title-row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin: 0 0 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid #ECECEC;
}
.calc-popup--credit .title {
	margin: 0;
	font-family: "NT Somic Med";
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.3;
	text-align: left;
}
.calc-popup--credit .sub-title {
	margin: 0 0 20px;
	font-size: 0.875rem;
	color: #666;
	line-height: 1.4;
	text-align: left;
}


.calc-popup--credit .form__section--contact {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-bottom: 28px;
}
.calc-popup--credit .form__section--contact .form__row {
	display: block;
	margin-bottom: 0;
	gap: 0;
}
.calc-popup--credit .form__section--contact .form__row--full {
	grid-column: 1 / -1;
}
.calc-popup--credit .form__section--contact .form__label,
.calc-popup--credit .form__section--contact label {
	display: block;
	font-family: "NT Somic Med";
	font-size: 0.9375rem;
	font-weight: 400;
	color: #252628;
	margin-bottom: 4px;
}
.calc-popup--credit .form__section--contact input[type="text"],
.calc-popup--credit .form__section--contact input[type="email"],
.calc-popup--credit .form__section--contact input[type="tel"] {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 13px 16px;
	font-size: 1rem;
	background: #F8F8F8;
	border: 1px solid #E5E5E5;
	border-radius: 10px;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.calc-popup--credit .form__section--contact input:focus {
	outline: none;
	background: #fff;
	border-color: #069347;
	box-shadow: 0 0 0 3px rgba(6, 147, 71, 0.12);
}
.calc-popup--credit .form__section--contact input::placeholder {
	color: #999;
}

.calc-popup--credit .form__section--captcha-consent {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px 24px;
	align-items: start;
	padding-top: 20px;
	margin-bottom: 20px;
	border-top: 1px solid #ECECEC;
}
.calc-popup--credit .form__captcha-consent__left {
	display: flex;
	justify-content: flex-start;
}
.calc-popup--credit .form__captcha-consent__left .confidentiality-cb {
	margin-bottom: 0;
}
.calc-popup--credit .form__captcha-consent__right .form__row--captcha {
	margin-bottom: 0;
	justify-content: flex-start;
}
.calc-popup--credit .form__captcha-consent__right .form__row--captcha .smart-captcha {
	display: inline-block;
}
@media (max-width: 520px) {
	.calc-popup--credit .form__section--captcha-consent {
		grid-template-columns: 1fr;
	}
	.calc-popup--credit .form__captcha-consent__left {
		justify-content: flex-start;
	}
}

.calc-popup--credit .form__row--captcha {
	display: flex;
	justify-content: flex-start;
}
.calc-popup--credit .form__row--submit {
	margin-top: 4px;
	margin-bottom: 0;
}
.calc-popup--credit .submit-btn {
	width: 100%;
	padding: 15px 24px;
	font-family: "NT Somic Bd";
	font-size: 1rem;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: opacity 0.2s;
}
.calc-popup--credit .submit-btn:hover {
	opacity: 0.95;
}

/* согласие на пд */
.calc-popup--credit .form__row--checkbox.confidentiality-cb {
	margin-bottom: 0;
}
.calc-popup--credit .confidentiality-cb .confidentiality-cb__label {
	font-size: 0.875rem;
	color: #555;
	line-height: 1.4;
}
.calc-popup--credit .confidentiality-cb label.confidentiality-cb__label:after {
	top: 1px;
	border-radius: 4px;
}
.calc-popup--credit .confidentiality-cb input:checked + label.confidentiality-cb__label:after {
	background-color: #069347;
}

/* Ошибки */
.calc-popup--credit .form_errors {
	padding: 10px 12px;
	margin-bottom: 16px;
	background: #fff0f0;
	border: 1px solid #fcc;
	border-radius: 8px;
	font-size: 0.875rem;
	color: #c00;
}
.calc-popup--credit .error-fld {
	display: block;
	font-size: 0.75rem;
	color: #c00;
	margin-top: 2px;
}
