:root {
	--cash-rates-spacing: 20px;
	--cash-rates-bg: #1a1c1f;
	--cash-rates-panel: #24282d;
	--cash-rates-row: rgba(255, 255, 255, 0.04);
	--cash-rates-border: rgba(255, 255, 255, 0.1);
	--cash-rates-text: #ffffff;
	--cash-rates-muted: rgba(255, 255, 255, 0.55);
	--cash-rates-red: #e92932;
	--cash-rates-red-soft: rgba(233, 41, 50, 0.16);
	--cash-rates-radius: 20px;
	--cash-rates-shadow: 0 4px 60.6px rgba(0, 0, 0, 0.1);
	--expay-switch-duration: 0.36s;
	--expay-switch-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.expay-exchange-switcher {
	position: relative;
	width: 100%;
	max-width: 39.38em;
	margin-left: auto;
	margin-right: 0;
	display: grid;
	grid-template-columns: 1fr;
	transition: min-height var(--expay-switch-duration) var(--expay-switch-ease);
}

.expay-exchange-switcher > #expay-cash-rates,
.expay-exchange-switcher > .xchange_calculator-hidden {
	grid-area: 1 / 1;
	width: 100%;
	max-width: none;
	margin: 0;
	transition:
		opacity var(--expay-switch-duration) var(--expay-switch-ease),
		transform var(--expay-switch-duration) var(--expay-switch-ease),
		visibility var(--expay-switch-duration) var(--expay-switch-ease);
	will-change: opacity, transform;
}

#expay-cash-rates:not(.is-hidden),
.xchange_calculator-hidden.is-visible {
	position: relative;
}

#expay-cash-rates.is-hidden,
.xchange_calculator-hidden:not(.is-visible) {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

.xchange_calculator-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(16px, 0, 0) scale(0.985);
	display: block !important;
	z-index: 1;
}

.xchange_calculator-hidden.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0) scale(1);
	z-index: 3;
}

#expay-cash-rates {
	opacity: 1;
	visibility: visible;
	transform: translate3d(0, 0, 0) scale(1);
	z-index: 3;
}

#expay-cash-rates.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(-16px, 0, 0) scale(0.985);
	z-index: 1;
}

/* Loader premiumbox на главной скрыт — см. calculator-home-loader.css */

.cash-rates-card {
	position: relative;
	z-index: 10;
	width: 100%;
}

.cash-rates-card__panel {
	width: 100%;
	min-height: 0;
	padding: 16px 20px;
	border-radius: var(--cash-rates-radius);
	background: linear-gradient(165deg, rgba(233, 41, 50, 0.12) 0%, var(--cash-rates-bg) 38%);
	border: 1px solid var(--cash-rates-border);
	box-shadow: var(--cash-rates-shadow);
	color: var(--cash-rates-text);
	font-family: "OpenRunde", "Nunito", sans-serif;
}

.cash-rates-card__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.cash-rates-controls {
	display: grid;
	gap: 12px;
}

.cash-rates-city,
.cash-rates-currency {
	position: relative;
}

.cash-rates-city__toggle,
.cash-rates-currency__toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--cash-rates-border);
	border-radius: 14px;
	background: var(--cash-rates-panel);
	color: var(--cash-rates-text);
	cursor: pointer;
	transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.cash-rates-city__toggle:hover,
.cash-rates-city__toggle:focus-visible,
.cash-rates-currency__toggle:hover,
.cash-rates-currency__toggle:focus-visible {
	border-color: rgba(233, 41, 50, 0.45);
	box-shadow: 0 0 0 3px var(--cash-rates-red-soft);
	outline: none;
}

.cash-rates-city.is-open .cash-rates-city__toggle,
.cash-rates-currency.is-open .cash-rates-currency__toggle {
	border-color: rgba(233, 41, 50, 0.55);
}

