/* Phoenix Court Booking – public widget. Matches the site: navy + lime, Montserrat/Roboto. */
.phx-booking {
	--phx-lime: #9fce00;
	--phx-lime-ink: #0b1a00;
	--phx-red: #e5484d;
	--phx-amber: #f5a524;
	--phx-text: #fff;
	--phx-muted: rgba(255, 255, 255, .72);
	--phx-line: rgba(255, 255, 255, .14);
	--phx-panel: rgba(12, 24, 60, .6);
	--phx-radius: 12px;
	color: var(--phx-text);
	font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.5;
	width: 100%;
}
.phx-booking *, .phx-booking *::before, .phx-booking *::after { box-sizing: border-box; }
.phx-booking button { font: inherit; color: inherit; cursor: pointer; }
.phx-booking button:disabled { cursor: not-allowed; }
.phx-booking :focus-visible { outline: 3px solid var(--phx-lime); outline-offset: 2px; }
.phx-booking p { margin: 0; }

/* ---------- controls ---------- */
.phx-b-head { display: grid; gap: 18px; margin-bottom: 22px; }
.phx-b-row { display: grid; gap: 10px; }
.phx-b-label { font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 15px; }

.phx-b-days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.phx-b-day {
	flex: 0 0 auto; scroll-snap-align: start;
	display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 10px 12px;
	background: var(--phx-panel); border: 1px solid var(--phx-line); border-radius: var(--phx-radius);
	transition: border-color .15s, background-color .15s;
}
.phx-b-day:hover { border-color: rgba(159, 206, 0, .6); }
.phx-b-day.is-on { background: var(--phx-lime); border-color: var(--phx-lime); color: var(--phx-lime-ink); }
.phx-b-dow { font-size: 13px; opacity: .85; }
.phx-b-dm { font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }

.phx-b-coaches { display: flex; flex-wrap: wrap; gap: 8px; }
.phx-b-chip {
	padding: 9px 16px; border-radius: 999px; background: transparent; border: 1px solid var(--phx-line);
	transition: border-color .15s, background-color .15s;
}
.phx-b-chip small { opacity: .75; margin-left: 4px; }
.phx-b-chip:hover { border-color: rgba(159, 206, 0, .6); }
.phx-b-chip.is-on { background: var(--phx-lime); border-color: var(--phx-lime); color: var(--phx-lime-ink); font-weight: 600; }

.phx-b-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--phx-muted); }
.phx-b-legend li { display: flex; align-items: center; gap: 7px; margin: 0; }
.phx-b-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ---------- grid ---------- */
.phx-b-table {
	display: grid; grid-template-columns: 62px repeat(var(--phx-cols, 3), minmax(0, 1fr)); gap: 6px;
	padding: 14px; background: var(--phx-panel); border: 1px solid var(--phx-line); border-radius: 18px;
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.phx-b-th { font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 15px; text-align: center; padding: 4px 0 8px; }
.phx-b-th--time { text-align: left; color: var(--phx-muted); font-weight: 600; font-size: 13px; }
.phx-b-time { display: flex; align-items: center; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; color: var(--phx-muted); }

.phx-booking .phx-b-cell {
	min-height: 44px; border-radius: 10px; border: 1px solid transparent; padding: 0 8px;
	display: flex; align-items: center; justify-content: center; text-align: center;
	font-size: 13px; line-height: 1.2;
}
.phx-b-cell.is-free { background: rgba(159, 206, 0, .14); border-color: rgba(159, 206, 0, .5); color: #d9f28a; transition: background-color .12s, color .12s; }
.phx-b-cell.is-free:hover { background: rgba(159, 206, 0, .32); color: #fff; }
.phx-b-cell.is-sel { background: var(--phx-lime); border-color: var(--phx-lime); color: var(--phx-lime-ink); font-weight: 700; }
.phx-b-cell.is-booked { background: rgba(229, 72, 77, .22); border-color: rgba(229, 72, 77, .45); color: #ffc9cb; }
.phx-b-cell.is-held { background: rgba(245, 165, 36, .2); border-color: rgba(245, 165, 36, .5); color: #ffe0ad; }
.phx-b-cell.is-closed { background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 7px, rgba(255,255,255,.02) 7px 14px); border-color: var(--phx-line); color: var(--phx-muted); }
.phx-b-cell.is-past, .phx-b-cell.is-none { background: rgba(255, 255, 255, .03); color: rgba(255, 255, 255, .35); }
.phx-b-cell.is-coach_busy { background: rgba(255, 255, 255, .06); border: 1px dashed rgba(255, 255, 255, .25); color: var(--phx-muted); }

.phx-b-legend .is-free { background: var(--phx-lime); }
.phx-b-legend .is-booked { background: var(--phx-red); }
.phx-b-legend .is-held { background: var(--phx-amber); }
.phx-b-legend .is-closed { background: repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 3px, rgba(255,255,255,.15) 3px 6px); }
.phx-b-legend .is-coach_busy { border: 1px dashed rgba(255,255,255,.6); }

.phx-b-hint, .phx-b-loading { color: var(--phx-muted); margin-top: 12px; }
.phx-b-notice { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--phx-radius); background: rgba(245, 165, 36, .16); border: 1px solid rgba(245, 165, 36, .45); }
.phx-b-empty { padding: 28px; text-align: center; background: var(--phx-panel); border-radius: 18px; }
.phx-b-retry { margin-top: 12px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--phx-lime); background: transparent; }

/* court chosen on the courts photo */
.phx-b-focus { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--phx-radius); background: rgba(159, 206, 0, .12); border: 1px solid rgba(159, 206, 0, .45); }
.phx-b-th.is-focus { color: var(--phx-lime); }
.phx-booking .phx-b-cell.is-focus.is-free { background: rgba(159, 206, 0, .26); box-shadow: inset 0 0 0 1px var(--phx-lime); }
.phx-booking .phx-b-cell.is-dim { opacity: .45; }

