/*
This css file is a WWCC override to the clarity design.

LVHA → :link → :visited → :hover → :active

*/

#logo {
	padding-top: 1px;
	padding-right: 1em;
}


/* --- WWCC Table Styling  --------------------------------------*/

.table-wwcc {
	border: 1px black solid;
	background-color: white;
	border-spacing: 0px;

}

/*makes the headings of the table stay at the top of the page when scrolling*/
.table-wwcc th {
	position: sticky;
	position: -webkit-sticky;
	top: 0px;
	z-index: 2;
	background-color: white;
}

.table-wwcc td,
.table-wwcc th {
	padding: 5px;
	border: 1px black solid;

}

/*make alternating rows a light grey*/
.table-wwcc tr.d1 {
	background-color: #e4e4e4;
}

/*if all have paid for the round, make background alternating shades of green*/
.table-wwcc tr.paid0 {
	background-color: #e8fef5;
}

.table-wwcc tr.paid1 {
	background-color: #d4efdf;
}

/*--- All and Round Availability cells -------------------  */
.table-wwcc td.Y, div.Y {
	/* background-color: lightgreen; */
	background-color: #D0FFC0;
}

.table-wwcc td.N, div.N {
	/* background-color: red; */
	background-color: #FFC0C0;
}

.table-wwcc td.C, div.C {
	/* background-color: yellow; */
	background-color: #FFFE96;
}

/*--- GamesPlayed table*/
.table-wwcc td.played {
	background-color: lightgreen;
}

/* --- styling layout and buttons for My Availabilty  --------------------------------------*/

.round-container {
	margin-bottom: 20px;
}

.round-heading {
	display: flex;
	align-items: center;
	font-weight: bold;
	gap: 1rem;
	/*add spacing between the heading and the next item*/
}

/* Container to make radio buttons responsive */
.radio-group {
	display: flex;
	flex-wrap: wrap;
}

/* Make radio-buttons a flex container */
.radio-buttons {
	display: flex;
	align-items: center;
	/* vertically center the items */
}

/* Hide the radio button */
.radio-group input[type="radio"] {
	display: none;
}

/* General styling for labels */
.radio-buttons label {
	display: inline-block;
	padding: 5px 15px;
	margin: 0px 5px 0px 0px;
	border-radius: 25px;
	/* Semi-circle effect */
	cursor: pointer;
	transition: background-color 0.3s, border 0.2s;
	color: white;
}

/* Hover effect */
.radio-buttons label:hover {
	filter: brightness(90%);
}

/* Default radio button styling */
.radio-group input[type="radio"]+label {
	background-color: rgb(235, 235, 235);
	color: black;
}

.radio-group input[type="radio"]:checked.Y+label {
	background-color: #2F0;
	color: black;
}

.radio-group input[type="radio"]:checked.N+label {
	background-color: #f70;
	color: black;
}

.radio-group input[type="radio"]:checked.C+label {
	background-color: #0ef;
	color: black;
}

.radio-group input[type="radio"]:checked.U+label {
	background-color: darkgray;
	color: black;
}


/*---- Fees notification bubble ------*/

.notification-container {
	display: inline-flex;
	padding: 10px;
	align-items: center;
	gap: 10px;
	border-radius: 6px;
	background: #B7E3FF;
	margin-bottom: 10px;
}

.notification-content {
	color: #000;
}




/* ----- responsive navigation system ------*/

* {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
}

header a {
	text-decoration: none;
}

header {
	padding: 0 20px;
	height: 60px;
	display: flex;
	justify-content: space-between;
	background-color: rgb(250, 250, 250);

}

#brand {
	font-size: 18px;
	display: flex;
	align-items: center;
}

#brand a,
#brand a:link,
#brand a:visited,
#brand a:hover {
	color: white;
}

nav ul {
	list-style: none;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0;
	margin: 0;
}

nav ul li {
	padding: 5px;
	margin-left: 5px;
}

nav ul li:not(#logout) {
	margin-right: 5px;
}

nav ul li a:link,
nav ul li a {
	color: white;
}

nav ul li a:visited {
	color: whitesmoke;
}

nav ul li a:active,
nav ul li a:hover,
nav ul li a:visited:hover {
	color: white;
	transition: 0.3s;

	border-bottom-width: 3px;
	border-bottom-style: ridge;
	border-bottom-color: whitesmoke;

}

nav ul li a.active-page {
	color: yellow;
	border: 1px solid yellow;
	border-radius: 5px;
	padding: 5px 8px;
}

#login,
#logout {
	border-radius: 5px;
	padding: 5px 8px;
}

#login {
	border: 1px solid #498afb;
}

#logout {
	border: 1px solid #ff3860;
}

#logout a {
	color: #ff3860;
}

#login a {
	color: #498afb;
}

#hamburger-icon {
	margin: auto 0;
	display: none;
	cursor: pointer;
}

#hamburger-icon div {
	width: 35px;
	height: 3px;
	background-color: white;
	margin: 6px 0;
	transition: 0.4s;
}

.open .bar1 {
	-webkit-transform: rotate(-45deg) translate(-6px, 6px);
	transform: rotate(-45deg) translate(-6px, 6px);
}

.open .bar2 {
	opacity: 0;
}

.open .bar3 {
	-webkit-transform: rotate(45deg) translate(-6px, -8px);
	transform: rotate(45deg) translate(-6px, -8px);
}

