#flightdata-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

#flightdata-table th, #flightdata-table td {
    border-top: 1px solid #f9f9f9;
    padding: 12px 15px;
    text-align: left;
}

#flightdata-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#flightdata-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#flightdata-table tbody tr:hover {
    background-color: #e0e0e0;
}

/* Highlight rows where remarks = 'Arrived' */
#flightdata-table tbody tr.arrived {
    background-color: #C3E6CB;
}

/* Highlight rows where remarks = 'Delayed' */
#flightdata-table tbody tr.delayed {
    background-color: #F5C6CB;
}

/* Style for the refresh row */
#flightdata-table tbody #refresh-row {
    background-color: #f2f2f2 !important;
}

/* Buttons */
.primary-button {
    color: #297abc; /* Blue text for non-active buttons */
    background-color: transparent; /* No background for non-active buttons */
    border: 1px solid transparent; /* No border */
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    text-decoration: underline; /* Underlined text */
}

.primary-button:hover {
    color: #007bff;
    background-color: #e0e0e0; /* Light grey background on hover */
}

.primary-button:focus {
    outline: none;
}

.primary-button:disabled {
    color: #007bff;
    background-color: transparent;
    border-color: transparent;
    cursor: not-allowed;
}

.primary-button.active {
    color: #fff;
    background-color: #297abc;
    border: 1px solid #297abc;
    text-decoration: none;
}

.primary-button.active:hover {
    color: #fff;
    background-color: #297abc; /* Darker blue on hover */
    border-color: #297abc;
}

.primary-button:active {
    color: #fff;
    background-color: #0062cc;
    border-color: #005cbf;
}

.primary-button:active:focus {
    box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
    outline: none;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropdown-toggle {
    background-color: #297abc;
    color: white;
}

#schedule-wrapper {
    padding: 20px;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    overflow: hidden;
}

/* Default: Desktop */
body.desktop #flightdata-table {
    display: table !important;
}

/* Mobile layout override */
body.mobile #flightdata-table {
    display: block !important;
}

/* Explicitly force mobile styles when detected */
@media (max-width: 768px) {
    body:not(.desktop) #flightdata-table {
        display: block !important;
    }
    body.desktop #flightdata-table {
        display: table !important;
    }
}

/* Explicitly force desktop styles when detected */
@media (min-width: 769px) {
    #flightdata-table {
        display: table !important;
    }
}

/* add thick blue left border on mobile stacked view */
@media (max-width: 768px) {
    .expanded-content {
        border-left: 4px solid #297abc !important;
        padding-left: 10px;
    }
}

body {
    visibility: hidden;
}

body.desktop,
body.mobile {
    visibility: visible;
}
