/**
 * Markets & Prices category page only.
 * Scoped to .cryptomag-markets-page — does not affect other templates.
 */

.cryptomag-markets-page__sort {
	font: inherit;
	color: inherit;
	text-transform: inherit;
	letter-spacing: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.cryptomag-markets-page__sort:hover {
	color: #138085;
}

.cryptomag-markets-page__row[hidden] {
	display: none;
}

.cryptomag-markets-page__row.is-up .cryptomag-markets-page__change {
	color: #138085;
}

.cryptomag-markets-page__row.is-down .cryptomag-markets-page__change {
	color: #e11d48;
}

.cryptomag-markets-page__row:hover {
	background: rgba(19, 128, 133, 0.04);
}

.cryptomag-markets-page__credit-logo-link {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin-inline: 0.2rem;
	line-height: 0;
	text-decoration: none;
}

.cryptomag-markets-page__credit-logo {
	display: block;
	height: 0.875rem;
	width: auto;
}

.cryptomag-markets-page__search-suggestions {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 0;
	right: 0;
	z-index: 20;
	margin: 0;
	padding: 0.35rem;
	list-style: none;
	border: 1px solid rgba(17, 18, 20, 0.1);
	border-radius: 1rem;
	background: #ffffff;
	box-shadow: 0 18px 48px rgba(17, 18, 20, 0.12);
	max-height: 16rem;
	overflow-y: auto;
}

.cryptomag-markets-page__search-suggestion {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.65rem 0.75rem;
	border-radius: 0.75rem;
	cursor: pointer;
}

.cryptomag-markets-page__search-suggestion.is-active,
.cryptomag-markets-page__search-suggestion:hover {
	background: rgba(19, 128, 133, 0.1);
}

.cryptomag-markets-page__search-suggestion-icon {
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 9999px;
	flex-shrink: 0;
}

.cryptomag-markets-page__search-suggestion-copy {
	display: grid;
	min-width: 0;
}

.cryptomag-markets-page__search-suggestion-name {
	font-size: 0.9rem;
	font-weight: 800;
	color: #111214;
}

.cryptomag-markets-page__search-suggestion-symbol {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	color: rgba(17, 18, 20, 0.45);
}

.cryptomag-markets-page__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.cryptomag-markets-page__table {
	width: 100%;
	min-width: 720px;
	table-layout: fixed;
	border-collapse: collapse;
}

.cryptomag-markets-page__table th,
.cryptomag-markets-page__table td {
	white-space: nowrap;
	vertical-align: middle;
}

.cryptomag-markets-page__head-row {
	background: transparent;
}

.cryptomag-markets-page__col-pair {
	width: 24%;
}

.cryptomag-markets-page__col-platform {
	width: 10%;
}

.cryptomag-markets-page__col-price {
	width: 14%;
}

.cryptomag-markets-page__col-change {
	width: 16%;
}

.cryptomag-markets-page__col-chart {
	width: 16%;
}

.cryptomag-markets-page__col-actions {
	width: 20%;
}

.cryptomag-markets-page__platform-logo {
	display: block;
	height: 1.125rem;
	width: auto;
	margin-inline: auto;
}

.cryptomag-markets-page__platform-link {
	line-height: 0;
}

.cryptomag-markets-page__pair-label {
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	color: #111214;
}

.cryptomag-markets-page__col-price {
	color: #111214;
}

.cryptomag-markets-page__sparkline-wrap {
	min-width: 0;
}

.cryptomag-markets-page__sparkline {
	display: block;
	width: 120px;
	max-width: 100%;
	height: auto;
}

.cryptomag-markets-page__actions {
	white-space: nowrap;
}

.cryptomag-markets-page__trade,
.cryptomag-markets-page__view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 4.5rem;
	padding: 0.45rem 1rem;
	border-radius: 0.35rem;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cryptomag-markets-page__trade {
	background: #138085;
	border: 1px solid #138085;
	color: #ffffff;
}

.cryptomag-markets-page__trade:hover {
	background: #0f666a;
	border-color: #0f666a;
	color: #ffffff;
}

.cryptomag-markets-page__view {
	background: #ffffff;
	border: 1px solid rgba(17, 18, 20, 0.14);
	color: #111214;
}

.cryptomag-markets-page__view:hover {
	border-color: #138085;
	color: #138085;
}

.cryptomag-markets-page__table-card {
	--cryptomag-markets-sticky-bg: #ffffff;
	--cryptomag-markets-sticky-hover-bg: #f7fbfa;
}

@media (max-width: 1023px) {
	.cryptomag-markets-page__table-card {
		overflow: visible;
	}

	.cryptomag-markets-page__scroll {
		border-radius: 1.5rem;
	}

	.cryptomag-markets-page__table {
		border-collapse: separate;
		border-spacing: 0;
	}

	.cryptomag-markets-page__col-pair {
		position: sticky;
		left: 0;
		z-index: 2;
		min-width: 10.5rem;
		background-color: var(--cryptomag-markets-sticky-bg);
		box-shadow: 6px 0 10px -6px rgba(17, 18, 20, 0.12);
	}

	.cryptomag-markets-page__head-row .cryptomag-markets-page__col-pair {
		z-index: 3;
	}

	.cryptomag-markets-page__row:hover .cryptomag-markets-page__col-pair {
		background-color: var(--cryptomag-markets-sticky-hover-bg);
	}
}

@media (min-width: 1024px) {
	.cryptomag-markets-page__scroll {
		overflow-x: visible;
	}

	.cryptomag-markets-page__table {
		min-width: 0;
	}
}

@media (prefers-color-scheme: dark) {
	.cryptomag-markets-page__header p,
	.cryptomag-markets-page__credit,
	.cryptomag-markets-page__no-results {
		color: rgba(244, 245, 247, 0.72);
	}

	.cryptomag-markets-page__search-input {
		background: #1c1f24;
		color: #f4f5f7;
		border-color: rgba(255, 255, 255, 0.2);
	}

	.cryptomag-markets-page__search-suggestions {
		background: #161a20;
		border-color: rgba(255, 255, 255, 0.12);
		box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
	}

	.cryptomag-markets-page__search-suggestion-name,
	.cryptomag-markets-page__pair-label,
	.cryptomag-markets-page__col-price {
		color: #f4f5f7;
	}

	.cryptomag-markets-page__search-suggestion-symbol {
		color: rgba(244, 245, 247, 0.55);
	}

	.cryptomag-markets-page__search-suggestion.is-active,
	.cryptomag-markets-page__search-suggestion:hover {
		background: rgba(19, 128, 133, 0.16);
	}

	.cryptomag-markets-page__table-card,
	.cryptomag-markets-page__empty {
		background: #161a20 !important;
		border-color: rgba(255, 255, 255, 0.12) !important;
		--cryptomag-markets-sticky-bg: #161a20;
		--cryptomag-markets-sticky-hover-bg: #1a2028;
	}

	.cryptomag-markets-page__head-row {
		color: rgba(244, 245, 247, 0.55) !important;
	}

	.cryptomag-markets-page__row {
		color: #f4f5f7;
		border-color: rgba(255, 255, 255, 0.08) !important;
	}

	.cryptomag-markets-page__row td {
		color: #f4f5f7;
	}

	.cryptomag-markets-page__view {
		background: #161a20;
		color: #f4f5f7;
		border-color: rgba(255, 255, 255, 0.2);
	}

	.cryptomag-markets-page__error {
		background: #2a1518;
		border-color: #7f1d1d;
	}

	.cryptomag-markets-page__error p {
		color: #fecaca;
	}

	@media (max-width: 1023px) {
		.cryptomag-markets-page__col-pair {
			box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.45);
		}
	}

	.cryptomag-markets-page__currency-trigger {
		background: #161a20;
		border-color: rgba(255, 255, 255, 0.16);
		color: #f4f5f7;
	}

	.cryptomag-markets-page__currency-panel {
		background: #161a20;
		border-color: rgba(255, 255, 255, 0.12);
		box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
	}

	.cryptomag-markets-page__currency-search {
		background: #101318;
		border-color: rgba(255, 255, 255, 0.12);
		color: #f4f5f7;
	}

	.cryptomag-markets-page__currency-search::placeholder {
		color: rgba(244, 245, 247, 0.45);
	}

	.cryptomag-markets-page__currency-option {
		color: #f4f5f7;
	}

	.cryptomag-markets-page__currency-option:hover,
	.cryptomag-markets-page__currency-option.is-selected {
		background: rgba(19, 128, 133, 0.18);
	}

	.cryptomag-markets-page__currency-option-name {
		color: rgba(244, 245, 247, 0.55);
	}
}

