body {
    font-family: 'Roboto', sans-serif;
}

:root {
    --numberOfColumns: -1;
    --numberOfRows: -1;
}
.cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.button {
    width: 100px;
    height: 50px;
    font-size: 16px;
    background-color: #f0f0f0;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;      /* vertical */
    justify-content: center;  /* horizontal */
    margin-top: 5px;
    border: 2px solid black;
}


.thick_border {
    border-radius: 20px;
}
.thin_border {
    border-radius: 0px;
}

.label {
    display: flex;
    justify-content: center; /* Center-align horizontally */
    align-items: center; /* Center-align vertically */
    font-weight: bold;
    padding: 5px;
    text-align: center;
}

.dropdown {
    width: 100px;
    height: 30px;
    font-size: 16px;
    text-align-last:center;
}

.active-dropdown {
    border: 2px solid;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.dropdown_comment {
    width: 100px;
    height: 30px;
    font-size: 16px;
}

.top-bar {
    background-color: #f0f0f0;
    display: inline-flex;
    padding: 10px;
    align-items: center;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Creates the floating shadow effect */
    top: 30px;
    width: 100%;
    z-index: 25; /* Ensures the bar stays above other elements */
}
.checkbox-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.checkbox-container input {
    margin-right: 5px;
}

.main-container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
}

.button-container-parent {
      overflow-x: scroll;
      scrollbar-gutter: stable;
    /* space for horizontal scrollbar (if it appears) */
    padding-bottom: 32px;
}

.button-container-parent {
    scrollbar-width: auto;
    scrollbar-color: #888 #f1f1f1;
}



.button-container {
    display: grid;
    grid-template-rows: repeat(var(--numberOfRows), auto);
    grid-template-columns: repeat(var(--numberOfColumns), 1fr); /* 1 auto for row labels + 8 buttons */
    justify-items: center; /* Center the buttons */
    align-items: center;
    gap: 10px;
}

.date-column {
    display: grid;
    grid-template-rows: repeat(var(--numberOfRows), auto);
    padding-bottom: 32px;
}

.date-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  white-space: nowrap;
}

.view-section {
    display: none; /* Hide elements by default */
}

.view-section.active-roster {
    display: grid; /* Show only when both classes are present */
}
.view-section.driver-management-active {
    display: block; /* Show only when both classes are present */
}
.view-section.checkin-management-active {
    display: block; /* Show only when both classes are present */
}
.view-section.token-management-active {
    display: block; /* Show only when both classes are present */
}

.divider {
    width: 1px;
    height: 20px;
    background-color: #ccc;
    margin-right: 10px;
}

.checkbox-container span {
    font-size: 14px;
}

/* Hide dropdowns by default */
.hidden {
    display: none;
}

.table-button {
    background-color: #f0f0f0;
    cursor: pointer;
    text-align: center;
    padding: 5px;
    gap: 8px;
    margin-right: 10px;
}

.row-added
{
    background-color: #d4edda !important; /* Light green */
}
.row-deleted {
    background-color: #f8d7da !important; /* Light red */
}
.cell-updated {
    background-color: #fff3cd !important; /* Light yellow */
}
.main-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-button:hover {
    background: #0056b3;
}

.menu-toggle {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 123, 255, 0.8);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    z-index: 10;  /* Appears above button */
}

.menu-toggle:hover {
    background: rgba(0, 123, 255, 1);
}
.menu-toggle::before {
    content: '▼';
    font-size: 10px;
}
.popup-menu {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-modal {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.form-modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    display: grid;
    grid-template-columns: 120px auto;
    align-items: center;
    margin-bottom: 8px;}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.btn-save {
    background-color: #28a745;
    color: white;
}

.btn-save:hover {
    background-color: #218838;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background-color: #5a6268;
}
.popup-menu.active {
    display: block;
}
.hover-menu {
    position: absolute;
    top: 25px;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
    display: none;  /* Hidden by default */
}

.hover-menu.show {
    display: block;  /* Shown when 'show' class is added */
}

.menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #eee;
}

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

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.menu-item:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.result {
    margin-top: 20px;
    padding: 10px;
    background: #e8f5e8;
    border-radius: 4px;
    min-height: 30px;
}

.controls {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
}

.controls button {
    margin: 5px;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.controls button:hover {
    background: #218838;
}


 /* --- CSS STYLES --  Scrollable Horizontal Menu --- */

/*body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
}*/

/* Container for the entire menu (including arrows) */
#menu-container {
    display: flex; /* Use flex to align the fixed buttons and the scrollable content */
    align-items: center;
    width: 100%;
    max-width: 900px; /* Wider max width for more content */
    margin: 20px auto;
    background-color: #ffffff;
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* The inner content wrapper that actually scrolls */
#button-bar {
    flex-grow: 1; /* Allows the bar to take up the available space */
    display: flex; /* Inner buttons are also displayed as flex items */
    overflow-x: hidden; /* **Key Feature:** Hides the scrollbar, and content is clipped */
    scroll-behavior: smooth; /* Smooth scrolling when programmatically moved */
    white-space: nowrap; /* Ensures buttons stay on a single line */
}

/* Style for the fixed arrow buttons */
.scroll-button {
    background: none;
    border: none;
    font-size: 28px;
    padding: 0 10px;
    cursor: pointer;
    color: #555;
    outline: none;
    flex-shrink: 0; /* Prevents the arrow buttons from shrinking */
    transition: color 0.2s, background-color 0.2s;
}

.scroll-button:hover:not(:disabled) {
    background-color: #e0e0e0;
    border-radius: 4px;
}

.scroll-button:disabled {
    color: #ccc;
    cursor: not-allowed;
}


/* Style for the dynamic list buttons */
.menu-item-button {
    padding: 10px 18px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 25px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s, border-color 0.2s;
    flex-shrink: 0; /* Prevents the item buttons from shrinking in the button-bar */
}

.menu-item-button:hover {
    background-color: #e9e9e9;
    border-color: #bbb;
}

.menu-item-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}

.no-spinners::-webkit-outer-spin-button,
.no-spinners::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Hide the native number input spinners (arrows) on Firefox */
.no-spinners {
    -moz-appearance: textfield;
}

/* Base style for the input control, making it touch-friendly and consistent height */
.input-control {
    width: 100%;
    height: 3rem;
    padding: 0.5rem 0;
}

/* Base style for buttons */
.btn-base {
    width: 3rem;
    height: 3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
