/* =============================================================================
   Pet Hub — PLAY game-mode tray (mobile). Rich per-mode cards: ornate emblem +
   title + subtitle + chevron, each carrying its mode colour (--pm). Replaces the
   old emoji pill list. Container id override beats the minified pet-hub.css rule;
   the hidden/visible transition is left to pet-hub.css (we never touch opacity).
   Icons: assets/images/pet-nav/play/
   ========================================================================== */

/* Wider, taller popover so the cards can breathe (old rule caps it at 160px). */
#inv-hub-game-tray.inv-hub-game-tray {
	min-width: 0;
	width: min(440px, calc(100vw - 20px));
	gap: 8px;
	padding: 12px 12px 14px;
	background: linear-gradient(180deg, rgba(8,12,24,.97), rgba(6,10,20,.99));
	border: 1px solid rgba(245,158,11,.16);
	border-radius: 18px;
	box-shadow: 0 -8px 40px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.03) inset;
}

/* Desktop door-tray reuses the same rich cards — widen it past the old pill width. */
#inv-hub-door-tray.inv-pet-hub__door-tray {
	min-width: 0;
	width: 288px;
	gap: 6px;
	padding: 10px;
	background: linear-gradient(180deg, rgba(8,12,24,.98), rgba(6,10,20,.99));
	border: 1px solid rgba(245,158,11,.16);
	border-radius: 16px;
	box-shadow: 0 16px 44px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.03) inset;
	/* Open DOWN-LEFT of the PLAY door: right edge at the door's centre (which is ~the
	   pet's left edge), so the panel clears the centred pet; lifted to sit just under
	   the PLAY label instead of dropping from the bottom of the 240px-tall door button
	   (that drop was what pushed it onto the level HUD below). */
	top: 50%; bottom: auto; left: auto; right: 50%; margin: 0;
	transform: translateX(-14px);
}
/* own pop-in that preserves the left-anchored transform (the base keyframe hard-codes
   translate(-50%), which would yank the panel back under the door centre). */
.inv-pet-hub__door-glow.is-open #inv-hub-door-tray.inv-pet-hub__door-tray {
	animation: inv-play-tray-pop .18s ease-out both;
}
@keyframes inv-play-tray-pop {
	0%   { opacity: 0; transform: translateX(-14px) translateY(-6px); }
	100% { opacity: 1; transform: translateX(-14px) translateY(0); }
}
/* Desktop cards are a compact overlay (must not blanket the pet or the HUD below),
   so they run tighter than the roomy mobile sheet — scoped to the door-tray only. */
#inv-hub-door-tray .inv-play-card {
	gap: 10px; padding: 5px 12px 5px 8px; border-radius: 11px;
}
#inv-hub-door-tray .inv-play-card__icon {
	width: 44px; height: 44px; margin: 0 0 0 -12px;
}
#inv-hub-door-tray .inv-play-card__glow { width: 70px; height: 70px; left: -14px; }
#inv-hub-door-tray .inv-play-card__title { font-size: .88rem; letter-spacing: .03em; }
#inv-hub-door-tray .inv-play-card__sub   { font-size: .64rem; }
#inv-hub-door-tray .inv-play-card__chev  { font-size: 1.3rem; }

/* ── "PLAY" header with flanking rules ─────────────────────────────────────── */
.inv-play-tray__head {
	display: flex; align-items: center; gap: 10px;
	margin: 0 2px 4px; padding: 0 2px;
	color: #f5d58a; font-family: Rajdhani, sans-serif; font-weight: 800;
	font-size: .82rem; letter-spacing: .32em; text-transform: uppercase;
}
.inv-play-tray__head span { padding-left: .32em; text-shadow: 0 1px 10px rgba(245,158,11,.4); }
.inv-play-tray__head::before,
.inv-play-tray__head::after {
	content: ""; height: 1px; flex: 1;
	background: linear-gradient(90deg, transparent, rgba(245,158,11,.4), transparent);
}
.inv-play-tray__head::before { background: linear-gradient(90deg, transparent, rgba(245,158,11,.4)); }
.inv-play-tray__head::after  { background: linear-gradient(90deg, rgba(245,158,11,.4), transparent); }

