html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
body {
    margin: 0 auto;
    padding: 10px;
    max-width: 100%;
    font-family: Arial, sans-serif;
    background: url('img/fields.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    height: 100%;
    font-size: 16px; /* Set a base font size */
    line-height: 1.5; /* Improve readability */
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-flow: column;
    max-width: 900px;
    height: auto; /* Allow height to adjust dynamically */
    justify-content: center;
    padding: 10px 0 0 0;
    align-items: center;
    min-width: 800px;
}
header {
    padding: 10px 20px 40px 20px;
    margin: auto 0;
    text-align: center;
    flex: 0 1 auto;
    width: 100%;
    border-bottom: 2px solid #666;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}
main {
    padding: 20px;
    flex: 1 1 300px;
    max-width: 960px;
    margin-bottom: 10px;
}
footer {
    margin: 0 10px;
    text-align: center;
    background: #333;
    color: #fff;
    margin-top: auto;
    flex: 0 1 40px;
    font-size: 16px; /* Ensure footer text is readable */
    width: 100%;
}
footer a {
    color: #fff;
    text-decoration: none;
}
#footer-inner {
    padding: 0 10px;
}
.hidden {
    display: none;
}

/* center hamburger inside nav */
nav {
    padding: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Default navigation styles */
/* center the ul */
nav ul {
    position: absolute; /* Position the dropdown */
    justify-content: space-around;
    list-style: none;
    left: 50%;
    width: 700px;
    padding: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    top: 100px;
    z-index: 1000;
    transition: max-height 0.3s ease-out;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    font-size: 18px;
}

/* Show navigation links when active */
nav ul.active {
    max-height: 300px;
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #000;
    padding: 8px;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 10px 0;
}
.col {
    flex: 1;
    padding: 10px;
    box-sizing: border-box;
}

/* Forms */
/* input except input [type="checkbox"] */
input:not([type="checkbox"]), textarea {
    display: block;
    padding: 12px;
    margin: 0 0 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 100%;
    font-size: 16px; 
    box-sizing: border-box; 
}
input.input-small {
    padding: 5px;
    margin: 0 0 5px 0;
    font-size: 14px;
}
/* Buttons */
.button-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Reduce gap between buttons */
}
button, .button {
    background: #007BFF;
    font-size: 16px;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px; /* Ensure buttons have readable text */
    text-align: center;
}
.btn-xl {
    border: 1px solid #000;
    background-color: #fff;
    text-decoration: none;
    color: #000;
}
.btn-small {
    font-size: 14px;
    padding: 8px;
}

.toggle {
    cursor: pointer;
}
#copy-to-options {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
}
#admin-content {
    width: 100%;
    box-sizing: border-box;
}
.admin-section {
    width: 100%;
}
#shifts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background-color: #fff;
    flex-direction: column; /* Stack shifts vertically */
    gap: 10px;
}
table {
    margin: 0 -10px;
}
#shift-list {
    text-align: center;
    margin: 0 auto;
}
#shift-date-list {
    margin: 0 -20px;
}
.remove-team {
    font-size: 24px;
}


#teams-container {
    max-height: 50vh; /* Reduce height for smaller screens */
    overflow-y: auto; /* Ensure scrolling works */
}

.team {
    background: #fff;
    padding: 8px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;

}
.team:hover {
    background: #ffffcc;
    cursor: pointer;
}
.stat-card {
    background: #eef;
    border-radius: 8px;
    padding: 10px; /* Reduce padding */
    font-size: 16px; /* Adjust font size */
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    min-width: 140px; /* Reduce minimum width */
    text-align: center;
}
tr.shift.selectable:hover {
    /* light yellow */
    background: #ffffcc;
    cursor: pointer;
}
tr > td, tr > th {
    background-color: #fff;
    padding: 8px; /* Reduce padding */
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid #ccc;
    font-size: 14px; /* Adjust font size */
}
/* Default desktop layout: calendar on the left, shifts on the right */
#shifts-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
}
#calendar-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center; 
}

