/* Minecraft order form: the Game Type picker. Version B of the split test minecraft_order_picker (and the
   previews); loaded by sspanel-mc-picker.tpl, which renders for nobody else. Nothing here is new design: the cards
   copy the plan and billing cards on this form (v2 values: #2b2d2f ground, gold #EAA824 when
   chosen), and the version list copies the location dropdown (.order-location-dropdown) under
   its own classes, because the location scripts walk every .order-location-dropdown on the page.
   It is built from <div> and <li>, not <button> and <a>: the page's ad tags ping Meta and X on
   every button or link click, and the picker must stay as quiet to them as the plain list. */

/* the plain Game Type list stays in the form (it is what posts); the picker drives it */
.mcpick-hidden { display: none !important; }
/* if the v2 console rolls back to the legacy form, the picker's section goes with it: show the list again */
body.ssv2rollback .mcpick-hidden { display: block !important; }
body.ssv2rollback #mcpickgroup { display: none !important; }

#mcpick { min-width: 0; }
#mcpick .mcpick-step { margin: 0 0 16px; }
#mcpick .mcpick-step:last-child { margin-bottom: 0; }
#mcpick .mcpick-head { margin: 0 0 8px; }
#mcpick .mcpick-row { display: grid; gap: 9px; }
#mcpick .mcpick-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#mcpick .mcpick-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#mcpick .mcpick-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* cards: the plan / billing card, as v2 paints it */
#mcpick .mcpick-card {
	-webkit-appearance: none; appearance: none; margin: 0; width: 100%; min-width: 0; min-height: 64px; box-sizing: border-box;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	padding: 9px 10px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 4px; background: #2b2d2f;
	color: #e2e9ef; font: inherit; line-height: 1.2; text-align: center; cursor: pointer;
	transition: border-color .15s, background .15s, box-shadow .15s;
}
#mcpick .mcpick-card:hover { border-color: rgba(234, 168, 36, .55); }
#mcpick .mcpick-card:focus { outline: none; }
#mcpick .mcpick-card:focus-visible { border-color: rgba(234, 168, 36, .85); }
#mcpick .mcpick-card.mcpick-on {
	border-color: #EAA824;
	background: linear-gradient(180deg, rgba(234, 168, 36, .10), rgba(234, 168, 36, .02)), #2b2d2f;
	box-shadow: inset 0 0 0 1px rgba(234, 168, 36, .35);
}
/* a title wraps rather than cut (German and French run longer); English fits on one line at every width */
#mcpick .mcpick-t { position: relative; padding: 0 13px; color: #fff; font-size: 14px; font-weight: 700; white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
#mcpick .mcpick-s { color: #a7b5c0; font-size: 11.5px; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
/* when a card's words do wrap, even lines: never one word alone on the last line (Ryan's wrap rule) */
#mcpick .mcpick-t, #mcpick .mcpick-s { text-wrap: balance; }
/* the check sits in the title's left gutter like the plan cards' .c, so the title never shifts */
#mcpick .mcpick-c { position: absolute; top: 50%; left: 0; width: 10px; transform: translateY(-50%); color: #EAA824; font-size: 11px; line-height: 1; visibility: hidden; }
#mcpick .mcpick-on .mcpick-c { visibility: visible; }
#mcpick .mcpick-small .mcpick-card { min-height: 44px; padding-top: 7px; padding-bottom: 7px; }
#mcpick .mcpick-small .mcpick-t { font-size: 13.5px; }

/* version + build side by side */
#mcpick .mcpick-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
#mcpick .mcpick-pair .mcpick-field { min-width: 0; }
#mcpick .mcpick-pair .mcpick-field:only-child { grid-column: 1 / -1; }