/* ── Mode card ─────────────────────────────────────────────────────────────── */
.inv-play-card {
	--pm: #f59e0b;                       /* mode colour, overridden per modifier */
	position: relative; overflow: visible;   /* let the emblem pop past the edge */
	display: flex; align-items: center; gap: 11px; text-align: left;
	padding: 6px 14px 6px 10px; border-radius: 13px; text-decoration: none;
	background:
		linear-gradient(100deg,
			rgba(9,13,26,.94) 0%,
			rgba(13,17,32,.86) 44%,
			color-mix(in srgb, var(--pm) 20%, rgba(9,13,26,.6)) 100%);
	border: 1.5px solid color-mix(in srgb, var(--pm) 52%, transparent);
	box-shadow:
		0 0 0 1px rgba(0,0,0,.35) inset,
		0 6px 16px rgba(0,0,0,.42),
		0 0 20px -8px var(--pm);
	-webkit-tap-highlight-color: transparent;
	transition: transform .12s ease, border-color .2s ease, box-shadow .2s ease;
}
.inv-play-card:hover {
	border-color: color-mix(in srgb, var(--pm) 85%, transparent);
	box-shadow:
		0 0 0 1px rgba(0,0,0,.35) inset,
		0 8px 22px rgba(0,0,0,.5),
		0 0 26px -6px var(--pm);
}
.inv-play-card:active { transform: scale(.98); }

.inv-play-card--dungeon    { --pm: #a855f7; }
.inv-play-card--arena      { --pm: #f3c45a; }
.inv-play-card--expedition { --pm: #5fa6fb; }
.inv-play-card--boss       { --pm: #f1584f; }

/* soft colour pool behind the emblem */
.inv-play-card__glow {
	position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
	width: 96px; height: 96px; border-radius: 50%; pointer-events: none;
	background: radial-gradient(circle, color-mix(in srgb, var(--pm) 40%, transparent) 0%, transparent 64%);
}

/* emblem pops out: slightly larger than the row and overhanging the left edge */
.inv-play-card__icon {
	position: relative; flex: 0 0 auto; width: 62px; height: 62px;
	margin: -7px 2px -7px -12px;
	display: flex; align-items: center; justify-content: center;
}
.inv-play-card__icon img {
	width: 100%; height: 100%; object-fit: contain;
	filter: drop-shadow(0 3px 5px rgba(0,0,0,.65))
	        drop-shadow(0 0 9px color-mix(in srgb, var(--pm) 42%, transparent));
}

.inv-play-card__text { position: relative; flex: 1; min-width: 0;
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.inv-play-card__title {
	font-family: Rajdhani, sans-serif; font-weight: 800; line-height: 1.05;
	font-size: 1.02rem; letter-spacing: .04em; text-transform: uppercase;
	color: var(--pm);
	text-shadow: 0 1px 7px color-mix(in srgb, var(--pm) 35%, transparent), 0 1px 2px rgba(0,0,0,.7);
}
.inv-play-card__sub {
	font-family: Rajdhani, sans-serif; font-weight: 600; line-height: 1;
	font-size: .72rem; letter-spacing: .03em; color: #aeb6cc;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.inv-play-card__chev {
	position: relative; flex: 0 0 auto; padding-right: 2px;
	font-family: Rajdhani, sans-serif; font-weight: 700; font-size: 1.6rem; line-height: 1;
	color: color-mix(in srgb, var(--pm) 75%, #e5e7eb); opacity: .9;
	transition: transform .15s ease;
}
.inv-play-card:hover .inv-play-card__chev { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
	.inv-play-card, .inv-play-card__chev { transition: none; }
}