.cash-rates-city__label {
	font-size: 12px;
	font-weight: 500;
	color: var(--cash-rates-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cash-rates-city__value,
.cash-rates-currency__name {
	flex: 1;
	text-align: left;
	font-size: 18px;
	font-weight: 600;
}

.cash-rates-city__chevron,
.cash-rates-currency__chevron {
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--cash-rates-text);
	border-bottom: 2px solid var(--cash-rates-text);
	transform: rotate(45deg);
	transition: transform 0.25s ease;
	margin-right: 4px;
	flex-shrink: 0;
}

.cash-rates-city.is-open .cash-rates-city__chevron,
.cash-rates-currency.is-open .cash-rates-currency__chevron {
	transform: rotate(-135deg);
}

.cash-rates-city__list,
.cash-rates-currency__list {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 20;
	margin: 0;
	padding: 8px;
	list-style: none;
	border-radius: 14px;
	border: 1px solid var(--cash-rates-border);
	background: #2a2d31;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
	max-height: 260px;
	overflow: auto;
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.cash-rates-city.is-open .cash-rates-city__list,
.cash-rates-currency.is-open .cash-rates-currency__list {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.cash-rates-city__list[hidden],
.cash-rates-currency__list[hidden] {
	display: block;
}

.cash-rates-city__option,
.cash-rates-currency__option {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--cash-rates-text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.cash-rates-city__option:hover,
.cash-rates-city__option:focus-visible,
.cash-rates-currency__option:hover,
.cash-rates-currency__option:focus-visible {
	background: var(--cash-rates-red-soft);
	outline: none;
}

.cash-rates-city__option.is-active,
.cash-rates-currency__option.is-active {
	background: rgba(233, 41, 50, 0.24);
	color: #fff;
}

.cash-rates-currency__badge,
.cash-rates-currency__option-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--cash-rates-red);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	flex-shrink: 0;
}

.cash-rates-currency__option-badge {
	width: 28px;
	height: 28px;
	font-size: 14px;
}

.cash-rates-table-wrap {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 180px;
	position: relative;
}

.cash-rates-table-wrap.is-skeleton {
	pointer-events: none;
}

.cash-rates-table-wrap.is-skeleton .cash-rates-table thead {
	opacity: 0.35;
}

.cash-rates-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0 8px;
}

.cash-rates-table thead th {
	padding: 0 12px 4px;
	font-size: 12px;
	font-weight: 500;
	color: var(--cash-rates-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: left;
}

.cash-rates-table thead th:nth-child(2),
.cash-rates-table thead th:nth-child(3) {
	text-align: right;
}

.cash-rates-table__row td {
	padding: 14px 12px;
	background: var(--cash-rates-row);
	vertical-align: middle;
	transition: background-color 0.2s ease;
}

.cash-rates-table__row td:first-child {
	border-radius: 14px 0 0 14px;
}

.cash-rates-table__row td:last-child {
	border-radius: 0 14px 14px 0;
}

.cash-rates-coin {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.cash-rates-coin__icon {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.08);
}

.cash-rates-coin__icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cash-rates-coin__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cash-rates-coin__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
}

.cash-rates-coin__code {
	font-size: 12px;
	color: var(--cash-rates-muted);
	line-height: 1.2;
}

.cash-rates-table__row--linked {
	cursor: pointer;
}

.cash-rates-table__row--linked:hover td,
.cash-rates-table__row--linked:focus-visible td {
	background: rgba(233, 41, 50, 0.14);
}

.cash-rates-table__row--linked:focus {
	outline: none;
}

.cash-rates-table__row--linked:focus-visible {
	outline: 2px solid rgba(233, 41, 50, 0.55);
	outline-offset: 2px;
	border-radius: 14px;
}

.cash-rates-table__rate {
	font-size: 15px;
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}

.cash-rates-table__rate--buy {
	color: #fff;
}

.cash-rates-table__rate--sell {
	color: rgba(255, 255, 255, 0.82);
}

.cash-rates-table__rate.is-empty {
	color: var(--cash-rates-muted);
	font-weight: 500;
}

.cash-rates-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 4px;
}

.cash-rates-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 16px;
	border-radius: 12px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.cash-rates-btn--primary {
	border: none;
	background: var(--cash-rates-red);
	color: #fff;
	text-decoration: none;
}

