:root {
    --court1team1color: #FFDEB887;
    --court1team2color: #FFDEB887;
    --court2team1color: #FFDEB887;
    --court2team2color: #FFDEB887;
    --onDeckTeamColor: #FFDEB887;
    --court1team1text: white;
    --court1team2text: white;
    --court2team1text: white;
    --court2team2text: white;
    --onDeckTeamText: white;

	--headerColor: #E07A02;
	--footerColor: #034068;
	--highlightColor: #03426B;
	--neutralColor: #FFDEB887;
    --backgroundColor: #383838;

    --adminVisibility: hidden;
    --adminDisplay: none;
}

body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h2 {
    text-align: center;
    margin: 4px;
}

h3 {
    padding: 2px;
    margin: 2px;
}

h4 {
    margin: 0;
    text-align: center;
}

.court-headers {
    display: flex;
    justify-content: space-around;
    background-color: grey;
}

.court-preview {
    position: relative;
    display: flex;
    justify-content: space-around;
    padding: 12px;
    height: 75vh; /* 75% of viewport height */
    background-color: grey;
}

.court {
    display: flex;
    flex-direction: row;
    width: 50%;
}

.court-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 80%;
    padding: 4px;
    box-sizing: border-box; /* Include padding in height calculation */
    align-items: center;
}

.score-column {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 20%;
    padding: 4px;
    box-sizing: border-box; /* Include padding in height calculation */
    align-items: center;
    position: relative;
}

hr {
    display: flex;
    width: 120%;
    border-top: 3px dashed white;
    padding: 0;
    margin: 0;
}

.court-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: auto;
    height: 100%;
    aspect-ratio: 1 / 2; /* Height is twice the width */
    flex: 1 1 auto; /* Allow the boxes to grow and shrink equally */
    border: 1px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 24px;
}

.backcourt {
    display: flex;
    height: 66%;
    width: 100%;
    justify-content: center;
    align-items: center;
    border: 1px solid white;
}

.frontcourt {
    display: flex;
    height: 33%;
    width: 100%;
    align-items: center;
    border: 1px solid white;
}

.teamName {
    height: 10%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.court-container {
    width: 50%;
    height: 75vh;
    display: inline-block;
    position: relative;
    border: 2px solid black;
    box-sizing: border-box;
}

.court-net {
    position: absolute;
    top: 50%;
    left: -10%;
    width: 120%;
    height: 2px;
    background-color: #000;
    border-top: 2px dashed #000;
    transform: translateY(-50%);
}

.team-square {
    width: 40%;
    height: 40%;
    margin: 5% auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 6px solid white;
    position: relative;
}

.courtTeam {
    position: relative;
    width: 100%;
    height: 50%;
}

.court1-team1 {
    background-color: var(--court1team1color);
    color: var(--court1team1text);
}

.court1-team2 {
    background-color: var(--court1team2color);
    color: var(--court1team2text);
}

.court2-team1 {
    background-color: var(--court2team1color);
    color: var(--court2team1text);
}

.court2-team2 {
    background-color: var(--court2team2color);
    color: var(--court2team2text);
}

.score-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 45%;
    width: 100%;
    font-family: 'Wallpoet', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: white;
}