.logout {
    display: none;
}
/* Calendar day styles */
.calendar-day-header {
    width: 37px; 
    font-weight: bold;
    text-align: center;
    margin: 2px;
    border-bottom: 1px solid #ccc;
    text-align: center;
    display: none;
}
.calendar-space {
    width: 37px; 
    height: 37px;
    margin: 2px;
}
.calendar-day {
    width: 35px; /* Reduce size for smaller screens */
    height: 35px;
    line-height: 35px;
    text-align: center;
    margin: 2px;
    border: 1px solid #ccc;
    font-size: 14px; /* Adjust font size */
}
.calendar-day.selected {
    background-color: #007BFF; 
}
#available-shifts-header {
    display: none;
}
#available-shifts-header > a {
    text-decoration: none;
    color:#007BFF;
}

/* Colors based on shift availability */
.has-shifts {
    cursor: pointer;
    background-color: #fff;
}
.no-shifts {
    background-color: #ccc;
}

/* Shifts Tabs */
#shifts-tab-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    list-style: none; 
    border-bottom: 2px solid #000;
    padding: 0;
    width: 100%;
    max-width: 900px; /* Ensure it doesn't exceed the container width */
}
#shifts-tab-list li {
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px 5px 0 0;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-bottom: none;
}
#shifts-tab-list li.active {
    background-color: #000;
    color: #fff;
    font-weight: bold;
}
.form-footer {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #ccc;
}


/* Layout for the calendar and shifts container */
#selection-container {
    display: flex;
    flex-direction: row; 
    gap: 10px; /* Add spacing between sections */
}
#calendar-header {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-top: 1px solid #888;
}
#calendar-header a {
    display: inline-block;
    padding: 5px 10px;
    text-decoration: none;
    background-color: #888;
    color: #fff;
    font-size: 18px; /* Ensure header links are readable */
}
#calendar {
    border: 3px solid #888;
}
#calendar-container.selected > #calendar,
#calendar-container.selected > #calendar-header {
    display: none;
}
@media (max-width: 900px) {
    .container {
        min-width: 300px; 
        padding: 5px 0 0 0;
    }
    header {
        padding-bottom: 20px;
    }
    /* Hide navigation links on smaller screens */
    nav ul {
        flex-direction: column; /* Stack links vertically */
        max-height: 300px; /* Adjust based on the number of links */
        position: absolute; /* Position the dropdown */
        top: 124px; /* Adjust based on header height */
        left: 50%;
        transform: translateX(-50%);
        display: flex; /* Ensure flexbox is applied */
        max-height: 0; /* Initially hidden */
        overflow: hidden; /* Hide overflowing content */
        box-shadow: 0 2px 200px rgba(0, 0, 0, 0.8);
        clip-path: inset(0 -200px -200px -200px);
        background-color: #fff; 
        width: 250px;
    }

    nav ul li {
        padding: 10px;
        border-bottom: 1px solid #ccc;
    }

    nav ul li:last-child {
        border-bottom: none;
    }
    .hamburger {
        display: block; /* Show the hamburger on smaller screens */
    }
    
    /* On mobile, show shifts above the calendar */
    #selection-container {
        flex-direction: column;
    }

    /* Adjust body padding */
    body {
        padding: 5px;
        font-size: 18px; /* Slightly increase base font size for mobile */
    }



    /* Adjust button styles */
    button, .btn-xl {
        font-size: 20px; /* Increase button text size */
        padding: 12px;
    }

    /* Adjust input styles */
    input, textarea {
        font-size: 18px; /* Increase input text size */
    }

    /* Adjust heading styles */
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.2em; /* Ensure headings are readable */
    }

    /* Adjust paragraph and list styles */
    p, li {
        font-size: 18px; /* Ensure paragraph and list text is readable */
    }

    /* Adjust shifts container */
    #shifts-container {
        flex-direction: column;
        gap: 5px;
    }

    /* Adjust teams container */
    #teams-container {
        max-height: 40vh;
    }
}

#signup-container > main {
    background-color: #fff;
    min-width: 280px;
}
.signup-step > button {
    margin-left: 50%;
    transform: translateX(-50%);
    min-width: 200px;

}

#verification-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    width: 100px;
    margin: 0 auto;
    text-align: center;
}