/* ============================================================
   Confluence Air — Flights list page  (cfe-flights.css)
   ------------------------------------------------------------
   Route: frontend.flights.index  →  body[data-route="frontend.flights.index"]
   Scoped by the data-route hook in confluence_v3/app.blade.php.
   Pure CSS: table card + search sidebar + nav/map buttons.
   Loads site-wide (one <link>) but styles ONLY this page.
   REVERT: remove the cfe-flights.css <link> from app.blade.php.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800&family=Source+Sans+3:wght@400;600;700&family=Roboto+Mono:wght@400;500&display=swap');

body[data-route="frontend.flights.index"]{
  --cfe-navy:#012773;
  --cfe-navy-600:#0a3a8f;
  --cfe-navy-050:#eef1f9;
  --cfe-gold:#f5dc0f;
  --cfe-gold-deep:#c9b400;
  --cfe-ink:#141922;
  --cfe-slate:#5b6576;
  --cfe-line:rgba(1,39,115,.12);
  --cfe-good:#1f7a52;
  --cfe-good-bg:#e6f3ec;
}

/* ---- cards (table card + search card share this) ---- */
body[data-route="frontend.flights.index"] .card{
  border:1px solid var(--cfe-line);
  border-radius:16px;
  box-shadow:0 1px 2px rgba(1,39,115,.06), 0 8px 24px rgba(1,39,115,.06);
  overflow:hidden;
}
body[data-route="frontend.flights.index"] .card-header{
  background:var(--cfe-navy);
  color:#fff;
  border-bottom:0;
  font-weight:700;
}
body[data-route="frontend.flights.index"] .card-header h1,
body[data-route="frontend.flights.index"] .card-header h2,
body[data-route="frontend.flights.index"] .card-header h3,
body[data-route="frontend.flights.index"] .card-header h4,
body[data-route="frontend.flights.index"] .card-header h5{ font-family:"Archivo",sans-serif; color:#fff; }
body[data-route="frontend.flights.index"] .card-header i{ color:var(--cfe-gold); }
body[data-route="frontend.flights.index"] .card-footer{
  background:var(--cfe-navy-050);
  border-top:1px solid var(--cfe-line);
  color:var(--cfe-slate);
}

/* ---- flights table ---- */
body[data-route="frontend.flights.index"] .table{ font-size:13.5px; }
body[data-route="frontend.flights.index"] .table thead th{
  font-family:"Archivo",sans-serif;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--cfe-slate);
  border-bottom:1px solid var(--cfe-line);
  vertical-align:middle;
}
body[data-route="frontend.flights.index"] .table thead th a{ color:var(--cfe-navy) !important; text-decoration:none; }
body[data-route="frontend.flights.index"] .table thead th a:hover{ text-decoration:underline; }
body[data-route="frontend.flights.index"] .table tbody td{ vertical-align:middle; }
body[data-route="frontend.flights.index"] .table tbody td a{ color:var(--cfe-navy); text-decoration:none; font-weight:600; }
body[data-route="frontend.flights.index"] .table tbody td a:hover{ text-decoration:underline; }
body[data-route="frontend.flights.index"] .table-striped > tbody > tr:nth-of-type(odd) > *{ background-color:rgba(1,39,115,.03); }
body[data-route="frontend.flights.index"] .table tbody tr:hover > *{ background-color:rgba(245,220,15,.10); }

/* ---- search sidebar ---- */
body[data-route="frontend.flights.index"] .input-group-text{
  background:var(--cfe-navy-050);
  border-color:var(--cfe-line);
  color:var(--cfe-navy);
  font-size:12px;
  font-weight:600;
}
body[data-route="frontend.flights.index"] .form-control{ border-color:var(--cfe-line); font-size:13px; }
body[data-route="frontend.flights.index"] .form-control:focus{
  border-color:var(--cfe-navy);
  box-shadow:0 0 0 .15rem rgba(1,39,115,.15);
}

/* ---- buttons ---- */
/* Find (submit) → navy solid */
body[data-route="frontend.flights.index"] .btn-primary{
  background:var(--cfe-navy) !important;
  border-color:var(--cfe-navy) !important;
  color:#fff !important;
}
body[data-route="frontend.flights.index"] .btn-primary:hover{
  background:var(--cfe-navy-600) !important;
  border-color:var(--cfe-navy-600) !important;
}
/* Reset (secondary) → gold */
body[data-route="frontend.flights.index"] .btn-secondary{
  background:var(--cfe-gold) !important;
  border-color:var(--cfe-gold-deep) !important;
  color:var(--cfe-navy) !important;
  font-weight:700;
}
/* Flights Map / Fleet Map (DBasic::Map widget) — de-red, navy.
   Targeted by the ExpandMap attribute only, so no Delete button is hit. */
body[data-route="frontend.flights.index"] .btn-danger[onclick*="ExpandMap"]{
  background:var(--cfe-navy) !important;
  border-color:var(--cfe-navy) !important;
  color:#fff !important;
}
body[data-route="frontend.flights.index"] .btn-danger[onclick*="ExpandMap"]:hover{
  background:var(--cfe-navy-600) !important;
  border-color:var(--cfe-navy-600) !important;
}

/* ---- pagination ---- */
body[data-route="frontend.flights.index"] .pagination .page-link{ color:var(--cfe-navy); }
body[data-route="frontend.flights.index"] .pagination .active .page-link{
  background:var(--cfe-navy); border-color:var(--cfe-navy); color:#fff;
}

/* ---- status/badge legibility ---- */
body[data-route="frontend.flights.index"] .badge.bg-success{ background:var(--cfe-good-bg) !important; color:var(--cfe-good) !important; }

/* ---- Flights Map / Fleet Map sidebar bars: de-red (robust selector) ----
   These are the only .btn-danger on the page that are NOT the row-level
   .save_flight bid buttons (which carry .save_flight + x-saved-class).
   Keying on that difference instead of the onclick string. ---- */
body[data-route="frontend.flights.index"] .btn-danger:not(.save_flight):not([x-saved-class]){
  background:#012773 !important;
  border-color:#012773 !important;
  color:#fff !important;
}
body[data-route="frontend.flights.index"] .btn-danger:not(.save_flight):not([x-saved-class]):hover{
  background:#0a3a8f !important;
  border-color:#0a3a8f !important;
}