.resetScore {
    height: 10%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.scorekeeper {
    width: 100%;
    position: absolute;
    bottom: 0;
}

.scoreButton {
    font-size: 12pt;
    font-family: 'Wallpoet', sans-serif;
    visibility: collapse;
}

.dividing-line {
    width: 2px;
    background-color: white;
    height: calc(100% - 16px);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.player-count-control {
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.courts-container {
    display: flex;
    justify-content: space-between; /* Ensures court1 and court2 are side-by-side */
    gap: 16px; /* Adds spacing between court1 and court2 */
}

.team-list-hdr {
	font-family: 'Racing Sans One', sans-serif;
    color: var(--highlightColor);
}

.team-list {
    /* flex: 1; */
    padding: 4px;
    overflow-y: auto;
    color: black;
    border: 1px solid #ccc; /* Adds a light gray border */
}

.team-card {
    display: flex;
    justify-content: space-between;
    height: auto;
    background-color: var(--team-color, lightgray);
    padding: 6px;
    margin-bottom: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease; /* Smooth transition for interaction */
}
@media screen and (orientation: portrait) {
	.team-card {
        font-size: 36pt;
	}
}

.courts-container .team-card {
    width: 80%;
    /* margin: 0 auto; */
}

.team-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.team-card.selected {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.players-container {
    display: flex; /* Use flexbox to layout children */
    flex-direction: row; /* Arrange children in a row */
    justify-content: space-around;
    gap: 10px; /* Optional: Add some space between the circles */
    align-items: center;
    align-self: center;
}

.player-row {
    display: flex;
    justify-content: space-around; /* Distribute circles evenly */
    gap: 10px; /* Add spacing between circles */
    width: 100%;
}

.player-circle {
    font-family: 'Covered By Your Grace', cursive;
    font-size: 2rem; /* Adjust font size relative to the circle size */
    aspect-ratio: 1 / 1; /* Maintain a perfect circle */
    border-radius: 50%;
    background-color: #fff;
    color: #000;
    display: flex;
    justify-content: center; /* Horizontally center the text */
    align-items: center; /* Vertically center the text */
    flex: 0 0 auto; /* Prevent the circles from growing */
    flex-shrink: 0; /* Prevent shrinking in flexbox layouts */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: default;
}
.player-row .player-circle {
    width: 18%;
}
.players-container .player-circle {
    height: 100%;
    width: auto;
}
@media screen and (orientation: portrait) {
	.player-circle {
        font-size: 8rem;
	}
}

.court-button {
    font-size: 12px;
    font-weight: 600;
    height: 20px;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.team-button {
    align-self: flex-end;
}

.team-score {
    font-size: 12pt;
    font-family: 'Wallpoet', sans-serif;
    border-radius: 24%;
    height: 24px;
    width: auto;
    aspect-ratio: 1 / 1;
    align-self: center;
    align-content: center;
    text-align: center;
}

.onDeck-button {
    background-color: var(--onDeckTeamColor);
    color: var(--onDeckTeamText);
    font-family: 'Covered By Your Grace', cursive;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: auto;
    cursor: pointer;
}

.player-list {
    flex: 1;
    padding: 4px;
    overflow-y: auto;
}

.player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: lightgray;
    color: black;
    padding: 2px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
@media screen and (orientation: portrait) {
	.player-card {
        font-size: 36pt;
	}
    .player-card button {
        font-size: 24pt;
    }
}

.info-header {
    padding: 6px; /* Adds space inside the element */
    padding-top: 18px; /* Adds space inside the element on the top */
    margin: 0 6px; /* Adds space outside the element on the left and right */
    box-sizing: border-box; /* Ensures padding is included in the element's width */
    color: black;
}

.dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}
@media screen and (orientation: portrait) {
    .dialog, input {
        font-size: 36pt;
    }
}

.dialog-header {
    font-family: 'Covered By Your Grace', cursive;
    color: black;
}

.dialog-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: black;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}

.hidden {
    visibility: hidden;
    display: none;
}

.adminOnly {
    visibility: var(--adminVisibility);
    display: var(--adminDisplay);
}

.buttons-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    width: 100%;
}
@media screen and (orientation: portrait) {
	.buttons-row {
        font-size: 36pt;
	}
    .buttons-row button {
        font-size: 24pt;
    }
}

.buttonWithLabel {
    display: flex;
    flex-direction: column;
    text-align: center;
    color: black;
}

button {
    padding: 4px 8px;
    margin: 4px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50; /* Green */
    color: white;
    cursor: pointer;
}

button:hover {
    background-color: #388E3C; /* Darker green on hover */
}

.no-click-button {
    cursor: default;
}

.cancel-button {
    align-self: flex-end;
    padding: 5px 10px;
    margin-top: 10px;
    background-color: #f44336; /* Red */
}

.cancel-button:hover {
    background-color: #d32f2f; /* Darker red on hover */
}

.confirm-button {
    padding: 5px 10px;
    margin-top: 10px;
}

.info-button {
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center contents horizontally */
    align-items: center; /* Center contents vertically */
    background: none; /* Transparent background */
    border: 1px solid black; /* Add a border */
    font-size: 16px; /* Font size for the icon */
    width: 16px; /* Set width */
    height: 18px; /* Set height (same as width for round shape) */
    border-radius: 50%; /* Make the button circular */
    cursor: pointer; /* Pointer cursor for interactivity */
    color: black; /* Text/icon color */
}
@media screen and (orientation: portrait) {
	.info-button {
        font-size: 24pt;
        height: 24px;
        width: 24px;
	}
}

.info-button:hover {
    background-color: #e0e0e0; /* Light gray background on hover */
    border-color: #757575; /* Darker border color on hover */
    color: #000; /* Optional: Change text/icon color */
}

.help-dialog {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
@media screen and (orientation: portrait) {
	.help-dialog {
        font-size: 36pt;
	}
    .help-dialog button {
        font-size: 24pt;
    }
}

.help-dialog button {
    margin-top: 10px;
}

.flex-row {
    display: flex;
    flex-direction: row;
}