.cash-rates-btn--ghost {
	border: 1px solid var(--cash-rates-border);
	background: transparent;
	color: var(--cash-rates-text);
}

.cash-rates-btn--primary:hover,
.cash-rates-btn--primary:focus-visible {
	background: #d4222a;
	outline: none;
}

.cash-rates-btn--ghost:hover,
.cash-rates-btn--ghost:focus-visible {
	border-color: rgba(233, 41, 50, 0.45);
	background: var(--cash-rates-red-soft);
	outline: none;
}

.xchange_calculator-hidden .exchange-actions .btn-details.js-cash-rates-show-rates {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 16px;
	border: 1px solid var(--cash-rates-border);
	border-radius: 12px;
	background: transparent;
	color: var(--cash-rates-text);
	font-family: "OpenRunde", "Nunito", sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.xchange_calculator-hidden .exchange-actions .btn-details.js-cash-rates-show-rates:hover,
.xchange_calculator-hidden .exchange-actions .btn-details.js-cash-rates-show-rates:focus-visible {
	border-color: rgba(233, 41, 50, 0.45);
	background: var(--cash-rates-red-soft);
	outline: none;
}

@media (prefers-reduced-motion: reduce) {
	.expay-exchange-switcher,
	.expay-exchange-switcher > #expay-cash-rates,
	.expay-exchange-switcher > .xchange_calculator-hidden {
		transition: none;
	}

	.xchange_calculator-hidden,
	#expay-cash-rates.is-hidden {
		transform: none;
	}
}

.cash-rates-card.is-loading .cash-rates-city__toggle,
.cash-rates-card.is-loading .cash-rates-currency__toggle {
	opacity: 0.72;
}

.cash-rates-card.is-loading .cash-rates-city__toggle,
.cash-rates-card.is-loading .cash-rates-currency__toggle,
.cash-rates-card.is-loading .cash-rates-btn {
	pointer-events: none;
}

.cash-rates-table__row--skeleton td {
	pointer-events: none;
}

.cash-rates-skeleton {
	display: flex;
	align-items: center;
	gap: 12px;
}

.cash-rates-skeleton__circle {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	flex-shrink: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.06) 75%);
	background-size: 200% 100%;
	animation: cash-rates-shimmer 1.1s ease-in-out infinite;
}

.cash-rates-skeleton__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.cash-rates-skeleton__line {
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.14) 50%, rgba(255, 255, 255, 0.06) 75%);
	background-size: 200% 100%;
	animation: cash-rates-shimmer 1.1s ease-in-out infinite;
}

.cash-rates-skeleton__line.w40 {
	width: 40%;
}

.cash-rates-skeleton__line.w60 {
	width: 60%;
}

.cash-rates-skeleton__line.w70 {
	width: 70%;
	margin-left: auto;
}

.cash-rates-table__row--skeleton .cash-rates-skeleton__line {
	height: 16px;
}

@keyframes cash-rates-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@media (max-width: 81.25em) and (min-width: 62.5em) {
	.expay-exchange-switcher {
		max-width: 33.13em;
	}
}

@media (max-width: 56.25em) {
	.expay-exchange-switcher {
		max-width: 47.5em;
	}
}

@media (min-width: 1024px) {
	.cash-rates-card__panel {
		padding: 24px;
	}

	.cash-rates-table__rate {
		font-size: 16px;
	}
}

@media (max-width: 767px) {
	.cash-rates-table thead {
		display: none;
	}

	.cash-rates-table__row {
		display: grid;
		grid-template-columns: 1fr;
		gap: 8px;
		margin-bottom: 10px;
	}

	.cash-rates-table__row td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-radius: 12px !important;
	}

	.cash-rates-table__rate::before {
		font-size: 12px;
		font-weight: 500;
		color: var(--cash-rates-muted);
		text-transform: uppercase;
	}

	.cash-rates-table__rate--buy::before {
		content: "Купить";
	}

	.cash-rates-table__rate--sell::before {
		content: "Продать";
	}

	.cash-rates-actions {
		grid-template-columns: 1fr;
	}
}
