/*
	Roster Form page (roster.html)
	Loaded after zion_public.min.css. Everything is scoped to .rosterPage so it cannot affect other pages.
	The roster sheet itself is a white "paper" panel so what prints is black on white.
*/

/* ---------- tools card (screen only) ---------- */

.rosterPage .rosterTools {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.6rem;
	margin-bottom: 2rem;
}

.rosterPage .rosterToolsText {
	color: var(--muted);
	font-size: 1.4rem;
	line-height: 1.4;
}

.rosterPage .rosterToolsBtns {
	display: flex;
	gap: 1rem;
	flex-shrink: 0;
}

.rosterPage .rosterToolsBtns .btn {
	cursor: pointer;
}

/* ---------- sheet ---------- */

.rosterPage .rosterSheet {
	position: relative;
	background: #fff;
	color: #000;
	padding: 2.4rem 2.8rem 2.8rem;
	border-radius: .6rem;
	overflow: hidden;
	font-family: Arial, Helvetica, sans-serif;
}

.rosterPage .rosterHeader {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 140px;
	z-index: 1;
}

.rosterPage .rosterH1 {
	margin: 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 40px;
	line-height: 1.05;
	letter-spacing: .5px;
	text-transform: none;
	color: #000;
}

.rosterPage .rosterH2 {
	margin: 0 0 12px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 30px;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	color: #000;
}

.rosterPage .rosterField {
	display: flex;
	align-items: baseline;
	margin-top: 6px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 14px;
	font-weight: bold;
	color: #000;
}

.rosterPage .rosterField label {
	white-space: nowrap;
	margin-right: 6px;
	font-weight: bold;
}

.rosterPage .rosterField input {
	width: 300px;
	max-width: 100%;
	font-size: 15px;
}

.rosterPage .rosterLogo {
	height: 135px;
	width: auto;
	margin-right: 60px;
}

.rosterPage .rosterBall {
	position: absolute;
	opacity: .55;
	pointer-events: none;
}

.rosterPage .rosterBall1 {
	width: 95px;
	left: 42%;
	top: -22px;
}

.rosterPage .rosterBall2 {
	width: 70px;
	right: 120px;
	top: -10px;
}

.rosterPage .rosterBall3 {
	width: 85px;
	right: -24px;
	top: 55px;
}

/* ---------- grid of four teams ---------- */

.rosterPage .rosterGrid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-top: 14px;
	border: 1px solid #000;
	z-index: 1;
}

.rosterPage .rosterWatermark {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 400px;
	max-width: 80%;
	transform: translate(-50%, -50%);
	opacity: .35;
	pointer-events: none;
	z-index: 0;
}

.rosterPage .rosterTeam {
	position: relative;
	z-index: 1;
	min-width: 0;
	padding: 10px 10px 12px;
	border-right: 1px solid #000;
}

.rosterPage .rosterTeam:last-child {
	border-right: 0;
}

.rosterPage .rosterTeamTitle {
	margin: 2px 0 12px;
	text-align: center;
	font-size: 14px;
	font-weight: bold;
	letter-spacing: 0;
	text-transform: none;
	color: #4f81bd;
}

.rosterPage .rosterColLabels {
	display: flex;
	gap: 5px;
	margin: -6px 0 4px;
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: #777;
}

.rosterPage .rosterColLabels .num,
.rosterPage .rosterPlayer .num {
	width: 38px;
}

.rosterPage .rosterColLabels .name {
	flex: 1;
}

.rosterPage .rosterColLabels .grade,
.rosterPage .rosterPlayer .grade {
	width: 38px;
	text-align: center;
}

.rosterPage .rosterPlayer {
	display: flex;
	align-items: flex-end;
	gap: 5px;
	margin-bottom: var(--rosterGap, 15px);
}

.rosterPage .rosterPlayer .name {
	flex: 1;
	width: 0;
	min-width: 0;
}

.rosterPage .rosterPlayer input {
	min-width: 0;
	font-size: 13px;
}

.rosterPage .rosterRowTools {
	display: flex;
	gap: 6px;
	margin: -2px 0 4px;
}

.rosterPage .rosterRowTools button {
	font: 12px Arial, Helvetica, sans-serif;
	padding: 4px 9px;
	border: 1px solid #8b0000;
	border-radius: 3px;
	background: #fff;
	color: #8b0000;
	cursor: pointer;
}

.rosterPage .rosterRowTools button:hover {
	background: #8b0000;
	color: #fff;
}

.rosterPage .rosterCoachesLabel {
	margin: 14px 0 6px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 12px;
	letter-spacing: .5px;
	color: #333;
}

.rosterPage .rosterCoach input {
	display: block;
	width: 100%;
	margin-bottom: var(--rosterGap, 15px);
	font-size: 13px;
}

/* underline-style inputs (scoped so the site's other inputs are untouched) */

.rosterPage .rosterSheet input[type="text"] {
	font-family: Arial, Helvetica, sans-serif;
	border: 0;
	border-bottom: 1px solid #333;
	border-radius: 0;
	background: transparent;
	padding: 2px 2px 1px;
	outline: none;
	box-shadow: none;
	color: #000;
}

.rosterPage .rosterSheet input[type="text"]:focus {
	background: #fff8c9;
	box-shadow: none;
}

/* ---------- unlock form + states (screen only) ---------- */

.rosterPage [hidden] {
	display: none !important;
}

.rosterPage .rosterUnlock {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 2rem;
}

.rosterPage .rosterUnlock .adminInput {
	width: 28rem;
	font-size: 1.6rem;
}

.rosterPage .rosterUnlock .btn {
	cursor: pointer;
}