.cryptomag-markets-page__header-actions {
	align-items: stretch;
}

@media (min-width: 640px) {
	.cryptomag-markets-page__header-actions {
		align-items: center;
		flex-wrap: nowrap;
		gap: 0.65rem;
		width: auto;
		max-width: none;
	}

	.cryptomag-markets-page__header-actions .cryptomag-markets-page__search {
		flex: 0 0 auto;
		width: 17.5rem;
		min-width: 17.5rem;
		max-width: none;
	}
}

@media (min-width: 1024px) {
	.cryptomag-markets-page__header-actions .cryptomag-markets-page__search {
		width: 19rem;
		min-width: 19rem;
	}
}

.cryptomag-markets-page__search-input {
	min-width: 0;
}

.cryptomag-markets-page__search-input::-webkit-search-decoration,
.cryptomag-markets-page__search-input::-webkit-search-cancel-button,
.cryptomag-markets-page__search-input::-webkit-search-results-button,
.cryptomag-markets-page__search-input::-webkit-search-results-decoration {
	display: none;
}

.cryptomag-markets-page__currency {
	flex: 0 0 auto;
	width: auto;
	min-width: 0;
}

.cryptomag-markets-page__currency-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	width: auto;
	min-width: 0;
	padding: 0.72rem 0.7rem;
	border: 1px solid rgba(17, 18, 20, 0.1);
	border-radius: 9999px;
	background: #ffffff;
	color: #111214;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cryptomag-markets-page__currency-code {
	white-space: nowrap;
}

