/* Phoenix Court Booking – [phx_courts] */
.phx-courts {
	--phx-lime: #9fce00;
	--phx-ink: #0b1a00;
	--phx-navy: #07112e;
	--phx-line: rgba(255, 255, 255, .14);
	--phx-muted: rgba(255, 255, 255, .72);
	color: #fff;
	font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.phx-courts *, .phx-courts *::before, .phx-courts *::after { box-sizing: border-box; }
.phx-courts button { font: inherit; cursor: pointer; }
.phx-courts :focus-visible { outline: 3px solid var(--phx-lime); outline-offset: 3px; }

.phx-c-view {
	position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 1440 / 500;
	border: 1px solid var(--phx-line); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); background: var(--phx-navy);
}
.phx-c-stage { position: absolute; width: 100%; height: 216%; left: 0; top: -86%; transition: left .5s ease, top .5s ease, width .5s ease; }
.phx-c-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; max-width: none; }
.phx-c-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.phx-c-shape {
	fill: transparent; stroke: transparent; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round;
	cursor: pointer; transition: fill .25s ease, stroke .25s ease;
}
.phx-courts.has-active .phx-c-shape { fill: rgba(7, 17, 46, .38); }
.phx-courts .phx-c-shape.is-active { fill: rgba(159, 206, 0, .24); stroke: var(--phx-lime); filter: drop-shadow(0 0 6px rgba(159, 206, 0, .85)); }

.phx-c-badge {
	position: absolute; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%;
	display: grid; place-items: center; padding: 0;
	background: rgba(7, 17, 46, .88); color: #fff; border: 3px solid var(--phx-lime);
	font-family: Montserrat, Roboto, sans-serif; font-weight: 800; font-size: 20px; line-height: 1;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .45); transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.phx-c-badge.is-active { background: var(--phx-lime); color: var(--phx-ink); transform: translate(-50%, -50%) scale(1.12); }

.phx-c-cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.phx-c-card {
	margin: 0; padding: 18px 18px 16px; display: grid; gap: 10px; align-content: start;
	background: rgba(12, 24, 60, .6); border: 1px solid var(--phx-line); border-radius: 18px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.phx-c-card.is-active { border-color: var(--phx-lime); box-shadow: 0 0 0 1px var(--phx-lime), 0 14px 40px rgba(159, 206, 0, .15); }
.phx-c-pick { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: #fff; text-align: left; }
.phx-c-num {
	width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
	border: 2px solid var(--phx-lime); font-family: Montserrat, Roboto, sans-serif; font-weight: 800; font-size: 14px;
}
.phx-c-card.is-active .phx-c-num { background: var(--phx-lime); color: var(--phx-ink); }
.phx-c-name { font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 18px; }

.phx-c-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--phx-muted); min-height: 21px; }
.phx-c-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .3); flex: none; }
.phx-c-status[data-state="free"] { color: #d9f28a; }
.phx-c-status[data-state="free"]::before { background: var(--phx-lime); box-shadow: 0 0 0 3px rgba(159, 206, 0, .25); }
.phx-c-status[data-state="busy"] { color: #ffc9cb; }
.phx-c-status[data-state="busy"]::before { background: #e5484d; }
.phx-c-status[data-state="loading"]::before { opacity: 0; }

.phx-c-book {
	justify-self: start; padding: 10px 20px; border-radius: 999px; text-decoration: none;
	background: var(--phx-lime); color: var(--phx-ink); font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 14px;
	transition: background-color .15s ease;
}
.phx-c-book:hover, .phx-c-book:focus-visible { background: #fff; color: var(--phx-ink); }

@media (max-width: 640px) {
	.phx-c-view { border-radius: 16px; }
	.phx-c-badge { width: 40px; height: 40px; font-size: 18px; }
	.phx-c-cards { gap: 8px; margin-top: 12px; }
	.phx-c-card { padding: 12px 10px; gap: 8px; border-radius: 14px; }
	.phx-c-pick { gap: 6px; }
	.phx-c-num { width: 24px; height: 24px; font-size: 12px; }
	.phx-c-name { font-size: 15px; }
	.phx-c-status { font-size: 12px; gap: 6px; line-height: 1.3; }
	.phx-c-book { justify-self: stretch; text-align: center; padding: 9px 6px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.phx-courts *, .phx-c-stage { transition: none !important; }
}

/* ---------- 0.4.0: centred court cards + theme-proof hover ---------- */
.phx-courts .phx-c-card { justify-items: center; text-align: center; }
.phx-courts .phx-c-pick { justify-content: center; }
.phx-courts .phx-c-status { justify-content: center; }
.phx-courts .phx-c-book { justify-self: center; }
.phx-courts .phx-c-pick:hover, .phx-courts .phx-c-pick:focus { background: none !important; color: #FFFFFF !important; }
.phx-courts .phx-c-badge:hover:not(.is-active) { background: rgba(7, 17, 46, .88) !important; color: #FFFFFF !important; }
.phx-courts .phx-c-badge.is-active, .phx-courts .phx-c-badge.is-active:hover { background: #9FCE00 !important; color: #0B0B0B !important; }
@media (max-width: 640px) { .phx-courts .phx-c-book { justify-self: stretch; } }

/* ---------- 0.5.0: off-season (bookings by phone) ---------- */
.phx-courts .phx-c-status[data-state="phone"] { color: rgba(255, 255, 255, .85); }
.phx-courts .phx-c-status[data-state="phone"]::before { background: #9FCE00; opacity: .8; }
.phx-courts a.phx-c-call, .phx-courts a.phx-c-call:visited { background: transparent !important; color: #FFFFFF !important; border: 2px solid rgba(255, 255, 255, .65); padding: 8px 18px; }
.phx-courts a.phx-c-call:hover, .phx-courts a.phx-c-call:focus-visible { background: #9FCE00 !important; color: #0B0B0B !important; border-color: #9FCE00; }
@media (max-width: 640px) { .phx-courts a.phx-c-call { padding: 7px 6px; } }
