/* ----------------------------------------
   Board Container
   ---------------------------------------- */
.fb-board {
    background-color: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* ----------------------------------------
   Filter Bar (Tabs + Search)
   ---------------------------------------- */
.fb-filter-bar {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-gray);
}

.fb-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.fb-tab {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition-normal);
}

.fb-tab:hover {
    background-color: var(--light-gray);
}

.fb-tab:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.fb-tab.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.fb-tab i {
    font-size: 0.85rem;
}

.fb-search-wrapper {
    position: relative;
}

.fb-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mid-gray);
    font-size: 0.9rem;
    pointer-events: none;
}

.fb-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition-normal);
    box-sizing: border-box;
    color: var(--dark-gray);
}

.fb-search-input::placeholder {
    color: var(--mid-gray);
}

/* A real ring, not a tint. The former 10%-alpha box-shadow was effectively
   invisible on white, so a keyboard user tabbing into the search lost all trace
   of where they were (WCAG 2.4.7). */
.fb-search-input:focus {
    border-color: var(--primary-color);
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ----------------------------------------
   Show Earlier / Hide Toggle
   ---------------------------------------- */
.fb-toggle-earlier {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--light-gray);
    border: none;
    border-bottom: 1px solid var(--border-gray);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background-color var(--transition-normal);
}

.fb-toggle-earlier:hover {
    background-color: #eaeaea;
}

.fb-toggle-earlier:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.fb-toggle-earlier i {
    font-size: 0.7rem;
    transition: transform var(--transition-normal);
}

.fb-toggle-earlier.expanded i {
    transform: rotate(180deg);
}

/* ----------------------------------------
   Flight Rows
   ---------------------------------------- */
.fb-flight-list {
    min-height: 200px;
}

/* ----------------------------------------
   Flight Table
   ---------------------------------------- */
.fb-table {
    width: 100%;
    border-collapse: collapse;
}

.fb-table thead {
    background-color: var(--light-gray);
}

.fb-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.fb-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--border-gray);
    font-size: 0.95rem;
    vertical-align: middle;
}

.fb-table tbody tr:hover {
    background-color: var(--light-gray);
}

.fb-table tbody tr.past-flight {
    opacity: 0.5;
}

/* Time column */
.fb-table .fb-time {
    font-weight: 600;
    white-space: nowrap;
}

.fb-time-original {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 0.8rem;
    display: block;
    line-height: 1.2;
}

.fb-time-updated {
    color: #856404;
    font-weight: 700;
    display: block;
    line-height: 1.3;
}

/* City column */
.fb-table .fb-route-city {
    font-weight: 600;
    color: var(--dark-gray);
}

/* Flight number column */
.fb-table .fb-flight-number {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Type column — plain text */
.fb-type-text {
    font-size: 0.85rem;
    color: var(--mid-gray);
    font-weight: 500;
}

/* Gate column */
.fb-table .fb-gate-cell {
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

/* Status badges inside table */
.fb-table .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.fb-table .status-badge i {
    font-size: 0.7rem;
}

.fb-table .status-ontime {
    background-color: #d4edda;
    color: #155724;
}

.fb-table .status-delayed {
    background-color: #fff3cd;
    color: #856404;
}

.fb-table .status-arrived {
    background-color: #cce5ff;
    color: #004085;
}

.fb-table .status-departed {
    background-color: #cce5ff;
    color: #004085;
}

.fb-table .status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* Empty/Loading/Error cells */
.fb-loading-cell,
.fb-empty-cell,
.fb-error-cell {
    text-align: center;
    padding: 3rem 1.5rem;
}
/* ----------------------------------------
   Empty / Loading / Error States
   ---------------------------------------- */
.fb-loading,
.fb-empty,
.fb-error {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--mid-gray);
}

.fb-loading i,
.fb-empty i,
.fb-error i {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.fb-empty i {
    color: var(--primary-color-light);
}

.fb-error i {
    color: var(--accent-color);
}

.fb-loading p,
.fb-empty p,
.fb-error p {
    margin: 0.25rem 0;
}

.fb-empty .fb-empty-title,
.fb-error .fb-error-title {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1rem;
}

.fb-error a,
.fb-empty a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ----------------------------------------
   Board Footer
   ---------------------------------------- */
.fb-footer {
    padding: 0.875rem 1.5rem;
    border-top: 1px solid var(--border-gray);
    background-color: var(--off-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fb-footer-info {
    font-size: 0.85rem;
    color: var(--mid-gray);
    margin: 0;
}

.fb-footer-info i {
    margin-right: 0.35rem;
}

.fb-footer-info a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}

.fb-footer-info a:hover {
    color: var(--primary-color-dark);
}

.fb-footer-count {
    font-size: 0.8rem;
    color: var(--mid-gray);
}

/* ----------------------------------------
   Monthly Schedule Info Box
   ---------------------------------------- */
.fb-schedule-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: rgba(9, 73, 137, 0.06);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 2.5rem;
}

.fb-schedule-link-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fb-schedule-link-title {
    font-weight: 600;
    color: var(--primary-color);
}

.fb-schedule-link-title i {
    margin-right: 0.35rem;
}

.fb-schedule-link-subtitle {
    color: var(--mid-gray);
    font-size: 0.9rem;
}

.fb-schedule-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition-normal);
}

.fb-schedule-link a:hover {
    color: var(--primary-color-dark);
}

/* ============================================
   RESPONSIVE - TABLET (991px)
   ============================================ */
@media (max-width: 991.98px) {
    .fb-table th,
    .fb-table td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (767px)
   ============================================ */
@media (max-width: 767.98px) {
    .fb-filter-bar {
        padding: 1rem;
    }

    .fb-tabs {
        gap: 0.15rem;
    }

    .fb-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .fb-table th,
    .fb-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .fb-time-original {
        font-size: 0.75rem;
    }

    .fb-footer {
        flex-direction: column;
        text-align: center;
    }

    .fb-schedule-link {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (480px)
   ============================================ */
@media (max-width: 480px) {
    .fb-tab {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .fb-tab i {
        font-size: 0.75rem;
    }

    .fb-search-input {
        font-size: 0.9rem;
        padding: 0.625rem 0.875rem 0.625rem 2.25rem;
    }

    .fb-table th,
    .fb-table td {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .fb-time-original {
        font-size: 0.75rem;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .fb-toggle-earlier i {
        transition: none;
    }
}