/* the version list: .order-location-dropdown, line for line */
#mcpick .mcpick-dd { position: relative; width: 100%; }
#mcpick .mcpick-dd-toggle {
	width: 100%; text-align: left; background: #2a2a2a; border: 1px solid #444; color: #fff; user-select: none;
	padding: 10px 12px; border-radius: 4px; font-size: 14px; display: flex; justify-content: space-between; align-items: center;
	min-height: 40px; line-height: 1.42857143; box-sizing: border-box; cursor: pointer; font-family: inherit;
}
#mcpick .mcpick-dd-toggle:hover { background: #333; border-color: #555; }
#mcpick .mcpick-dd-toggle:focus, #mcpick .mcpick-dd.open .mcpick-dd-toggle { background: #333; border-color: #d5a84a; outline: none; box-shadow: none; }
/* Bootstrap's caret, drawn here so the picker needs nothing from the page */
#mcpick .mcpick-dd-toggle .caret { display: inline-block; width: 0; height: 0; margin: 0 2px 0 8px; flex-shrink: 0; vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; border-left: 4px solid transparent; }
#mcpick .mcpick-dd-text { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
/* a long pack name wraps inside the box, never an ellipsis (a label is never cut) */
#mcpick .mcpick-dd-text .mcpick-name { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
#mcpick .mcpick-dd-menu {
	display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 1000; list-style: none; box-sizing: border-box;
	width: 100%; min-width: 0; background: #2a2a2a; border: 1px solid #444; border-radius: 8px; box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
	padding: 0; margin: 2px 0 0; max-height: 350px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 #1a1a1a;
}
#mcpick .mcpick-dd.open .mcpick-dd-menu { display: block; }
#mcpick .mcpick-dd-menu::-webkit-scrollbar { width: 6px; }
#mcpick .mcpick-dd-menu::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 3px; }
#mcpick .mcpick-dd-menu::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
#mcpick .mcpick-dd-menu::-webkit-scrollbar-thumb:hover { background: #777; }
#mcpick .mcpick-dd-menu .mcpick-opt {
	color: #fff; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
	font-size: 14px; line-height: 1.42857143; border-bottom: 1px solid #3a3a3a; white-space: normal; cursor: pointer;
}
#mcpick .mcpick-dd-menu .mcpick-opt:last-child { border-bottom: none; }
#mcpick .mcpick-dd-menu .mcpick-opt:hover, #mcpick .mcpick-dd-menu .mcpick-opt:focus { background: #3a3a3a; outline: none; }
#mcpick .mcpick-dd-menu .mcpick-opt:hover .mcpick-name, #mcpick .mcpick-dd-menu .mcpick-opt:focus .mcpick-name { color: #00ff88; }
#mcpick .mcpick-dd-menu .mcpick-opt.selected { background: #333; }
#mcpick .mcpick-dd-menu .mcpick-opt.selected .mcpick-name { color: #00ff88; }
#mcpick .mcpick-dd-menu .mcpick-name { min-width: 0; overflow-wrap: anywhere; }
/* a section heading inside the list (the select2 group head on this site: small caps, quiet) */
#mcpick .mcpick-dd-menu .mcpick-dd-head {
	padding: 9px 12px 3px; color: #8b8b8f; font-size: 10px; font-weight: 700; line-height: 14px; letter-spacing: 1px; text-transform: uppercase;
	border-top: 1px solid #333335;
}
#mcpick .mcpick-dd-menu .mcpick-dd-head:first-child { border-top: 0; }
/* NEWEST / BETA: the location list's INSTANT label */
#mcpick .mcpick-tag { color: rgb(219, 155, 21); font-size: 9px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; margin-left: auto; padding-left: 10px; }
#mcpick .mcpick-tag-beta { color: #8fa1af; }
#mcpick .mcpick-dd-text .mcpick-tag { margin-left: 0; padding-left: 0; }

/* the plan hint in the PLAN heading (the billing heading's "25% off" slot) */
.mcpick-rec { color: #8fa1af; font-size: 11px; }
.mcpick-rec .mcpick-fit { color: #A4D007; font-weight: 700; }
.mcpick-rec .mcpick-use {
	margin: 0 0 0 4px; color: #EAA824; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap;
}
.mcpick-rec .mcpick-use:hover, .mcpick-rec .mcpick-use:focus-visible { color: #f3c25a; outline: none; }

/* 1280-1599: the form column is ~730 px, so four cards get ~140 px each; keep "Forge, NeoForge, Fabric" on one line */
@media (min-width: 768px) and (max-width: 1599px) {
	#mcpick .mcpick-4 .mcpick-card { padding-left: 4px; padding-right: 4px; }
	#mcpick .mcpick-4 .mcpick-s { font-size: 10.5px; letter-spacing: -.1px; }
}
@media (max-width: 767px) {
	#mcpick .mcpick-row { gap: 7px; }
	#mcpick .mcpick-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	#mcpick .mcpick-pair { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	#mcpick .mcpick-card { min-height: 60px; padding: 8px 6px; }
	#mcpick .mcpick-t { font-size: 13.5px; }
	#mcpick .mcpick-s { font-size: 11px; }
	#mcpick .mcpick-dd-menu { max-height: 300px; }
	/* three loaders across a phone: a narrower check gutter so "NeoForge" fits */
	#mcpick .mcpick-small .mcpick-card { padding-left: 2px; padding-right: 2px; }
	#mcpick .mcpick-small .mcpick-t { padding: 0 11px; font-size: 13px; }
}
@media (max-width: 400px) {
	#mcpick .mcpick-t { padding: 0 11px; font-size: 13px; }
}
