/**
 * sinon.installment — оформление блоков рассрочки для Aspro Premier.
 * Наследует переменные темы (радиусы, шрифт), поэтому вписывается в монохром сайта.
 */

:root {
	--sn-inst-accent: #00af66;
	--sn-inst-radius: var(--theme-outer-border-radius, 12px);
	--sn-inst-muted: #7b7f87;
	--sn-inst-ink: #1a1c20;
	--sn-inst-line: rgba(0, 0, 0, .1);
	--sn-inst-soft: rgba(0, 0, 0, .028);
}

/* ------------------------------------------------------ строка в карточке списка */

.sn-inst--list {
	display: flex;
	align-items: center;
	gap: 5px;
	margin: -2px 0 8px;
	font-size: 12px;
	line-height: 16px;
	color: var(--sn-inst-muted);
	letter-spacing: normal;
}

.sn-inst--list .sn-inst__icon {
	display: flex;
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	color: var(--sn-inst-accent);
}

.sn-inst--list .sn-inst__icon svg {
	width: 14px;
	height: 14px;
}

.sn-inst--list .sn-inst__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sn-inst__val {
	font-weight: 600;
	color: var(--sn-inst-ink);
}

/* --------------------------------------------------------- блок в детальной карточке */

/* Колонка с ценой у Aspro узкая (~280px), поэтому блок строится строками:
   заголовок получает всю ширину, логотип банка уходит в подвал. */
.sn-inst-card {
	display: flex;
	flex-direction: column;
	padding: 12px 14px;
	border: 1px solid var(--sn-inst-line);
	border-radius: var(--sn-inst-radius);
	background: var(--sn-inst-soft);
	cursor: pointer;
	user-select: none;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.sn-inst-card:hover,
.sn-inst-card:focus-visible {
	border-color: color-mix(in srgb, var(--sn-inst-accent) 55%, transparent);
	background: #fff;
	box-shadow: 0 4px 16px rgba(16, 24, 40, .07);
	outline: none;
}

.sn-inst-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sn-inst-card__title {
	font-size: 15px;
	line-height: 20px;
	font-weight: 500;
	color: var(--sn-inst-ink);
}

.sn-inst-card__title .sn-inst__val {
	font-weight: 600;
}

.sn-inst-card__sub {
	margin-top: 2px;
	font-size: 12px;
	line-height: 16px;
	color: var(--sn-inst-muted);
}

.sn-inst-card__bank {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--sn-inst-line);
}

.sn-inst-card__bank-label {
	font-size: 11px;
	line-height: 15px;
	color: #9aa0a8;
}

.sn-inst-card__logo {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.sn-inst-card__logo img {
	max-width: 78px;
	max-height: 20px;
	object-fit: contain;
}

.sn-inst-card__logo b {
	font-size: 12px;
	font-weight: 600;
	color: var(--sn-inst-ink);
}

.sn-inst-card__info {
	display: flex;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	color: #b0b4bb;
	transition: color .18s ease;
}

.sn-inst-card__info svg {
	width: 18px;
	height: 18px;
}

.sn-inst-card:hover .sn-inst-card__info {
	color: var(--sn-inst-accent);
}

/* --------------------------------------------------------------------- поповер */

.sn-inst-pop {
	position: fixed;
	z-index: 1200;
	width: 360px;
	max-width: calc(100vw - 20px);
	padding: 16px 18px 18px;
	border: 1px solid var(--sn-inst-line);
	border-radius: var(--sn-inst-radius);
	background: #fff;
	box-shadow: 0 12px 40px rgba(16, 24, 40, .16);
	font-size: 13px;
	line-height: 18px;
	color: var(--sn-inst-ink);
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .16s ease, transform .16s ease;
}

.sn-inst-pop--open {
	opacity: 1;
	transform: none;
}

.sn-inst-pop[hidden] {
	display: none;
}

.sn-inst-pop__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.sn-inst-pop__title {
	font-size: 16px;
	line-height: 22px;
	font-weight: 600;
}

.sn-inst-pop__close {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	margin: -3px -5px 0 0;
	padding: 0;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--sn-inst-muted);
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.sn-inst-pop__close:hover {
	background: var(--sn-inst-soft);
	color: var(--sn-inst-ink);
}

.sn-inst-pop__close svg {
	width: 15px;
	height: 15px;
}

.sn-inst-pop__price {
	margin-bottom: 12px;
	color: var(--sn-inst-muted);
}

.sn-inst-pop__price b {
	font-weight: 600;
	color: var(--sn-inst-ink);
}

.sn-inst-pop__table {
	width: 100%;
	margin-bottom: 14px;
	border-collapse: collapse;
	table-layout: fixed;
}

.sn-inst-pop__table th {
	padding: 0 8px 6px 0;
	font-size: 11px;
	font-weight: 400;
	line-height: 14px;
	text-align: left;
	color: var(--sn-inst-muted);
	border-bottom: 1px solid var(--sn-inst-line);
}

.sn-inst-pop__table td {
	padding: 9px 8px 9px 0;
	border-bottom: 1px solid var(--sn-inst-line);
	vertical-align: middle;
}

.sn-inst-pop__table tr:last-child td {
	border-bottom: 0;
	padding-bottom: 0;
}

.sn-inst-pop__table th:last-child,
.sn-inst-pop__table td:last-child {
	padding-right: 0;
	text-align: right;
}

.sn-inst-pop__pay {
	font-weight: 600;
}

.sn-inst-pop__free {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 20px;
	background: color-mix(in srgb, var(--sn-inst-accent) 12%, transparent);
	color: color-mix(in srgb, var(--sn-inst-accent) 82%, #000);
	font-size: 11px;
	line-height: 15px;
	font-weight: 500;
	white-space: nowrap;
}

.sn-inst-pop__text {
	color: #4a4e56;
}

.sn-inst-pop__text p {
	margin: 0 0 8px;
}

.sn-inst-pop__text p:last-child {
	margin-bottom: 0;
}

.sn-inst-pop__bank {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--sn-inst-line);
	font-size: 12px;
	color: var(--sn-inst-muted);
}

.sn-inst-pop__bank-mark {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.sn-inst-pop__bank-mark b {
	font-weight: 600;
	color: var(--sn-inst-ink);
}

.sn-inst-pop__bank img {
	max-width: 84px;
	max-height: 26px;
	object-fit: contain;
}

.sn-inst-pop__link {
	display: inline-block;
	margin-top: 10px;
	font-size: 12px;
	color: color-mix(in srgb, var(--sn-inst-accent) 85%, #000);
	text-decoration: none;
	border-bottom: 1px dashed currentColor;
}

.sn-inst-pop__link:hover {
	border-bottom-style: solid;
}

.sn-inst-pop__note {
	margin-top: 10px;
	font-size: 11px;
	line-height: 15px;
	color: #9aa0a8;
}

/* Мобильный поповер — нижний лист */

.sn-inst-pop--sheet {
	top: auto !important;
	right: 0;
	bottom: 0;
	left: 0 !important;
	width: auto;
	max-width: none;
	border-width: 1px 0 0;
	border-radius: 16px 16px 0 0;
	padding-bottom: max(18px, env(safe-area-inset-bottom));
	transform: translateY(14px);
}

.sn-inst-pop--sheet.sn-inst-pop--open {
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.sn-inst-card,
	.sn-inst-pop {
		transition: none;
	}
}
