.ipoteka {
	padding: 36px 16px 72px;
	color: #222;
	box-sizing: border-box;
}

.ipoteka_gray {
	background: #f3f3f3;
}

.ipoteka *,
.ipoteka-modal,
.ipoteka-modal * {
	box-sizing: border-box;
}

.ipoteka__wrap {
	max-width: 840px;
	margin: 0 auto;
}

.ipoteka__title {
	margin: 0;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.ipoteka__lead {
	margin: 8px 0 22px;
	color: #6f6f6f;
	font-size: 16px;
}

.ipoteka__card {
	background: #fff;
	border-radius: 28px;
	padding: 22px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.ipoteka__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.ipoteka__field {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	background: #f4f4f4;
	border-radius: 18px;
	padding: 14px 16px 10px;
	min-width: 0;
	position: relative;
	overflow: visible;
	margin: 0;
}

.ipoteka__label {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	color: #8d8d8d;
	font-size: 14px;
	line-height: 1.25;
	font-weight: 400;
	white-space: normal;
}

.ipoteka__label-row {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	color: #8d8d8d;
	font-size: 14px;
	line-height: 1.25;
}

.ipoteka__percent {
	position: static;
	float: none;
	flex: 0 0 auto;
	color: #e90e28;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.25;
	white-space: nowrap;
}

.ipoteka__value {
	display: flex !important;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: baseline;
	gap: 6px;
	width: 100%;
	min-width: 0;
	min-height: 36px;
	margin-top: 6px;
}

.ipoteka input.ipoteka__num {
	flex: 0 0 auto;
	width: auto !important;
	min-width: 2ch !important;
	max-width: 100%;
	height: auto !important;
	min-height: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	font-family: inherit;
	font-size: 26px !important;
	font-weight: 800;
	line-height: 1.15 !important;
	color: #1c1c1c;
	outline: none;
	field-sizing: content;
}

.ipoteka__unit {
	flex: 0 0 auto;
	font-family: Arial, "Segoe UI", sans-serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	color: #1c1c1c;
}

.ipoteka input.ipoteka__range {
	-webkit-appearance: none;
	appearance: none;
	position: static !important;
	display: block;
	width: 100% !important;
	height: 22px !important;
	margin: 8px 0 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.ipoteka__range::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 999px;
	background: linear-gradient(#e90e28, #e90e28) 0 / var(--p, 0%) 100% no-repeat #dedede;
}

.ipoteka__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	margin-top: -9px;
	border-radius: 50%;
	background: #fff;
	border: 0;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
	cursor: pointer;
}

.ipoteka__range::-moz-range-track {
	height: 4px;
	border-radius: 999px;
	background: #dedede;
	border: 0;
}

.ipoteka__range::-moz-range-progress {
	height: 4px;
	border-radius: 999px;
	background: #e90e28;
}

.ipoteka__range::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
	cursor: pointer;
}

.ipoteka__result {
	display: grid;
	grid-template-columns: 116px 1fr 1fr;
	gap: 18px 22px;
	align-items: center;
	margin: 26px 4px 8px;
}

.ipoteka__donut {
	width: 116px;
	height: 116px;
	border-radius: 50%;
	background: conic-gradient(#e14d27 0 var(--part, 0%), #e4e4e4 var(--part, 0%) 100%);
	position: relative;
}

.ipoteka__donut:after {
	content: "";
	position: absolute;
	inset: 22px;
	border-radius: 50%;
	background: #fff;
}

.ipoteka__legend,
.ipoteka__pays {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.ipoteka__row {
	display: grid;
	grid-template-columns: 14px 1fr;
	column-gap: 8px;
	row-gap: 2px;
	align-items: center;
}

.ipoteka__swatch {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	grid-row: span 2;
}

.ipoteka__swatch_loan {
	background: #e14d27;
}

.ipoteka__swatch_interest {
	background: #d5d5d5;
}

.ipoteka__row-label,
.ipoteka__pay span {
	color: #8d8d8d;
	font-size: 14px;
}

.ipoteka__row strong,
.ipoteka__pay strong {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.ipoteka__pay {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ipoteka__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 22px;
	min-height: 52px;
	border: 0;
	border-radius: 14px;
	background: #e90e28;
	color: #fff;
	font: inherit;
	font-size: 18px;
	font-weight: 800;
	cursor: pointer;
}

.ipoteka__cta:hover {
	background: #c90c22;
}

.ipoteka__cta:disabled {
	opacity: 0.7;
	cursor: default;
}

.ipoteka__note {
	margin: 14px 4px 0;
	color: #8a8a8a;
	font-size: 13px;
	line-height: 1.45;
}

.ipoteka-modal[hidden],
.ipoteka-form[hidden],
.ipoteka-form__error[hidden],
.ipoteka-form__success[hidden] {
	display: none !important;
}

.ipoteka-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 20px;
}

.ipoteka-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 20, 20, 0.45);
}

.ipoteka-modal__dialog {
	position: relative;
	width: min(440px, 100%);
	background: #fff;
	border-radius: 24px;
	padding: 28px 24px 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ipoteka-modal__dialog h2 {
	margin: 0 40px 6px 0;
	font-size: 26px;
	font-weight: 800;
}

.ipoteka-modal__summary {
	margin: 0 0 18px;
	color: #666;
}

.ipoteka-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f2f2f2;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.ipoteka-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 12px;
	font-size: 14px;
	color: #666;
}

.ipoteka-field input {
	height: 48px !important;
	border: 1px solid #e4e4e4 !important;
	border-radius: 12px !important;
	padding: 0 14px !important;
	font: inherit;
	font-size: 16px !important;
	color: #222;
	background: #fff !important;
	width: 100% !important;
	box-shadow: none !important;
}

.ipoteka-field input:focus {
	outline: 2px solid rgba(233, 14, 40, 0.25);
	border-color: #e90e28 !important;
}

.ipoteka-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 4px 0 12px;
	font-size: 13px;
	line-height: 1.4;
	color: #555;
}

.ipoteka-check input {
	margin-top: 2px !important;
	flex: none;
	width: auto !important;
	height: auto !important;
}

.ipoteka-check a {
	color: #e90e28;
}

.ipoteka-form__error {
	margin: 0 0 10px;
	color: #e90e28;
	font-size: 14px;
}

.ipoteka-form__success {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
}

.ipoteka-modal .ipoteka__cta {
	margin-top: 8px;
}

@media (max-width: 720px) {
	.ipoteka__grid,
	.ipoteka__result {
		grid-template-columns: 1fr;
	}

	.ipoteka input.ipoteka__num {
		font-size: 22px !important;
	}

	.ipoteka__donut {
		margin: 0 auto;
	}
}
