/* The class waitlist (Gym Builder): the button on full class times, its dialog,
   and the member dashboard's Waitlists tab. Same look as the registration dialog. */

/* The button where a class time is full. */
.gb-wl { display: block; }
.gb-wl .gb-tt-full { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; opacity: .8; }
.gb-wl-join,
.gb-wl-claim {
	display: inline-block;
	margin-top: 6px;
	padding: 6px 14px;
	border: 1px solid var(--gym-builder-primary-color, #005dd0);
	border-radius: 999px;
	background: #fff;
	color: var(--gym-builder-primary-color, #005dd0);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}
.gb-wl-join:hover,
.gb-wl-join:focus-visible,
.gb-wl-claim:hover,
.gb-wl-claim:focus-visible {
	background: var(--gym-builder-primary-color, #005dd0);
	color: #fff;
}
.gb-wl-claim,
.gb-wl a.gb-wl-claim {
	/* Stronger than the class page's ".gym-builder a" link colour. */
	background: var(--gym-builder-primary-color, #005dd0);
	color: #fff;
}
.gb-wl-count,
.gb-wl-note {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	opacity: .85;
}
.gb-wl-note { font-weight: 600; }
.gb-wl-note.is-held { color: #15803d; opacity: 1; }
.class-schedule-book .gb-wl-join,
.class-schedule-book .gb-wl-claim { margin-top: 0; }

/* In a checkout: why a plan can't be bought while a class it needs is full. */
.gb-wl-plan {
	margin: 0 0 14px;
	padding: 12px 14px;
	border: 1px solid #fcd34d;
	border-radius: 8px;
	background: #fffbeb;
	color: #78350f;
	font-size: 14px;
	line-height: 1.5;
}
.gb-wl-plan p { margin: 0; }
.gb-wl-plan__need { font-weight: 600; }
.gb-wl-plan__need + .gb-wl-plan__how,
.gb-wl-plan__need + .gb-wl-plan__class { margin-top: 6px; }
.gb-wl-plan__how + .gb-wl-plan__class { margin-top: 10px; }
.gb-wl-plan__class + .gb-wl-plan__class {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #fde68a;
}
.gb-wl-plan .gb-wl-join { margin-top: 8px; }

/* The dialog. */
.gb-wl-open { overflow: hidden; }
.gb-wl-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba( 15, 23, 42, .55 );
}
.gb-wl-modal[hidden] { display: none; }
.gb-wl-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc( 100vh - 32px );
	overflow: auto;
	padding: 24px;
	border-radius: 14px;
	background: #fff;
	color: #0f172a;
	box-shadow: 0 20px 50px rgba( 15, 23, 42, .25 );
	text-align: left;
	box-sizing: border-box;
}
.gb-wl-dialog:focus { outline: none; }
.gb-wl-dialog button,
.gb-wl-dialog input { font-family: inherit; }
.gb-wl-dialog h3 { margin: 0 40px 6px 0; font-size: 20px; line-height: 1.3; }
.gb-wl-class { margin: 0 0 18px; color: #475569; font-size: 14px; font-weight: 600; line-height: 1.45; }
.gb-wl-class:empty { display: none; }
.gb-wl-text { margin: 0 0 18px; font-size: 14px; line-height: 1.55; }
.gb-wl-text:empty { display: none; }
.gb-wl-dialog .gb-wl-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: #64748b;
	font-size: 24px;
	line-height: 32px;
	text-align: center;
	cursor: pointer;
}
.gb-wl-dialog .gb-wl-close:hover,
.gb-wl-dialog .gb-wl-close:focus { background: #f1f5f9; color: #0f172a; box-shadow: none; }
.gb-wl-dialog .gb-wl-close:focus-visible { outline: 2px solid var(--gym-builder-primary-color, #005dd0); outline-offset: 2px; }

.gb-wl-form[hidden],
.gb-wl-answer[hidden],
.gb-wl-times[hidden],
.gb-wl-choices[hidden],
.gb-wl-note-wait[hidden],
.gb-wl-staff[hidden] { display: none; }
.gb-wl-form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.gb-wl-form input[type=text],
.gb-wl-form input[type=email],
.gb-wl-form input[type=tel] {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 400;
	box-sizing: border-box;
}
.gb-wl-form .gb-wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gb-wl-login { margin: 2px 0 20px; font-size: 13px; color: #475569; }
.gb-wl-login a { font-weight: 600; color: var(--gym-builder-primary-color, #005dd0); }
.gb-wl-as { margin: 0 0 18px; font-size: 14px; }

/* Choices: class times to pick, add or move, add or swap. */
.gb-wl-times,
.gb-wl-choices { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.gb-wl-times legend,
.gb-wl-choices legend { padding: 0; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.gb-wl-time-list,
.gb-wl-choice-list,
.gb-wl-answer-list { display: grid; gap: 10px; }
.gb-wl-answer-list:empty { display: none; }
.gb-wl-dialog .gb-wl-option {
	display: flex;
	align-items: flex-start;
	flex-wrap: nowrap;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}
.gb-wl-dialog .gb-wl-option:has( input:checked ) { border-color: var(--gym-builder-primary-color, #005dd0); background: #eff6ff; }
.gb-wl-dialog .gb-wl-option input { flex: none; width: auto; margin: 3px 0 0; accent-color: var(--gym-builder-primary-color, #005dd0); }
.gb-wl-option-text { flex: 1 1 0; min-width: 0; line-height: 1.45; }
.gb-wl-option-count { color: #64748b; font-size: 12px; white-space: nowrap; }
.gb-wl-note-wait { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: #475569; }

/* Buttons. */
.gb-wl-submit,
.gb-wl-dialog .gb-wl-action {
	display: block;
	width: 100%;
	padding: 12px;
	border: 0;
	border-radius: 8px;
	background: var(--gym-builder-primary-color, #005dd0);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
}
.gb-wl-buttons { display: grid; gap: 10px; margin-top: 20px; }
.gb-wl-buttons:empty { display: none; }
.gb-wl-dialog .gb-wl-action.is-plain {
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #0f172a;
}
.gb-wl-dialog .gb-wl-action.is-danger { background: #b91c1c; }
.gb-wl-dialog .gb-wl-submit:hover,
.gb-wl-dialog .gb-wl-submit:focus,
.gb-wl-dialog .gb-wl-action:hover,
.gb-wl-dialog .gb-wl-action:focus { filter: brightness( .94 ); }
.gb-wl-submit[disabled],
.gb-wl-dialog .gb-wl-action[disabled] { opacity: .6; cursor: default; }
.gb-wl-dialog .is-loading { position: relative; color: transparent !important; opacity: 1; }
.gb-wl-dialog .is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	border: 2px solid rgba( 255, 255, 255, .45 );
	border-top-color: #fff;
	border-radius: 50%;
	animation: gb-wl-spin .7s linear infinite;
}
.gb-wl-dialog .is-plain.is-loading::after { border-color: rgba( 15, 23, 42, .2 ); border-top-color: #0f172a; }
@keyframes gb-wl-spin { to { transform: rotate( 360deg ); } }
@media ( prefers-reduced-motion: reduce ) {
	.gb-wl-dialog .is-loading::after { animation-duration: 1.6s; }
}
.gb-wl-message { margin: 0 0 16px; font-size: 14px; line-height: 1.55; }
.gb-wl-message:empty { display: none; }
.gb-wl-message.is-ok { color: #15803d; font-weight: 600; }
.gb-wl-message.is-error { color: #b91c1c; }

/* The gym's terms tick box. */
.gb-wl-form .gb-terms { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin: 4px 0 20px; font-size: 14px; line-height: 1.45; }
.gb-wl-form .gb-terms input { flex-shrink: 0; width: auto; margin: 3px 0 0; }
.gb-wl-form .gb-terms label { display: inline; flex: 1 1 200px; margin: 0; font-weight: 400; }
.gb-wl-form .gb-terms a { margin-left: 24px; flex-basis: 100%; font-weight: 600; color: var(--gym-builder-primary-color, #005dd0); }

/* Member dashboard: Waitlists tab and the "place held" banner. */
.gb-wl-list { display: grid; gap: 14px; }
.gb-wl-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding: 18px 20px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}
.gb-wl-row-body { flex: 1 1 260px; min-width: 0; }
.gb-wl-row-name,
.gym-builder-dashboard-shell .gb-wl-row .gb-wl-row-name { margin: 0 0 14px; font-size: 15px; font-weight: 700; line-height: 1.4; color: #0f172a; }
.gb-wl-nowrap { white-space: nowrap; }
.gb-wl-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; line-height: 1.45; color: #475569; }
.gb-wl-pill {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 8px;
	line-height: 1.5;
	background: #eef2f7;
	color: #334155;
	font-size: 12px;
	font-weight: 600;
}
.gb-wl-pill.is-offered,
.gb-wl-pill.is-claimed { background: #dcfce7; color: #15803d; }
.gb-wl-pill.is-requested,
.gb-wl-pill.is-notice { background: #fef3c7; color: #92400e; }
.gb-wl-row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.gym-builder-dashboard-shell a.gb-wl-btn,
.gb-wl-btn {
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #0f172a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}
.gym-builder-dashboard-shell a.gb-wl-btn.is-primary,
.gb-wl-btn.is-primary {
	border-color: var(--gym-builder-primary-color, #005dd0);
	background: var(--gym-builder-primary-color, #005dd0);
	color: #fff;
}
.gb-wl-btn:hover,
.gb-wl-btn:focus-visible { filter: brightness( .95 ); }
.gb-wl-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0 0 24px;
	padding: 18px 20px;
	border: 1px solid #bbf7d0;
	border-radius: 12px;
	background: #f0fdf4;
	color: #14532d;
}
.gb-wl-banner-text { flex: 1 1 260px; min-width: 0; font-size: 14px; line-height: 1.45; }
.gb-wl-banner-text strong { display: block; margin-bottom: 4px; font-size: 15px; }
@media ( max-width: 480px ) {
	.gb-wl-dialog { padding: 22px 18px; }
	.gb-wl-row { padding: 16px; }
	.gb-wl-row-meta .gb-wl-pill { display: block; }
	.gb-wl-row-actions,
	.gb-wl-banner .gb-wl-btn { width: 100%; }
	.gb-wl-row-actions .gb-wl-btn,
	.gb-wl-banner .gb-wl-btn { flex: 1 1 auto; text-align: center; }
}
