* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Lato", sans-serif;
    font-style: normal;
    font-size: 1rem;
    color: #000;
}

/* Color variables */
:root{
    --main-blue: #eff6ff;
    --accent-blue: #3b82f6;
    --gray-background: #f8f9fa;
    --success-green-background: #d1e7dd;
    --error-red-background: #f8d7da;
    --error-red-border: #f5c6cb;
    --darker-gray: #ddd;
    --warning-yellow-background: #fff7d0;
    --warning-yellow-border: #c18128;
    
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    background-color: #eff6ff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
    max-height: 56px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 900;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main layout styles */
.main-layout {
    display: flex;
    flex: 1;
    position: relative;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

/* Sidebar styles */
.sidebar {
    width: 12rem;
    background-color: white;
    padding: 1rem;
    position: relative; /* Ensure correct stacking context */
    height: 100%;
    display: flex;
    flex-direction: column; /* Align items vertically */
    justify-content: space-between; /* Space out menu and login button */
}

.menu {
    list-style: none;
}

.menu li {
    margin-bottom: 0.5rem;
}

.menu-item {
    width: 100%;
    text-align: left;
    padding: 0.7rem 1rem;
    border-radius: 0.25rem;
    background-color: white;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 1rem;
    text-decoration: none;
}

button {
    font-family: inherit; /* Inherits font from parent */
    font-size: 0.875rem; /* Slightly smaller font size for button text */
    padding: 0.4rem .8rem; /* Padding for height and width */
    border: none; /* No border */
    border-radius: 4px; /* Rounded corners */
    background: none; /* Transparent background */
    cursor: pointer; /* Cursor style */
    transition: all 0.2s ease; /* Smooth transition for hover effects */
}

button:hover {
    background-color: #3b82f6; /* Background on hover */
    color: white; /* Text color on hover */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Slight elevation for depth */
}

.reset-password, .delete-user {
    margin-right: 0.5rem; /* Space between buttons */
}

.reset-password {
    /* If you want a different style for the reset password button */
    border: 1px solid #3b82f6; /* Border for distinction */
}

.delete-button {
    color: #8b0000;
    background-color: rgba(255, 0, 0, 0.1); /* Very faint red background */
}

.delete-button:hover {
    background-color: #ff0000; /* Red background on hover to signify danger */
}

.menu-item i {
    width: 1.25rem;
    height: 1.25rem;
}

.menu-item:hover {
    background-color: var(--main-blue);
    color: #000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(0.25rem);
}

.menu-item.active {
    background-color: var(--main-blue);
    color: #fff;
}

/* Sub-menu styling */
.sub-menu {
    display: block; /* Hide by default, will be toggled */
    list-style: none;
    padding-left: 10px;  /* Indentation for sub-menu items */
    margin-top: 5px;
    background-color: #f9f9f9; /* Lighter background for sub-menu */
    border-left: 3px solid var(--accent-blue);
}

.sub-menu li {
    margin-bottom: 5px;
}

.sub-menu li a {
    display: block; /* Make the link block-level for better click area */
    padding: 8px 10px;  /* Add padding to match menu item style */
    color: #333; /* Default text color */
    font-size: 0.9rem; /* Slightly smaller font size */
    text-decoration: none; /* Remove underline */
    transition: background-color 0.2s ease, color 0.2s ease; /* Smooth hover transition */
}

.sub-menu li a:hover {
    background-color: #eff6ff;  /* Background change on hover */
    color: #000; /* Darker text color on hover */
}

/* Sub-menu items that are hovered */
.sub-menu li a:hover {
    background-color: #e0e0e0; /* Slightly different background on hover */
}

/* For the sub-menu toggle button */
.menu-item .sub-menu-toggle {
    font-size: 0.9rem;  /* Smaller font size for the toggle */
    margin-left: 10px;
    color: #aaa;
}

.sub-menu-toggle:hover {
    color: var(--accent-blue);
}

.score-form {
    background-color: var(--gray-background);
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.score-form .form-header {
    text-align: center;
    margin-bottom: 20px;
}

.score-form .form-header h3 {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: 700;
}

.judge-input, .search-form {
    width: 100%;
    border: 1px solid #ccc;
    padding: 0.75rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    transition: box-shadow 0.2s ease-in-out;
    text-align: center;
}

.judge-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.score-form .form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.score-form .form-group {
    margin-bottom: 1rem;
}

/* Darkened background for the rest of the page */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999;
    display: none;
}

/* Modal base styling */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    background: #fff; /* Default background */
    color: #333; /* Default text color */
    max-width: 80%; /* Max width */
    width: 600px; /* Fixed width for larger screens */
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 15px; /* Rounded corners */
    display: none;
}

/* Show modal and overlay when modal is open */
body.modal-open .modal-overlay,
body.modal-open .modal {
    display: block;
}

.modal p {
    font-size: 3.2rem;
    font-weight: 900;
    padding: 40px 0px;
}

/* Junior level modal */
.modal.junior {
    background: var(--main-blue);
    border: 4px solid var(--accent-blue);
}

/* Senior level modal */
.modal.senior {
    background: #fcdc79;
    border: 4px solid #cc9d10;
    color: black;
}

.totals {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.scoring-total {
    font-size: 0.875rem;
    padding: .7rem;
    border-radius: 4px;
    background: var(--accent-blue);
    color: #fff;
    width: 20%;
    text-align: center;
}

/* Main content styles */
.content {
    flex: 1;
    background-color: #f9fafb;
    padding: 1.5rem;
    justify-content: center;
}

.content-container {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
}

.page-title {
    margin-bottom: 1.5rem;
    font-size: 1.7rem;
    color: #000;
    font-weight: 900;
}

.page-subtitle {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.4em;
    color: #000;
}

.registration-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    transition: all 0.2s ease-in-out;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-group {
    margin-top: 1.5rem;
    text-align: center;
}

.submit-button {
    padding: 0.5rem 1rem;
    background-color: var(--accent-blue);
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.75rem;
    color: #ffffff; /* White text for high contrast */
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase; /* Optional for emphasis */
    cursor: pointer; /* Pointer cursor for better affordance */
}

.submit-button:hover {
    background-color: var(--accent-blue);
    color: #ffffff; /* Ensure text remains white */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px); /* Lift effect */
    font-weight: 700; /* Slightly bolder text */
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination a {
    color: black;
    float: left;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 4px;
    transition: background-color .3s;
    font-size: .8rem;
}

.pagination a.active {
    background-color: var(--accent-blue);
    color: white;
    border: 1px solid var(--accent-blue);
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/*TOAST NOTIFICATIONS */
.toast.success {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background-color: var(--success-green-background);
    border: 1px solid #badbcc;
    border-radius: 0.5rem;
    color: #0f5132;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    animation: slide-down 0.3s ease-in-out, fade-out 0.5s ease-in-out 4.5s forwards;
    pointer-events: all;
}

.toast.error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background-color: var(--error-red-background);
    border: 1px solid var(--error-red-border);
    border-radius: 0.5rem;
    color: #721c24; /* Dark red text */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    animation: slide-down 0.3s ease-in-out, fade-out 0.5s ease-in-out 10s forwards;
    pointer-events: all;
}

.toast.warning {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background-color: var(--warning-yellow-background);
    border: 1px solid var(--warning-yellow-border);
    border-radius: 0.5rem;
    color: #856404; /* Dark yellow text */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    animation: slide-down 0.3s ease-in-out, fade-out 0.5s ease-in-out 10s forwards;
    pointer-events: all;
}

.toast.error.persistent, .toast.warning.persistent {
    animation: slide-down 0.3s ease-in-out;
}

.room-callout-complete {
    font-size: .8rem;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: var(--success-green-background);
}

.completion-percentage {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: .8rem;
    font-weight: bold;
    color: #666;
    padding: 4px 8px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.8);
    display: block; /* Ensure it is always displayed */
}

.completion-percentage.complete {
    color: #2d9d3f;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 55px; /* Adjust based on header height */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    width: 50%; /* Make it responsive */
    max-width: 500px; /* Prevent it from stretching too wide */
    pointer-events: none; /* Avoid blocking interactions below */
}

.password-reset-link {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: var(--accent-blue);
    margin-top: 1rem;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.password-reset-link:hover {
    color: var(--accent-blue);
}

.table-wrapper {
    overflow-x: auto; /* Enable horizontal scrolling for small screens */
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

th, td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #ddd;
    font-size: .9rem;
}

th {
    background-color: var(--darker-gray);
    font-weight: bold;
}

tr:nth-child(odd) {
    background-color: var(--main-blue);
}

tr:nth-child(even) {
    background-color: #ffffff;
}

/* Check-In Table */
table.checkin th:nth-child(1), table.checkin td:nth-child(1) { width: 25%; } /* Name column */
table.checkin th:nth-child(2), table.checkin td:nth-child(2) { width: 25%; } /* Instrument column */
table.checkin th:nth-child(3), table.checkin td:nth-child(3) { width: 30%; } /* School column */
table.checkin th:nth-child(4), table.checkin td:nth-child(4) { width: 20%; } /* Actions column */

/* Results Table */
table.descriptive-results th:nth-child(1), table.descriptive-results td:nth-child(1) { width: 10%; } /* Rank column */
table.descriptive-results th:nth-child(2), table.descriptive-results td:nth-child(2) { width: 25%; } /* Name column */
table.descriptive-results th:nth-child(3), table.descriptive-results td:nth-child(3) { width: 20%; } /* School column */
table.descriptive-results th:nth-child(4), table.descriptive-results td:nth-child(4) { width: 10%; } /* Scores column */
table.descriptive-results th:nth-child(4), table.descriptive-results td:nth-child(5) { width: 10%; } /* Scores column */
table.descriptive-results th:nth-child(4), table.descriptive-results td:nth-child(6) { width: 10%; } /* Scores column */
table.descriptive-results th:nth-child(4), table.descriptive-results td:nth-child(7) { width: 10%; } /* Scores column */
table.descriptive-results th:nth-child(4), table.descriptive-results td:nth-child(8) { width: 5%; } /* # column */

.dashboard-tiles {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next row */
    gap: 20px; /* Creates spacing between items */
    width: 100%;
}

.tile {
    flex: 1 1 calc(33.333% - 20px); /* 1/3 width minus gap adjustment */
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tile-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--accent-blue);
}

.room-tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 5px;
    margin-top: 5px;
}

.room-tile {
    background: var(--gray-background);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
    position: relative;
}

.room-tile:hover {
    transform: scale(1.05);
}

.room-tile .room-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.room-tile .room-stats {
    font-size: 14px;
    color: #000;
}

/* Container for settings */
.settings-container {
    width: 300px;
    margin: 20px;
}

/* Switch Style */
.switch {
    position: relative;
    display: inline-block;
    margin-top: 15px;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    border-radius: 50%;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

label {
    font-weight: bold;
    display: block;
}

.help-container {
    width: 75%;
    margin: 20px auto;
    background: #fff;
    padding: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.accordion {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 25px;
}

.accordion-item {
    border-bottom: 1px solid #ddd;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-button {
    background-color: var(--gray-background);
    color: #000;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: background-color 0.2s ease;
    font-size: 1rem;
    font-weight: 900;
}

.accordion-button:hover, .accordion-button[aria-expanded="true"] {
    background-color: var(--gray-background);
    color: #000;
}

.accordion-content {
    padding: 18px;
    display: none;
    background-color: #fff;
    padding: 15px 25px 10px 25px;
}

.accordion-content ul {
    padding-left: 25px; /* Adjust this value to set how far from the left the list should be */
}

.accordion-content li {
    margin-left: 0; /* Resetting the margin to 0 since we are using padding on the ul */
}

.accordion-content p {
    margin-bottom: 15px;
}

.accordion-content p:last-child {
    margin-bottom: 5px;
}

/* Accessibility: Focus styles for keyboard users */
.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Green background for completed rooms */
.room-tile.complete {
    background-color: var(--success-green-background);
    color: white;
}

/* Red background for incomplete rooms */
.room-tile.incomplete {
    background-color: var(--error-red-background);
    border: 1px solid var(--error-red-border);
    color: white;
}

.room-tile {
    padding: 15px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-notice {
    background: var(--warning-yellow-background);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    padding: .9rem;
    width: 50%;
    margin: auto;
    color: var(--warning-yellow-border);
    text-align: center;
    font-size: .9rem;
    margin-bottom: 1rem;
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make table more responsive on smaller screens */
@media (max-width: 768px) {
    #edit-modal {
        width: 90%;
        padding: 1.5rem;
    }
}

/* Fade-in Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* Animations */
@keyframes slide-down {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fade-out {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Responsive Adjustments */
@media (max-width: 932px) {
    * {
        font-size: .9rem;
    }

    .toast-container {
        width: 70%;
    }

    .toast {
        font-size: 0.9rem;
    }

    .submit-button {
        padding: .8rem 1.8rem;  /* Increase padding for a larger button */
        font-size: 1rem;   /* Increase font size for better readability */
    }

    .form-input {
        padding: .8rem 1.8rem;  /* Increase padding for a larger button */
        font-size: 1rem;   /* Increase font size for better readability */
    }

    .scoring-total {
        font-size: 0.875rem;
        padding: .7rem;
        border-radius: 4px;
        background: var(--accent-blue);
        color: #fff;
        width: 30%;
        text-align: center;
    }

    .menu-toggle {
        display: block;
        color: #000;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 100;
        padding-top: 4rem;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .menu-open .sidebar {
        transform: translateX(0);
    }

    /* Add overlay when menu is open */
    .menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 90;
    }

    .content {
        padding: 1rem;
    }

    .dashboard-tiles {
        gap: 10px;
    }

    .scoring-page-notice {
        background: var(--warning-yellow-background);
        border-radius: 1rem;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        padding: .9rem;
        width: 90%;
        margin: auto;
        color: var(--warning-yellow-border);
        text-align: center;
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .menu-item {
        padding: 0.75rem;
    }

    .content {
        padding: 0.5rem;
    }

    .content-container {
        padding: 1rem;
    }
}