.rosterPage .rosterUnlockErr {
	flex-basis: 100%;
	color: #ff8a8a;
	font-size: 1.4rem;
}

.rosterPage .rosterToolsText.isErr {
	color: #ff8a8a;
}

.rosterPage .rosterToolsText.isOk {
	color: #7ee0a4;
}

.rosterPage .rosterToolsBtns .btn[disabled] {
	opacity: .45;
	cursor: default;
}

/* row buttons only make sense for a team the visitor can edit */
.rosterPage .rosterTeam:not(.isEditable) .rosterRowTools {
	display: none;
}

.rosterPage .rosterSheet input[readonly] {
	cursor: default;
}

.rosterPage .rosterSheet input[type="text"][readonly]:focus {
	background: transparent;
}

/* ---------- print-options row (screen only) ---------- */

.rosterPage .rosterPrintOpts {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.2rem 2rem;
	margin-bottom: 2rem;
	font-size: 1.4rem;
}

.rosterPage .rosterPrintOptsLabel {
	font-weight: 800;
}

.rosterPage .rosterCheck {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	cursor: pointer;
}

.rosterPage .rosterCheck input {
	width: 1.8rem;
	height: 1.8rem;
	accent-color: var(--accent);
	cursor: pointer;
}

.rosterPage .rosterPrintOptsHint {
	color: var(--muted);
	font-size: 1.3rem;
}

/* a team set to print blank: faded on screen so you can see what will print, hidden in print */
.rosterPage .rosterTeam.isBlankPrint input[type="text"] {
	opacity: .25;
}

/* ---------- tablets / phones (screen only; print always uses 4 columns) ---------- */

@media screen and (max-width: 1000px) {
	.rosterPage .rosterGrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rosterPage .rosterTeam {
		border-bottom: 1px solid #000;
	}

	.rosterPage .rosterTeam:nth-child(odd) {
		border-right: 1px solid #000;
	}

	.rosterPage .rosterTeam:nth-child(even) {
		border-right: 0;
	}

	.rosterPage .rosterTeam:nth-last-child(-n+2) {
		border-bottom: 0;
	}

	.rosterPage .rosterLogo {
		height: 100px;
		margin-right: 0;
	}

	.rosterPage .rosterBall {
		display: none;
	}
}

@media screen and (max-width: 640px) {
	.rosterPage .rosterTools {
		flex-direction: column;
		align-items: stretch;
	}

	.rosterPage .rosterToolsBtns {
		flex-wrap: wrap;
	}

	.rosterPage .rosterToolsBtns .btn {
		flex: 1;
	}

	.rosterPage .rosterUnlock .adminInput {
		width: 100%;
	}

	.rosterPage .rosterSheet {
		padding: 1.6rem;
	}

	.rosterPage .rosterGrid {
		grid-template-columns: minmax(0, 1fr);
	}

	.rosterPage .rosterTeam,
	.rosterPage .rosterTeam:nth-child(odd),
	.rosterPage .rosterTeam:nth-child(even) {
		border-right: 0;
		border-bottom: 1px solid #000;
	}

	.rosterPage .rosterTeam:last-child {
		border-bottom: 0;
	}

	.rosterPage .rosterH1 {
		font-size: 30px;
	}

	.rosterPage .rosterH2 {
		font-size: 22px;
	}

	.rosterPage .rosterTitles {
		flex: 1;
		min-width: 0;
	}

	.rosterPage .rosterLogo {
		height: 70px;
		flex-shrink: 0;
		margin-left: 10px;
	}

	.rosterPage .rosterField {
		flex-wrap: wrap;
	}

	.rosterPage .rosterField input {
		flex: 1;
		min-width: 0;
		width: auto;
	}
}

/* ---------- print: only the sheet, landscape letter ---------- */

@page {
	size: letter landscape;
	margin: .35in;
}

@media print {
	html,
	body {
		height: auto;
		background: #fff;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.rosterPage .siteHeader,
	.rosterPage .heroCourtShort,
	.rosterPage .footer,
	.rosterPage .rosterTools,
	.rosterPage .rosterUnlock,
	.rosterPage .rosterPrintOpts,
	.rosterPage .rosterRowTools,
	.modalOverlay,
	.modal {
		display: none !important;
	}

	.rosterPage {
		min-height: 0;
		display: block;
		background: #fff;
	}

	.rosterPage .section {
		padding: 0;
	}

	.rosterPage .wrap {
		max-width: none;
		padding: 0;
	}

	.rosterPage .rosterSheet {
		width: 10.2in;
		padding: 0;
		border-radius: 0;
		overflow: hidden;
		break-inside: avoid;
	}

	.rosterPage .rosterGrid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rosterPage .rosterTeam,
	.rosterPage .rosterTeam:nth-child(odd),
	.rosterPage .rosterTeam:nth-child(even) {
		border-bottom: 0;
		border-right: 1px solid #000;
	}

	.rosterPage .rosterTeam:last-child {
		border-right: 0;
	}

	.rosterPage .rosterH1 {
		font-size: 40px;
	}

	.rosterPage .rosterH2 {
		font-size: 30px;
	}

	.rosterPage .rosterLogo {
		height: 135px;
		margin-right: 60px;
	}

	.rosterPage .rosterBall {
		display: block;
	}

	.rosterPage .rosterBall3 {
		right: 0;
	}

	.rosterPage .rosterSheet input[type="text"]:focus {
		background: transparent;
	}

	/* teams unchecked in "Print names for" keep their lines and title but no names */
	.rosterPage .rosterTeam.isBlankPrint input[type="text"] {
		opacity: 1;
		color: transparent;
		-webkit-text-fill-color: transparent;
	}
}
