body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-size: 16px; /* Adjust base font-size if needed */
}
h1 {
    margin-top: 5px;

}

/* Container for the hamburger menu */
#menu {
    position: absolute;
    padding: 10px;
    z-index: 1000;
}

.hamburger-menu {
    cursor: pointer;
    margin-bottom: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: #333;
}

.menu-items {
    display: none;
    background-color: #f1f1f1;
    padding: 10px;
}

.menu-item {
    display: block;
    color: #333;
    text-decoration: none;
    margin: 5px 0;
}

#radioButtons, #dateSlider, #tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 5px 0;
}

#dateSlider div {
    width: 100%;  /* Adjust to fit the width of your container */
}

#dateSlider input[type="range"] {
    flex-grow: 1; /* Allows the slider to take up available space */
}

#tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on touch devices */
    justify-content: flex-start; /* Aligns tabs to the start */
    max-width: 100%; /* Adjust as necessary */
}

#tabs button {
    display: inline-block; /* Inline-block for horizontal layout */
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-bottom: none;
    padding: 5px 10px;
    margin-right: 2px;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

#tabs button:hover {
    background-color: #ddd;
}

#tabs button.active-tab-button {
    background-color: #fff;
    border-top: 2px solid #4CAF50; /* Highlight color for active tab */
}

.tab {
    border: 1px solid #ccc;
    padding: 10px;
}

.tab, .tooltip {
    display: none;
}

.active-tab {
    display: block;
}

.random-button-container {
    margin: 10px 0;
    display: flex;
    align-items: center;
}

.random-button {
    padding: 5px 10px;
    cursor: pointer;
}

.random-work-display {
    margin-left: 10px;
    color: gray;
}

.tooltip {
    position: absolute;
    background: white;
    border: 1px solid black;
    padding: 5px;
    border-radius: 5px;
}

.tooltip h4 {
    margin: 0;
}

.tooltip p {
    margin: 5px 0 0 0;
}

.calendar-tooltip-table {
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 12px;
    width: 100%;
}

.calendar-tooltip-table th {
    background: #f0f0f0;
    padding: 4px 6px;
    text-align: left;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
}

.calendar-tooltip-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
}

.calendar-tooltip-table tbody tr:last-child td {
    border-bottom: none;
}

.tooltip-close {
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 20px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

.tooltip-close:hover {
    color: #000;
}

.work-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    /*
    margin-bottom: 5px;
    gap: 10px;
    */
}

/* MISC tab needs wider first column for composer-prefixed titles */
#MISC .work-row {
    grid-template-columns: 130px 1fr;
}

.work-label-container {
    margin-left: 10px;
    min-width: 50px;
    white-space: nowrap;
}

.squares-container {
    display: flex;
    align-items: center;
    overflow-x: auto; /* In case of many squares */
}

.play-square {
    width: 10px;
    height: 10px;
    margin-right: 2px;
}

@media only screen and (max-width: 800px) { /* iPhone screen size (2x pixels)*/
    /* Adjust styles for smaller screens */
    body {
        font-size: 12px;
    }
    .tab {
        font-size: 12px;
    }
}

/* Player multiselect dropdown */
.player-multiselect {
    position: relative;
    display: inline-block;
}

.player-select-trigger {
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    min-width: 100px;
    user-select: none;
}

.player-select-trigger:hover {
    background: #f9f9f9;
}

.player-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.player-dropdown.open {
    display: block;
}

.player-option {
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.player-option:hover {
    background: #f1f1f1;
}

.player-option label {
    cursor: pointer;
    flex: 1;
}

.player-clear {
    padding: 4px 8px;
    border-bottom: 1px solid #ccc;
    color: #666;
    cursor: pointer;
    font-size: 0.9em;
}

.player-clear:hover {
    background: #f1f1f1;
}

/* Setup view styles */
#setupView {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.setup-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.setup-container h1 {
    margin-bottom: 10px;
}

.setup-container p {
    color: #666;
    margin-bottom: 20px;
}

#setupForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#dataUrlInput {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#dataUrlInput:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

#setupForm button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#setupForm button:hover {
    background-color: #45a049;
}

.setup-error {
    color: #E63946;
    font-size: 14px;
    text-align: left;
    display: none;
}

.setup-help {
    margin-top: 20px;
    font-size: 14px;
}

.setup-help a {
    color: #4CAF50;
    text-decoration: none;
}

.setup-help a:hover {
    text-decoration: underline;
}