/* ---------- selection panel ---------- */
.phx-b-panel, .phx-b-done {
	margin-top: 22px; padding: 26px; background: var(--phx-panel); border: 1px solid rgba(159, 206, 0, .45); border-radius: 18px;
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.phx-b-sel { display: grid; gap: 18px; }
.phx-b-h { margin: 0 0 4px; font-family: Montserrat, Roboto, sans-serif; font-size: 20px; font-weight: 700; color: #fff; }
.phx-b-what { color: var(--phx-muted); }
.phx-b-what strong { color: #fff; }
.phx-b-link { background: none; border: 0; padding: 0; margin-left: 6px; color: var(--phx-lime); text-decoration: underline; text-underline-offset: 3px; }

.phx-b-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.phx-b-segbtn { padding: 9px 16px; border-radius: 10px; border: 1px solid var(--phx-line); background: transparent; }
.phx-b-segbtn.is-on { background: var(--phx-lime); border-color: var(--phx-lime); color: var(--phx-lime-ink); font-weight: 600; }
.phx-b-segbtn:disabled { opacity: .35; }

.phx-b-extras { display: grid; gap: 8px; }
.phx-b-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.phx-b-check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--phx-lime); flex: none; }
.phx-b-check small { color: var(--phx-muted); }
.phx-b-note, .phx-b-paynote { font-size: 14px; color: var(--phx-muted); }

.phx-b-price ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.phx-b-price li { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-variant-numeric: tabular-nums; }
.phx-b-price li small { color: var(--phx-muted); margin-left: 4px; }
.phx-b-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--phx-line); }
.phx-b-total strong { font-family: Montserrat, Roboto, sans-serif; font-size: 24px; color: var(--phx-lime); }

