/* ══════════════════════════════════════════
   FRC — Flight Result Card (common/flight/*)
   Self-contained, flexbox-based, responsive at every width —
   replaces the old bootstrap-grid-column card that broke/overlapped
   when the window/viewport got narrow.
   ══════════════════════════════════════════ */

.frc-card {
    background: #fff;
    border: 1px solid #e9ecf3;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

/* ── Top row: airline + price ── */
.frc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.frc-airline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.frc-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}
.frc-airline-info { min-width: 0; }
.frc-airline-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frc-flightno {
    font-size: 11.5px;
    color: #6b7280;
    font-weight: 600;
}
.frc-price-box {
    text-align: right;
    flex-shrink: 0;
}
.frc-price-old {
    display: block;
    text-decoration: line-through;
    color: #9aa5b1;
    font-size: 12px;
}
.frc-price {
    font-size: 20px;
    font-weight: 800;
    color: #0D1B5E;
    white-space: nowrap;
}

/* ── Route row: departure — duration — arrival ── */
.frc-route-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    flex-wrap: wrap;
}
.frc-route-label {
    font-size: 11px;
    font-weight: 800;
    color: #0D1B5E;
    text-transform: uppercase;
    letter-spacing: .04em;
    width: 100%;
    margin-bottom: 2px;
}
.frc-endpoint {
    flex: 1;
    min-width: 90px;
}
.frc-endpoint-arr { text-align: right; }
.frc-time {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.15;
}
.frc-code {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
}
.frc-date, .frc-airport-name {
    font-size: 11px;
    color: #9aa5b1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.frc-duration-box {
    flex: 1.4;
    min-width: 110px;
    max-width: 220px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.frc-duration-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 3px;
}
.frc-duration-line {
    width: 100%;
    height: 1px;
    background: #d7dbe4;
    position: relative;
    margin-bottom: 3px;
}
.frc-duration-line::before, .frc-duration-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #9aa5b1;
    transform: translateY(-50%);
}
.frc-duration-line::before { left: 0; }
.frc-duration-line::after  { right: 0; }
.frc-stops {
    font-size: 11px;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Badges row (Refundable / Seats / Cabin / Baggage) ── */
.frc-badges { margin: 6px 0; }
.frc-badges .badge { margin-bottom: 4px; }

/* ── Actions row: Select + Show Details ── */
.frc-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid #f1f2f6;
    margin-top: 6px;
}
.frc-select-btn {
    background: #0D1B5E;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s;
}
.frc-select-btn:hover { background: #1a3a8f; }
.frc-details-toggle {
    font-size: 13px;
    color: #6b7280 !important;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
}
.frc-details-toggle:hover { color: #0D1B5E !important; }
.frc-details-toggle i { margin-left: 4px; transition: transform .15s; }
.frc-details-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

/* ── Round-trip divider between legs ── */
.frc-leg-divider {
    border-top: 1px dashed #e9ecf3;
    margin: 10px 0;
}

/* ══════════════════════════════════════════
   FRC Sidebar — search summary + sort + filters
   ══════════════════════════════════════════ */
.frc-sidebar {
    background: #fff;
    border: 1px solid #e9ecf3;
    border-radius: 10px;
    padding: 16px;
}
.frc-sb-route {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f2f6;
    margin-bottom: 10px;
}
.frc-sb-route i { color: #0D1B5E; margin: 0 4px; font-size: 12px; }
.frc-sb-route-cities { font-size: 11.5px; color: #9aa5b1; font-weight: 500; margin-top: 2px; }

.frc-sb-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.frc-sb-summary-title { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.frc-sb-summary-count { font-size: 12px; color: #6b7280; }
.frc-sb-summary-count span { color: #C62828; font-weight: 700; }
.frc-sb-timer { font-size: 12px; color: #6b7280; font-weight: 600; white-space: nowrap; }

.frc-sb-filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    padding: 10px 0;
    border-top: 1px solid #f1f2f6;
    border-bottom: 1px solid #f1f2f6;
    margin-bottom: 12px;
}
.frc-sb-filters-head i { color: #0D1B5E; margin-right: 6px; }
.frc-sb-filter-count {
    background: #C62828;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.frc-sort-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.frc-sort-btn {
    flex: 1;
    background: #fff;
    border: 1px solid #d0d5dd;
    color: #344054;
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 6px;
    border-radius: 6px;
    cursor: pointer;
}
.frc-sort-btn.active { background: #0D1B5E; border-color: #0D1B5E; color: #fff; }

.frc-sb-section { margin-bottom: 14px; }
.frc-sb-label { font-size: 12.5px; font-weight: 700; color: #1a1a2e; display: block; margin-bottom: 6px; }
.frc-sb-label-row { display: flex; align-items: center; justify-content: space-between; }
.frc-sb-reset { font-size: 11.5px; color: #C62828; font-weight: 600; text-decoration: none; }
.frc-sb-input {
    width: 100%;
    border: 1px solid #d7dbe4;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12.5px;
    outline: none;
}
.frc-sb-input:focus { border-color: #0D1B5E; }
.frc-sb-apply-btn {
    width: 100%;
    margin-top: 8px;
    background: #0D1B5E;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.frc-sb-accordion { border-top: 1px solid #f1f2f6; }
.frc-sb-acc-btn {
    width: 100%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    cursor: pointer;
}
.frc-sb-acc-btn i { font-size: 11px; color: #6b7280; transition: transform .15s; }
.frc-sb-acc-btn.frc-open i { transform: rotate(180deg); }
.frc-sb-acc-body { display: none; padding-bottom: 12px; }
.frc-sb-acc-body.frc-open { display: block; }
.frc-sb-empty { font-size: 12px; color: #9aa5b1; }

.frc-sched-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.frc-sched-tab {
    flex: 1;
    background: #f4f6f8;
    border: none;
    border-radius: 6px;
    padding: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
}
.frc-sched-tab.active { background: #0D1B5E; color: #fff; }
.frc-sched-buckets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.frc-bucket-btn {
    background: #f9fafb;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 10.5px;
    color: #6b7280;
    cursor: pointer;
}
.frc-bucket-btn i { display: block; font-size: 15px; margin-bottom: 4px; color: #0D1B5E; }
.frc-bucket-btn span { display: block; font-weight: 700; color: #1a1a2e; }
.frc-bucket-btn small { color: #9aa5b1; }
.frc-bucket-btn.active { background: #eef2ff; border-color: #0D1B5E; }
.frc-bucket-btn.active span { color: #0D1B5E; }

.frc-sb-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #344054;
    padding: 6px 0;
    cursor: pointer;
}
.frc-sb-check input { accent-color: #0D1B5E; cursor: pointer; }
.frc-sb-check-logo { width: 22px; height: 22px; object-fit: contain; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .frc-sidebar-col { margin-bottom: 16px; }
}
@media (max-width: 900px) {
    .frc-price-box { order: -1; width: 100%; text-align: left; }
    .frc-price-box { display: flex; align-items: baseline; gap: 6px; }
}
@media (max-width: 576px) {
    .frc-card { padding: 12px; }
    .frc-time { font-size: 16px; }
    .frc-endpoint { min-width: 70px; }
    .frc-duration-box { min-width: 80px; }
    .frc-actions { justify-content: space-between; }
    .frc-select-btn { flex: 1; text-align: center; }
    .frc-sched-buckets { grid-template-columns: repeat(2, 1fr); }
}