.open .mobile-menu {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
}

.mobile-menu {
	display: none;
	position: absolute;
	/*where the top of the menu starts. mmake the same size as the height of the logo and header bar size*/
	top: 60px;
	/*alignment, only relevant if width is less than 100%*/
	right: 0;
	height: calc(100vh - 60px);
	width: 50%;
	background-color: rgb(0, 54, 77);
	z-index: 20;
}

.mobile-menu li {
	margin-bottom: 10px;
	list-style: none;
	color: white;
	font-size: 1.5em;

}

.mobile-menu li a {
	color: white;
	transform: scale(1.1);
	transition: 0.3s;
}

/* LVHA → :link → :visited → :hover → :active */

.mobile-menu li a:active,
.mobile-menu li a:hover {
	color: inherit;
	text-decoration: none;
	border-bottom-width: 2px;
	border-bottom-style: ridge;

}


/*---- sorting links on matchfeetracking -> Payments   ----------------------------*/
.sort-group {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	list-style: none;
	width: 100%;
	height: 3em;
}

.sort-group a:link,
.sort-group a:visited {
	color: white;
}

.sort-group a:hover,
.sort-group a:visited:hover {
	color: white;
}

.sort-item {
	display: flex;
	height: 36px;
	justify-content: center;
	align-items: center;
	padding: 0px 12px;

	border-radius: 3px;
	border: none;
	background-color: rgb(0, 114, 163);
	text-transform: uppercase;
	text-decoration: none;
	font-weight: 500;
	cursor: pointer;

	margin-top: 6px;
	margin-right: 12px;
	margin-bottom: 6px;
	margin-left: 0px;
}

table#tbl-mf-round td.round-date,
table#payments td label {
	/*forces everything within the element to stay on 1 line*/
	white-space: nowrap;
}

/* --- Match Fee Tracking - Player Summary -------------------------------------- */

.toggle-player-details::after {
	content: "Show Player Owing Details";
}

/* When <details> is open */
details[open] .toggle-player-details::after {
	content: "Hide Player Owing Details";
}

/* --- Match Fee Tracking - Select Players -------------------------------------- */

/* === Layout === */
.player-grid form {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	/*gap: 5px;*/
	justify-items: center;
	margin-top: 0px;
}


/* Each player option wraps checkbox + label */

.player-option {
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
}

/* === Checkbox hidden but accessible === */
.player-select {
	/* position: absolute; */
	/*this cause a second scroll bar to appear, took me hours to work this out.*/
	/*opacity: 0;*/
	display: none;
	pointer-events: none;
}


/* === Styled label as button === */
.player-select-label {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 160px;
	height: auto;
	min-height: 40px;
	border-radius: 4px;
	background-color: white;
	color: #333;
	border: 2px solid #888;
	cursor: pointer;
	user-select: none;
	text-align: center;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s;
	box-sizing: border-box;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-bottom: 3px;
}


/* Hover feedback */
.player-select-label:hover {
	border-color: black;
	color: black;
}

/* Checked (selected) state */
.player-select:checked+.player-select-label {
	background-color: #28a745;
	/* green */
	color: white;
	border-color: #28a745;
}

/* === Responsive tweaks === */
@media (max-width: 600px) {
	.player-grid form {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}
}



/* --- All Availability page past game column display --------------------------- */

/*do I change past-game to something else like: hidden-cell so it is more generic and can be used else where */
.past-game {
	display: none;
}

.show .past-game {
	display: table-cell;
}

/* hide title on larger screens as active menu item is highlighted */
.title {
	display: none;
}

/* for match fee tracking and payment pages increase the font size */
select.season {
	font-size: 1.3rem;
	/* or use px like 18px */
}


/* --- adjust the menu if screen is smaller than 1000px --- */
@media screen and (max-width: 999px) {
	header nav {
		display: none;
	}

	#hamburger-icon {
		display: block;
	}

	/* show title when on smaller screens */
	.title {
		display: block;
	}

}

/* -------------  Responsive behavior: stack on smaller screens -------------------- */
@media only screen and (max-width: 600px) {

	/* --- Login page styling  --------------------------------------*/


	.auth-section {
		display: flex;
		/* make each element an item in a column*/
		flex-direction: column;
		align-items: center;
		text-align: center;
		font-size: 1.5em;
		/* gap between elements */
		gap: 10px;
	}

	.auth-section button {
		font-size: 1em;
	}

	#auth-error {
		font-size: 1.5em;
	}

	#usermessage {
		font-size: 1.5em;
		margin-top: 15px;
		display: flex;
		align-items: center;
		justify-content: center;
		vertical-align: middle;
	}

	/*add some space between the image and the text*/
	#usermessage img {
		margin-right: 0.5em;
	}

	/* --- round availability ------------------*/
  details.round-availability {
		font-size: 1.5em;
	}

	/* --- my availability ------------------*/
	.radio-group {
		flex-direction: column;
		align-items: center;
	}

	/* Wrap radio buttons to the next line on smaller screens */
	.radio-buttons {
		display: block;
	}

	/* mobile menu styling */
	header nav {
		display: none;
	}

	#hamburger-icon {
		display: block;
	}

	/*on mobile make the menu take up the full width*/
	.mobile-menu {
		width: 100%;
	}

}