:root {
    --schedule-card-background: #a1cbf1ff;
    --schedule-card-border: var(--control-color);
}

/* Cities list */
.responsive-columns {
    column-count: 1;
    column-gap: 30px;
    margin: 0;
    padding: 0;
    list-style-position: inside;
}

@media (min-width: 768px) {
    .responsive-columns {
        column-count: 2; /* 2 columns on tablets */
    }
}

@media (min-width: 992px) {
    .responsive-columns {
        column-count: 3; /* 3 columns on desktops */
    }
}

.responsive-columns li {
    break-inside: avoid;
    padding: 8px 0;
}

/* Schedule tables */
.flight-schedule {
    background-color: var(--schedule-card-background);
    padding: var(--padding-default);
    border-radius: var(--corner-radius-default);
}

.flight-schedule .nav-tabs {
    border-bottom: var(--decor-underline-width) solid transparent;
    margin-bottom: var(--padding-small);
    display: flex;
}

.flight-schedule .tab-content > .tab-pane {
    display: none;
}

.flight-schedule .tab-content > .active {
    display: block;
}

.tab-input {
    display: none;
}

.nav {
  background-color: transparent !important;
}

.nav-link,
.tab-label {
  	font-family: 'Montserrat', 'open-sans';
	  font-weight: 500;
	  font-size: large;
	  min-height: 40px !important;
	  color: var(--text-common);
    display: inline-block;
    padding: 12px 24px;
    cursor: pointer;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    border-radius: var(--button-corner-radius);
    transition: all 0.3s ease;
    position: relative;
    margin-right: var(--padding-default);
}

.nav-link.active,
#departure-tab:checked ~ .nav-tabs .tab-label[for="departure-tab"],
#arrival-tab:checked ~ .nav-tabs .tab-label[for="arrival-tab"] {
    border-color: var(--alert-color) !important;
    background-color: var(--alert-color) !important;
    color: white !important;
}

/* Icons */
.sched-air-logo {
    max-width: 32px !important;
    max-height: 32px !important;
}

/* Active indicator line */
/* #arrival-tab:checked ~ .nav-tabs .tab-label[for="arrival-tab"]::after,
#departure-tab:checked ~ .nav-tabs .tab-label[for="departure-tab"]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: white;
} */

/* Show active tab content */
#arrival-tab:checked ~ .tab-content #tabArrival,
#departure-tab:checked ~ .tab-content #tabDeparture {
    display: block;
}

/* FIXED COLUMN WIDTHS - ELIMINATE JUMPING */
.flight-schedule table {
    table-layout: fixed;  /* Force fixed column widths */
    width: 100%;          /* Use full width */
    margin-bottom: 0;     /* Remove extra spacing */
    border-collapse: separate;
    border-spacing: 0;
}

/* Set specific column widths */
.flight-schedule th.sched-item:nth-child(1),  /* Airline */
.flight-schedule td.sched-item:nth-child(1) {
    width: 22%;
    padding-left: 15px;
}

.flight-schedule th.sched-item:nth-child(2),  /* Flight number */
.flight-schedule td.sched-item:nth-child(2) {
    width: 18%;
}

.flight-schedule th.sched-item:nth-child(3),  /* Arrival/Departure time */
.flight-schedule td.sched-item:nth-child(3) {
    width: 16%;
}

.flight-schedule th.sched-item:nth-child(4),  /* Days */
.flight-schedule td.sched-item:nth-child(4) {
    width: 28%;
}

.flight-schedule th.sched-item:nth-child(5),  /* Period */
.flight-schedule td.sched-item:nth-child(5) {
    width: 16%;
    padding-right: 15px;
}

.flight-schedule .table-dark th {
    background-color: var(--accent-color) !important;
    color: white !important;
}

/* Control text overflow and alignment */
.sched-item {
    font-family: 'Montserrat', 'open-sans';
    font-weight: 400;
    font-size: large;
    min-height: 40px !important;
    color: var(--text-common);
    word-wrap: break-word; /* Legacy for old browsers */
    overflow-wrap: break-word; /* Modern standard */
    white-space: normal; /* Or simply remove the nowrap */

    padding: 10px 8px;
    vertical-align: middle;
    border-bottom-color: var(--control-color);
}

/* .flight-schedule th.sched-item {
    font-family: 'Montserrat', 'open-sans';
    font-weight: 500;
    font-size: large;
    min-height: 40px !important;
    color: var(--text-common);

    padding: 14px 8px;
    vertical-align: middle;
    background-color: #343a40;
    color: white;
    border: none;
    position: sticky;
    top: 0;
} */

tbody#Arrival.sched-scrollable-tbody * td.sched-item-link,
tbody#Departure.sched-scrollable-tbody * td.sched-item-link,
.sched-item-link {
    font-family: 'Montserrat', 'open-sans';
    font-weight: 400;
    font-size: large;
    min-height: 40px !important;
    border-bottom-color: var(--control-color);
    color: var(--text-link-color) !important;
    text-decoration: underline !important;

    word-wrap: break-word;
    /* Legacy for old browsers */
    overflow-wrap: break-word;
    /* Modern standard */
    white-space: normal;
    /* Or simply remove the nowrap */
    padding: 10px 8px;
    vertical-align: middle;
}

/* Striped table rows */
.flight-schedule .table-striped tbody tr:nth-of-type(odd) {
    /* background-color: rgba(255, 255, 255, 0.05); */
}

.flight-schedule .table-striped tbody tr:nth-of-type(even) {
    /* background-color: rgba(255, 255, 255, 0.1); */
}

.flight-schedule .table-striped tbody tr:hover {
    /* background-color: rgba(255, 255, 255, 0.15); */
}

/* Table border styling */
.flight-schedule .table-responsive {
    /* border: 1px solid var(--control-color); */
    border-radius: var(--corner-radius-small);
    overflow: hidden;
}

.flight-schedule .table {
    margin-bottom: 0;
    border: none;
}

.desktop-text {
    display: inline;
}
.mobile-text {
    display: none;
}

/* Mobile: show mobile text, hide desktop */
@media (max-width: 1000px) {
    .desktop-text {
        display: none;
    }
    .mobile-text {
        display: inline;
    }
}

/* For responsive design on mobile */
@media (max-width: 768px) {
    .nav-item {
      margin-top: var(--padding-small);
      margin-left: 0px !important;
    }
    .nav-link,
    a.nav-link {
      width: 100% !important;
      text-align: center;
    }
    
    .tab-label {
      margin-right: 0px;
    }

    .flight-schedule .table-responsive {
        overflow-x: auto;
    }
    
    .flight-schedule table {
        min-width: 650px; /* Ensure table doesn't get too narrow */
    }
    
    .flight-schedule .nav-tabs {
        flex-direction: column;
    }
    
    .tab-label {
        margin-bottom: 5px;
        border-radius: 6px;
        text-align: center;
    }
    
    #arrival-tab:checked ~ .nav-tabs .tab-label[for="arrival-tab"],
    #departure-tab:checked ~ .nav-tabs .tab-label[for="departure-tab"] {
        border-radius: 6px;
    }
    
    #arrival-tab:checked ~ .nav-tabs .tab-label[for="arrival-tab"]::after,
    #departure-tab:checked ~ .nav-tabs .tab-label[for="departure-tab"]::after {
        display: none;
    }
}

/* Alert styling */
.flight-schedule .alert {
    border-radius: 6px;
    border: 1px solid transparent;
    margin: 20px 0;
}

.flight-schedule .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.flight-schedule .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}