.phx-b-form { display: grid; gap: 16px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--phx-line); }
.phx-b-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.phx-b-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.phx-b-field--wide { grid-column: 1 / -1; }
.phx-b-field small { font-weight: 400; color: var(--phx-muted); }
.phx-b-field input {
	width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit; font-weight: 400;
	background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
}
.phx-b-field input:focus { border-color: var(--phx-lime); outline: none; box-shadow: 0 0 0 3px rgba(159, 206, 0, .3); }
.phx-b-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.phx-b-terms { font-size: 14px; }
.phx-b-error { color: #ffb4b6; font-weight: 600; }
.phx-b-error:empty { display: none; }

.phx-b-submit {
	justify-self: start; padding: 16px 32px; border: 0; border-radius: 999px;
	background: var(--phx-lime); color: var(--phx-lime-ink); font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 16px;
	transition: background-color .15s, transform .15s;
}
.phx-b-submit:hover:not(:disabled) { background: #fff; }
.phx-b-submit:disabled { opacity: .55; }

.phx-b-done { border-color: var(--phx-lime); }
.phx-b-done:focus { outline: none; }
.phx-b-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; margin: 18px 0; }
.phx-b-dl div { display: grid; gap: 2px; }
.phx-b-dl dt { font-size: 13px; color: var(--phx-muted); }
.phx-b-dl dd { margin: 0; }
.phx-b-again { margin-top: 18px; }

/* ---------- small screens ---------- */
@media (max-width: 600px) {
	.phx-b-table { grid-template-columns: 48px repeat(var(--phx-cols, 3), minmax(0, 1fr)); gap: 5px; padding: 10px; }
	.phx-booking .phx-b-cell { min-height: 42px; font-size: 0; padding: 0; }   /* colour only; label via aria */
	.phx-booking .phx-b-cell.is-sel { font-size: 12px; }
	.phx-b-coaches { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
	.phx-b-chip { flex: 0 0 auto; }
	.phx-b-time { font-size: 13px; }
	.phx-b-th { font-size: 13px; }
	.phx-b-panel, .phx-b-done { padding: 20px 16px; }
	.phx-b-fields { grid-template-columns: 1fr; }
	.phx-b-submit { justify-self: stretch; text-align: center; }
	.phx-b-dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.phx-booking * { transition: none !important; }
}

/* ---------- 0.4.0: readable form + buttons that the theme cannot recolour ---------- */
.phx-booking .phx-b-field,
.phx-booking .phx-b-field > span,
.phx-booking .phx-b-check,
.phx-booking .phx-b-check span,
.phx-booking .phx-b-terms span { color: #FFFFFF !important; }
.phx-booking .phx-b-field > span { font-family: Montserrat, Roboto, sans-serif; font-weight: 600; font-size: 15px; }
.phx-booking .phx-b-field small,
.phx-booking .phx-b-check small,
.phx-booking .phx-b-paynote { color: rgba(255, 255, 255, .78) !important; }
.phx-booking input[type="checkbox"] { accent-color: #9FCE00; width: 20px; height: 20px; }

.phx-booking button.phx-b-submit,
.phx-booking .phx-b-submit {
	background: #9FCE00 !important; color: #0B0B0B !important; border: 2px solid #9FCE00 !important; box-shadow: none !important;
}
.phx-booking button.phx-b-submit:hover:not(:disabled),
.phx-booking button.phx-b-submit:focus-visible {
	background: #FFFFFF !important; color: #0B0B0B !important; border-color: #FFFFFF !important;
}
.phx-booking button.phx-b-submit:disabled { background: #9FCE00 !important; color: #0B0B0B !important; opacity: .55; }

/* the theme turns every button white on hover – keep our own hover colours */
.phx-booking .phx-b-day:hover { background: var(--phx-panel) !important; color: #FFFFFF !important; }
.phx-booking .phx-b-day.is-on, .phx-booking .phx-b-day.is-on:hover { background: #9FCE00 !important; color: #0B0B0B !important; }
.phx-booking .phx-b-chip:hover { background: rgba(255, 255, 255, .06) !important; color: #FFFFFF !important; }
.phx-booking .phx-b-chip.is-on, .phx-booking .phx-b-chip.is-on:hover { background: #9FCE00 !important; color: #0B0B0B !important; }
.phx-booking .phx-b-segbtn:hover:not(:disabled) { background: rgba(255, 255, 255, .06) !important; color: #FFFFFF !important; }
.phx-booking .phx-b-segbtn.is-on, .phx-booking .phx-b-segbtn.is-on:hover { background: #9FCE00 !important; color: #0B0B0B !important; }
.phx-booking .phx-b-cell.is-free:hover { background: rgba(159, 206, 0, .32) !important; color: #FFFFFF !important; }
.phx-booking .phx-b-cell.is-sel, .phx-booking .phx-b-cell.is-sel:hover { background: #9FCE00 !important; color: #0B0B0B !important; }
.phx-booking .phx-b-link, .phx-booking .phx-b-link:hover { background: none !important; color: #9FCE00 !important; border: 0 !important; }
.phx-booking .phx-b-retry:hover { background: #9FCE00 !important; color: #0B0B0B !important; }

/* ---------- 0.4.1: Cancel button next to "Book for ..." ---------- */
.phx-booking .phx-b-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.phx-booking .phx-b-actions .phx-b-submit { justify-self: auto; }
.phx-booking button.phx-b-submit { padding: 16px 30px; font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.2; border-radius: 999px; }
.phx-booking button.phx-b-cancel {
	padding: 16px 30px; border-radius: 999px; font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.2;
	background: transparent !important; color: #FFFFFF !important; border: 2px solid rgba(255, 255, 255, .65) !important; box-shadow: none !important;
	transition: background-color .15s, color .15s, border-color .15s; cursor: pointer;
}
.phx-booking button.phx-b-cancel:hover,
.phx-booking button.phx-b-cancel:focus-visible { background: #9FCE00 !important; color: #0B0B0B !important; border-color: #9FCE00 !important; }
@media (max-width: 640px) {
	.phx-booking .phx-b-actions { flex-direction: column; align-items: stretch; }
	.phx-booking .phx-b-actions .phx-b-submit, .phx-booking button.phx-b-cancel { width: 100%; text-align: center; }
}

/* ---------- 0.5.0: off-season box (online booking paused) ---------- */
.phx-booking.phx-paused { display: flex; justify-content: center; }
.phx-paused .phx-p-card {
	width: 100%; max-width: 720px; display: grid; justify-items: center; gap: 14px; text-align: center;
	padding: 40px 32px; background: var(--phx-panel); border: 1px solid var(--phx-line); border-radius: 22px;
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.phx-paused .phx-p-icon {
	width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
	background: rgba(159, 206, 0, .14); color: #9FCE00; box-shadow: 0 0 0 1px rgba(159, 206, 0, .35);
}
.phx-paused .phx-p-title { margin: 4px 0 0; color: #FFFFFF; font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 26px; line-height: 1.25; }
.phx-paused .phx-p-text { color: rgba(255, 255, 255, .85); font-size: 17px; max-width: 560px; }
.phx-paused .phx-p-reopen { color: #9FCE00; font-weight: 600; font-size: 15px; }
.phx-paused .phx-p-phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.phx-paused a.phx-p-call, .phx-paused a.phx-p-call:visited {
	display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; text-decoration: none;
	background: #9FCE00; color: #0B0B0B !important; border: 2px solid #9FCE00;
	font-family: Montserrat, Roboto, sans-serif; font-weight: 700; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums;
	transition: background-color .15s, border-color .15s;
}
.phx-paused a.phx-p-call:hover, .phx-paused a.phx-p-call:focus-visible { background: #FFFFFF; border-color: #FFFFFF; color: #0B0B0B !important; }
.phx-paused .phx-p-chatlabel { margin-top: 8px; color: rgba(255, 255, 255, .72); font-size: 14px; }
.phx-paused .phx-p-chat { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.phx-paused a.phx-p-app, .phx-paused a.phx-p-app:visited {
	padding: 10px 22px; border-radius: 999px; text-decoration: none; color: #FFFFFF !important;
	border: 2px solid rgba(255, 255, 255, .65); font-family: Montserrat, Roboto, sans-serif; font-weight: 600; font-size: 15px;
	transition: background-color .15s, color .15s, border-color .15s;
}
.phx-paused a.phx-p-app.is-wa:hover, .phx-paused a.phx-p-app.is-wa:focus-visible { background: #25D366; border-color: #25D366; color: #0B0B0B !important; }
.phx-paused a.phx-p-app.is-viber:hover, .phx-paused a.phx-p-app.is-viber:focus-visible { background: #7360F2; border-color: #7360F2; color: #FFFFFF !important; }
@media (max-width: 640px) {
	.phx-paused .phx-p-card { padding: 30px 18px; border-radius: 18px; }
	.phx-paused .phx-p-title { font-size: 21px; }
	.phx-paused .phx-p-text { font-size: 16px; }
	.phx-paused .phx-p-phones { flex-direction: column; align-items: stretch; width: 100%; }
	.phx-paused a.phx-p-call { justify-content: center; }
}
