/**
 * Mobile deck picker — custom dropdown that replaces the deck tabs/tiles
 * under 720px (account «Онлайн тестета» + games hub).
 * Markup: Shturko_Account::render_deck_picker(). Behaviour: shturko-deck-picker.js.
 */

.shturko-deck-picker {
	display: none;
	position: relative;
	z-index: 30;
	width: 100%;
	max-width: 440px;
	margin: 0 0 1.1rem;
	--dp-navy: #123b64;
	--dp-shadow: 0 2px 8px rgba(31, 51, 67, 0.06);
	--dp-shadow-lg: 0 10px 24px rgba(31, 51, 67, 0.12);
}

@media (max-width: 720px) {
	.shturko-deck-picker {
		display: block;
	}
}

/* Account online-decks: always the dropdown, not only on phones. */
.shturko-acc-decks .shturko-deck-picker {
	display: block;
	margin: 0;
}

.shturko-deck-picker__trigger,
.shturko-deck-picker__trigger:hover,
.shturko-deck-picker__trigger:focus,
.shturko-deck-picker__trigger:active {
	display: flex !important;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 0.55rem 0.9rem 0.55rem 0.55rem !important;
	border: 2px solid transparent !important;
	border-radius: 16px !important;
	background: #fff !important;
	background-image: none !important;
	color: var(--dp-navy) !important;
	font-size:inherit;font-weight:inherit;line-height:inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: var(--dp-shadow) !important;
	transform: none;
	transition: box-shadow 0.18s ease, border-color 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.shturko-deck-picker__trigger:hover {
	box-shadow: 0 10px 22px rgba(31, 51, 67, 0.16) !important;
}

.shturko-deck-picker__trigger:focus-visible,
.shturko-deck-picker.is-open .shturko-deck-picker__trigger {
	border-color: var(--dp-color, var(--dp-navy)) !important;
	outline: none;
}

.shturko-deck-picker__ico {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: color-mix(in srgb, var(--dp-color, var(--dp-navy)) 14%, #fff);
	color: var(--dp-color, var(--dp-navy));
}

.shturko-deck-picker__ico svg {
	display: block;
	width: 28px;
	height: 28px;
	fill: currentColor;
}

.shturko-deck-picker__text {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.shturko-deck-picker__eyebrow {
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #5b7087;
	line-height: 1.2;
}

.shturko-deck-picker__label {
	font-size: 1.02rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--dp-navy);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shturko-deck-picker__chev {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	background: rgba(18, 59, 100, 0.07);
	color: var(--dp-navy);
	transition: transform 0.2s ease, background-color 0.18s ease;
}

.shturko-deck-picker__chev svg {
	width: 18px;
	height: 18px;
	display: block;
}

.shturko-deck-picker.is-open .shturko-deck-picker__chev {
	transform: rotate(180deg);
}

.shturko-deck-picker__list {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	margin: 0 !important;
	padding: 0.4rem !important;
	list-style: none !important;
	max-height: min(62vh, 440px);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 20px;
	background: #fff;
	border: 1px solid rgba(18, 59, 100, 0.08);
	box-shadow: var(--dp-shadow-lg);
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	visibility: hidden;
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}

.shturko-deck-picker.is-open .shturko-deck-picker__list {
	opacity: 1;
	transform: none;
	pointer-events: auto;
	visibility: visible;
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s;
}

.shturko-deck-picker__list > li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.shturko-deck-picker__list > li::before,
.shturko-deck-picker__list > li::marker {
	content: none !important;
}

.shturko-deck-picker__opt,
.shturko-deck-picker__opt:visited,
.shturko-deck-picker__opt:hover,
.shturko-deck-picker__opt:focus,
.shturko-deck-picker__opt:active {
	display: flex !important;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0.4rem 0.7rem 0.4rem 0.45rem !important;
	border: 0 !important;
	border-radius: 14px !important;
	background: transparent !important;
	background-image: none !important;
	color: var(--dp-navy) !important;
	font-size:inherit;font-weight:inherit;line-height:inherit;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.2;
	text-align: left;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none !important;
	transform: none;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

.shturko-deck-picker__opt:hover,
.shturko-deck-picker__opt:focus-visible {
	background: rgba(18, 59, 100, 0.06) !important;
	outline: none;
}

.shturko-deck-picker__opt.is-active {
	background: #fff3e2 !important;
	font-weight: 400;
}

.shturko-deck-picker__opt .shturko-deck-picker__ico {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--dp-color, var(--dp-navy)) 14%, #fff);
	color: var(--dp-color, var(--dp-navy));
}

.shturko-deck-picker__opt .shturko-deck-picker__ico svg {
	width: 22px;
	height: 22px;
}

.shturko-deck-picker__opt-label {
	flex: 1 1 auto;
	min-width: 0;
}

.shturko-deck-picker__check {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: #f04d23;
	opacity: 0;
}

.shturko-deck-picker__opt.is-active .shturko-deck-picker__check {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.shturko-deck-picker__list,
	.shturko-deck-picker__chev {
		transition: none;
	}
}