.cryptomag-markets-page__currency-trigger:hover,
.cryptomag-markets-page__currency-trigger[aria-expanded="true"] {
	border-color: #138085;
	box-shadow: 0 0 0 2px rgba(19, 128, 133, 0.15);
}

.cryptomag-markets-page__currency-chevron {
	flex-shrink: 0;
	opacity: 0.55;
}

.cryptomag-markets-page__currency-panel {
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	z-index: 30;
	width: min(15rem, calc(100vw - 3rem));
	padding: 0.5rem;
	border: 1px solid rgba(17, 18, 20, 0.1);
	border-radius: 1rem;
	background: #ffffff;
	box-shadow: 0 18px 48px rgba(17, 18, 20, 0.12);
}

.cryptomag-markets-page__currency-search-wrap {
	position: relative;
	margin-bottom: 0.35rem;
}

.cryptomag-markets-page__currency-search-icon {
	position: absolute;
	top: 50%;
	left: 0.85rem;
	transform: translateY(-50%);
	color: rgba(17, 18, 20, 0.4);
	pointer-events: none;
}

.cryptomag-markets-page__currency-search {
	width: 100%;
	padding: 0.65rem 0.85rem 0.65rem 2.35rem;
	border: 1px solid rgba(17, 18, 20, 0.08);
	border-radius: 0.75rem;
	background: #f8f9fa;
	color: #111214;
	font: inherit;
	font-size: 0.875rem;
	outline: none;
}

.cryptomag-markets-page__currency-search:focus {
	border-color: #138085;
	box-shadow: 0 0 0 2px rgba(19, 128, 133, 0.12);
}

.cryptomag-markets-page__currency-list {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 16rem;
	overflow-y: auto;
}

.cryptomag-markets-page__currency-list li[hidden] {
	display: none;
}

.cryptomag-markets-page__currency-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 0;
	border-radius: 0.75rem;
	background: transparent;
	color: #111214;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.cryptomag-markets-page__currency-option:hover,
.cryptomag-markets-page__currency-option.is-selected {
	background: rgba(19, 128, 133, 0.1);
}

.cryptomag-markets-page__currency-option-main {
	display: grid;
	min-width: 0;
}

.cryptomag-markets-page__currency-option-code {
	font-size: 0.875rem;
	font-weight: 800;
}

.cryptomag-markets-page__currency-option-name {
	font-size: 0.75rem;
	font-weight: 600;
	color: rgba(17, 18, 20, 0.5);
}

.cryptomag-markets-page__currency-check {
	flex-shrink: 0;
	opacity: 0;
	color: #138085;
}

.cryptomag-markets-page__currency-option.is-selected .cryptomag-markets-page__currency-check {
	opacity: 1;
}
