/**
 * Trade-in: сторінка-калькулятор.
 *
 * Та сама мова, що в кабінеті: картки з радіусом 22, пігулки, зелений
 * акцент для суми. Кроки відкриваються послідовно — закриті притлумлені.
 */

.am-ti-page {
	--am-ti-green: #0d7c37;
	padding-bottom: 80px;
}

/* ---------- шапка сторінки ---------- */

.am-ti-page__crumbs {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 26px 0 12px;
	font-size: 13.5px;
	color: var(--am-muted, #8a8f8b);
}

.am-ti-page__crumbs a {
	color: var(--am-muted, #8a8f8b);
	text-decoration: none;
}

.am-ti-page__here {
	color: var(--am-text, #0e1011);
}

.am-ti-page__hero {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 32px;
	align-items: end;
	margin-bottom: 30px;
}

.am-ti-page__title {
	margin: 0 0 12px;
	font-size: 44px;
	line-height: 1.05;
	letter-spacing: -0.035em;
	font-weight: 800;
	max-width: 16ch;
}

.am-ti-page__lead {
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
	color: var(--am-text-3, #6e736f);
	max-width: 52ch;
}

.am-ti-page__steps-hint {
	list-style: none;
	margin: 0;
	padding: 18px 22px;
	display: grid;
	gap: 10px;
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 20px;
	font-size: 14px;
	color: var(--am-text-2, #43474d);
}

.am-ti-page__steps-hint li {
	display: flex;
	align-items: center;
	gap: 12px;
}

.am-ti-page__steps-hint b {
	flex: none;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--am-dark, #1c1d1f);
	color: #fff;
	font-size: 12px;
	display: grid;
	place-items: center;
}

.am-ti-page__empty {
	text-align: center;
	padding: 48px 24px;
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 22px;
}

/* ---------- сітка калькулятора ---------- */

.am-ti {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 24px;
	align-items: start;
}

.am-ti__flow {
	display: grid;
	gap: 14px;
	min-width: 0;
}

.am-ti__step {
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 22px;
	padding: 22px 26px;
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.am-ti__step.is-open {
	opacity: 1;
	pointer-events: auto;
}

.am-ti__step.is-done .am-ti__h span {
	background: var(--am-ti-green);
}

.am-ti__h {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.am-ti__h em {
	font-style: normal;
}

.am-ti__h span {
	flex: none;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--am-dark, #1c1d1f);
	color: #fff;
	font-size: 13px;
	display: grid;
	place-items: center;
	transition: background-color 0.2s ease;
}

/* пігулки типу та пам'яті */

.am-ti__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.am-ti .am-ti__pill {
	appearance: none;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	background: #fff;
	border-radius: 999px;
	padding: 12px 20px;
	font: inherit;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--am-text, #0e1011);
	cursor: pointer;
	text-transform: none;
	transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.am-ti__pills--sm .am-ti__pill {
	padding: 10px 16px;
	font-size: 14px;
}

.am-ti .am-ti__pill:hover {
	border-color: var(--am-dark, #1c1d1f);
}

.am-ti .am-ti__pill.is-active {
	background: var(--am-dark, #1c1d1f);
	border-color: var(--am-dark, #1c1d1f);
	color: #fff;
}

/* моделі */

.am-ti__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.am-ti .am-ti__model {
	appearance: none;
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: flex-start;
	text-align: left;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	background: #fff;
	border-radius: 14px;
	padding: 13px 15px;
	font: inherit;
	cursor: pointer;
	text-transform: none;
	transition: border-color 0.16s ease, background-color 0.16s ease;
}

.am-ti .am-ti__model:hover {
	border-color: var(--am-dark, #1c1d1f);
}

.am-ti .am-ti__model.is-active {
	border-color: var(--am-dark, #1c1d1f);
	background: var(--am-surface-3, #f1f2f1);
}

.am-ti__model-n {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--am-text, #0e1011);
}

.am-ti__model-p {
	font-size: 12.5px;
	color: var(--am-ti-green);
	font-weight: 600;
}

.am-ti__hint {
	margin: 0;
	font-size: 14px;
	color: var(--am-text-3, #6e736f);
}

/* стан */

.am-ti__conds,
.am-ti__deals {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
}

.am-ti .am-ti__cond,
.am-ti .am-ti__deal {
	appearance: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-start;
	text-align: left;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	background: #fff;
	border-radius: 16px;
	padding: 16px 18px;
	font: inherit;
	cursor: pointer;
	text-transform: none;
	transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.am-ti .am-ti__cond:hover,
.am-ti .am-ti__deal:hover {
	border-color: var(--am-dark, #1c1d1f);
	transform: translateY(-1px);
}

.am-ti .am-ti__cond.is-active,
.am-ti .am-ti__deal.is-active {
	border-color: var(--am-dark, #1c1d1f);
	background: var(--am-surface-3, #f1f2f1);
	box-shadow: inset 0 0 0 1px var(--am-dark, #1c1d1f);
}

.am-ti__cond-t,
.am-ti__deal-t {
	font-size: 15.5px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--am-text, #0e1011);
}

.am-ti__cond-s,
.am-ti__deal-s {
	font-size: 13px;
	line-height: 1.45;
	color: var(--am-text-3, #6e736f);
}

.am-ti__cond-p {
	margin-top: 6px;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--am-ti-green);
}

/* форма */

.am-ti__fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin-bottom: 14px;
}

.am-ti__field {
	display: block;
	margin-bottom: 14px;
}

.am-ti__field span {
	display: block;
	font-size: 11px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--am-muted, #8a8f8b);
	margin-bottom: 8px;
}

.am-ti input.am-ti__input,
.am-ti .am-ti__field input,
.am-ti .am-ti__field textarea {
	width: 100%;
	padding: 0 16px;
	height: 52px;
	font: inherit;
	font-size: 15px;
	color: var(--am-text, #0e1011);
	background: #fff;
	border: 1px solid var(--am-border-ctl, #dde0dd);
	border-radius: 13px;
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.am-ti .am-ti__field textarea {
	height: auto;
	padding: 14px 16px;
	resize: vertical;
}

.am-ti .am-ti__field input:focus,
.am-ti .am-ti__field textarea:focus {
	border-color: var(--am-dark, #1c1d1f);
	box-shadow: 0 0 0 4px rgba(28, 29, 31, 0.07);
}

.am-ti .am-ti__submit {
	height: 56px;
	padding: 0 30px;
	border-radius: 999px;
	font-size: 15.5px;
}

.am-ti__note {
	margin: 14px 0 0;
	padding: 11px 14px;
	border-radius: 12px;
	background: #fdf0ee;
	font-size: 13.5px;
	color: #a5321f;
}

/* успіх */

.am-ti__done {
	text-align: center;
	padding: 44px 28px;
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 22px;
}

.am-ti__done-ic {
	width: 62px;
	height: 62px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: var(--am-ti-green);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 30px;
}

.am-ti__done h2 {
	margin: 0 0 8px;
	font-size: 24px;
	letter-spacing: -0.03em;
	font-weight: 800;
}

.am-ti__done p {
	margin: 0 auto 22px;
	max-width: 46ch;
	font-size: 15px;
	line-height: 1.55;
	color: var(--am-text-3, #6e736f);
}

/* ---------- підсумок ---------- */

.am-ti__side {
	position: sticky;
	top: 96px;
	display: grid;
	gap: 14px;
}

.am-ti__card {
	background: var(--am-surface, #fff);
	border: 1px solid var(--am-border, #e4e6e4);
	border-radius: 22px;
	padding: 22px 24px;
}

.am-ti__card--soft {
	background: var(--am-surface-2, #f7f8f7);
	font-size: 14px;
	line-height: 1.55;
	color: var(--am-text-2, #43474d);
}

.am-ti__card--soft p {
	margin: 0 0 12px;
}

.am-ti__card-h {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--am-muted, #8a8f8b);
	margin-bottom: 14px;
}

.am-ti__sum {
	margin: 0 0 16px;
	display: grid;
	gap: 9px;
}

.am-ti__sum div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 14px;
}

.am-ti__sum dt {
	color: var(--am-text-3, #6e736f);
}

.am-ti__sum dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.am-ti__price {
	padding: 16px 0 12px;
	border-top: 1px solid var(--am-divider, #edeeed);
}

.am-ti__price-l {
	display: block;
	font-size: 13px;
	color: var(--am-text-3, #6e736f);
}

.am-ti__price-v {
	display: block;
	margin-top: 4px;
	font-size: 30px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--am-ti-green);
}

.am-ti__fine {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--am-muted, #8a8f8b);
}

.am-ti .am-ti__phone {
	display: inline-block;
	font-size: 17px;
	font-weight: 800;
	color: var(--am-text, #0e1011);
	text-decoration: none;
	letter-spacing: -0.01em;
}

/* ---------- мобільні ---------- */

@media (max-width: 960px) {
	.am-ti {
		grid-template-columns: 1fr;
	}

	.am-ti__side {
		position: static;
	}

	.am-ti-page__hero {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.am-ti-page__title {
		font-size: 32px;
	}

	.am-ti__step {
		padding: 18px;
		border-radius: 18px;
	}
}
