/* =====================================================
   GLOBAL
===================================================== */

/* ADDED 17 AUGUST 2026 */
:root {
  --mj-bg: #0F1114;
  --mj-panel: #191B22;
  --mj-border: #292C33;

  --mj-text: #FFFFFF;
  --mj-text-muted: #9A9DA5;

  --mj-accent: #CCFF00;
}
/* END */


* {
  box-sizing: border-box;
}


html,
body {
  margin: 0;
  padding: 0;
  height: 100%;

  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: var(--mj-bg);
  color: var(--mj-text);

  font-weight: 400;
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* =====================================================
   TOP BAR
===================================================== */

#top-bar {
  height: 52px;
  padding: 0 12px;
  display: flex;
  align-items: center;

  background: #f5f5f5;
  color: #000;
  border-bottom: 1px solid #ddd;
}

.filters {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

#summaryBarSlot {
  position: relative;

  flex: 0 0 112px;
  height: 112px;
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;
  /* background: #111;  REMOVED 17 AUGUST 2026 */
  background: var(--mj-bg);
}

#glassBar {
  height: 88px;
  box-sizing: border-box;

  width: 100%;
  padding: 0 16px;

  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
}


.flight-summary,
.airport-summary-bar {
  height: 88px;
  box-sizing: border-box;

  width: max-content;
  max-width: calc(100% - 40px);

  margin: 0;
  padding: 14px 28px;

  background: var(--mj-panel);
  color: var(--mj-text);

  border: 1px solid var(--mj-border);
  border-radius: 28px;

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.30);
}


/* =====================================================
   JOURNEY SUMMARY BAR
   ===================================================== */

   .flight-summary {
     display: flex;
     align-items: stretch;
     width: 100%;
   }
   
   .flight-metrics {
     display: grid;
     grid-template-columns: repeat(7, minmax(0, 1fr));
   
     align-items: stretch;
   
     width: 100%;
   }
   
   .flight-metric {
     display: flex;
     flex-direction: column;
   
     align-items: center;
     justify-content: center;
   
     min-width: 0;
   
     text-align: center;
   }



/* =====================================================
   AIRPORT SUMMARY BAR
   ===================================================== */

.airport-summary-bar {
  display: flex;
  align-items: center;
  gap: 32px;
}


/* =====================================================
   FILTER DROPDOWNS
===================================================== */

.filter {
  position: relative;
}

.filter-toggle {
  padding: 8px 14px;

  background: var(--mj-panel);
  color: var(--mj-text);

  border: 1px solid var(--mj-border);
  border-radius: 999px;

  font-family: inherit;
  font-size: 13px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.filter-toggle:hover {
  border-color: var(--mj-accent);
}

.filter.open .filter-toggle,
.filter-toggle.active {
  background: var(--mj-accent);
  color: #0F1114;

  border-color: var(--mj-accent);

  box-shadow:
    0 0 0 1px rgba(204, 255, 0, 0.25),
    0 0 18px rgba(204, 255, 0, 0.16);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1000;

  display: none;
  flex-direction: column;

  min-width: 220px;
  max-height: 300px;

  background: var(--mj-panel);
  color: var(--mj-text);

  border: 1px solid var(--mj-border);
  border-radius: 16px;

  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.38);

  overflow: hidden;
}

.filter-menu.open {
  display: flex;
}

.filter-actions {
  display: flex;
  justify-content: space-between;

  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.filter-actions button {
  padding: 0;

  background: none;
  color: #9fc9ff;
  border: none;

  font-size: 12px;
  cursor: pointer;
}

.filter-options {
  flex: 1;
  min-height: 0;

  padding: 8px;

  display: flex;
  flex-direction: column;
  gap: 4px;

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior: contain;
}


.filter-options label {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 10px;

  color: var(--mj-text);
  font-size: 13px;
  font-weight: 500;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.filter-options label:hover {
  background: rgba(204, 255, 0, 0.08);
}


.filter-options input {
  /*  accent-color: #ffd700;  REMOVED 17 AUGUST 2026 */
  accent-color: var(--mj-accent);
}


.filter-options label:has(input:checked) {
  background: var(--mj-accent);
  color: #0F1114;
}

.filter-options input {
  accent-color: var(--mj-accent);
}

.filter-options::-webkit-scrollbar {
  width: 6px;
}

.filter-options::-webkit-scrollbar-thumb {
  background: #3A3D45;
  border-radius: 999px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
  background: var(--mj-accent);
}

.filter-divider {
  height: 1px;
  margin: 8px 0;
  background: rgba(255, 255, 255, 0.25);
}


/* =====================================================
   TOP ACTIONS AND STATS DROPDOWN
===================================================== */

#addJourneyBtn {
  background: var(--mj-accent);
  color: #0F1114;

  border-color: var(--mj-accent);

  font-weight: 600;
}

#addJourneyBtn:hover {
  background: #D8FF3D;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.nav-item.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;

  display: none;
  min-width: 200px;
  margin: 0;
  padding: 6px 0;

  background: #0b0f2a;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.nav-item.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 14px;

  color: #ccc;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.top-btn,
.top-btn:link,
.top-btn:visited {
  padding: 8px 14px;

  background: var(--mj-panel);
  color: var(--mj-text);

  border: 1px solid var(--mj-border);
  border-radius: 999px;

  font-size: 13px;
  font-weight: 500;

  text-decoration: none;
  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.top-btn:hover {
  border-color: var(--mj-accent);
}



/* =====================================================
   FILTER SEARCH
   Used by Airport and Airline dropdowns
===================================================== */

.filter-search-wrapper {
  position: sticky;
  top: 0;
  z-index: 2;

  padding: 8px 0 10px;

  background: #222;
}


.filter-search {
  width: 100%;
  height: 34px;

  padding: 6px 10px;

  background: #fff;
  color: #111;

  border: 1px solid #aaa;
  border-radius: 7px;

  font-family: inherit;
  font-size: 13px;

  outline: none;
}


.filter-search::placeholder {
  color: #777;
}


.filter-search:focus {
  border-color: #9fc9ff;

  box-shadow:
    0 0 0 2px
    rgba(159, 201, 255, 0.2);
}


.filter-search::-webkit-search-cancel-button {
  cursor: pointer;
}


/* =====================================================
   MAIN LAYOUT
===================================================== */

#layout {
  display: flex;
  height: calc(100vh - 52px);
  overflow: hidden;
}


/* =====================================================
   SIDEBAR
===================================================== */

#sidebar {
  width: 280px;
  height: 100%;

  display: flex;
  flex-direction: column;

  flex-shrink: 0;

  background: #0F1114;
  border-right: 1px solid rgba(255, 255, 255, 0.06);

  overflow: hidden;
}

#sidebar.collapsed {
  width: 44px;
  overflow: hidden;
}

#sidebar.collapsed #sidebar-header {
  padding: 0;
  gap: 0;
  justify-content: center;
}

#sidebar.collapsed #sidebar-header span {
  display: none;
}

#sidebar.collapsed #sidebarToggle {
  width: 44px;
  text-align: center;
}

#sidebar.collapsed #flightList {
  display: none;
}

#sidebar-header {
  flex: 0 0 52px;
  height: 52px;

  padding: 0 14px;

  display: flex;
  align-items: center;
  gap: 10px;

  background: #0F1114;

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#sidebarToggle {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  padding: 0;

  background: transparent;
  color: #A7ABB4;

  border: 0;
  border-radius: 8px;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

#sidebarToggle:hover {
  background: #292C33;
  color: #CCFF00;
}

#flightList {
  flex: 1;
  min-height: 0;

  margin: 0;
  padding: 10px 8px;

  list-style: none;

  overflow-y: auto;
  overflow-x: hidden;
}

#flightList li {
  position: relative;

  display: flex;
  align-items: center;

  min-height: 100px;
  margin: 0 0 6px 0;
  padding: 4px 14px;

  background: #191B22;

  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;

  box-sizing: border-box;

  cursor: pointer;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

#flightList li:hover {
  background: #202329;

  border-color: rgba(255, 255, 255, 0.09);

  transform: translateY(-1px);
}

#flightList li.active {
  background: rgba(204, 255, 0, 0.07);

  border-color: rgba(204, 255, 0, 0.28);

  box-shadow:
    0 0 18px rgba(204, 255, 0, 0.06),
    inset 3px 0 0 #CCFF00;
}

#flightList li.active:hover {
  background: rgba(204, 255, 0, 0.09);

  border-color: rgba(204, 255, 0, 0.38);
}

#flightList li.active .sidebar-route {
  color: #FFFFFF;
}

#flightList li.active .sidebar-date {
  color: #B9BDC5;
}


.sidebar-row {
  width: 100%;
  display: flex;
  align-items: center;
}

.sidebar-logo {
  flex: 0 0 45%;
  max-width: 45%;
  height: 90px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-text {
  flex: 0 0 55%;
  max-width: 55%;

  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-journey-type {
  margin-bottom: 3px;

  color: #A7ABB4;

  font-size: 10px;
  font-weight: 600;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-route {
  margin-bottom: 5px;

  color: #F5F7FA;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;

  letter-spacing: -0.01em;
}

.sidebar-date {
  color: #9297A1;

  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.airline-logo {
  width: 144px;
  height: 116px;
  flex: 0 0 80px;

  margin-right: 14px;

  object-fit: contain;
}

.journey-logo {
  width: 75px;
  height: 50px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

/* =====================================================
   MAP WRAPPER
===================================================== */

#map-wrapper {
  flex: 1;
  min-width: 0;
  min-height: 0;

  display: flex;
  flex-direction: column;
}

#map {
  flex: 1;
  min-height: 0;
}


/* =====================================================
   GLOBAL COUNTER BAR
===================================================== */

#glassBar {
  height: 88px;
  box-sizing: border-box;
   
  width: 100%;
  padding: 12px 16px;

  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
}

#glassBar .glass-box {
  flex: 0 0 auto;
  min-width: 140px;
}

/*
.glass-box {
  min-width: 100px;
  padding: 10px 14px;

  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 12px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
} */

/* NEW VERSION 17 AUGUST 2026 */
.glass-box {
  min-width: 100px;
  padding: 10px 14px;

  background: var(--mj-panel);
  color: var(--mj-text);

  border: 1px solid var(--mj-border);
  border-radius: 16px;

  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.28);

  pointer-events: auto;
}

/* REPLACED 17 AUGUST 2026 
.glass-number {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
}
*/

.glass-number {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* REPLACED 17 AUGUST 2026 
.glass-label {
  font-size: 12px;
  opacity: 0.85;
  text-transform: uppercase;
}
*/

.glass-label {
  margin-top: 3px;

  font-size: 11px;
  font-weight: 500;
  line-height: 1.1;

  color: var(--mj-text-muted);

  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#countriesCounter {
  cursor: pointer;
}

.airline-name-box {
  min-width: 180px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.airline-name-box .airline-name {
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
}

.airport-name-box {
  min-width: 200px !important;

  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  text-align: center;
}

.airport-code-display {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.airport-name-display {
  margin-top: 3px;

  font-size: 12px;
  line-height: 1.2;

  opacity: 0.85;

  white-space: nowrap;
}

.journey-summary-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
}


.flight-route {
  text-align: center;
}


/* =====================================================
   AIRPORT SUMMARY BAR
===================================================== */


.airport-summary-location {
  min-width: 180px;
  flex: 0 0 auto;

  align-items: flex-start;
  text-align: left;
}


/* All airport metrics */

.airport-summary-metric {
  min-width: 110px;
  flex: 0 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.airport-summary-metric .airport-summary-value {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}


/* Labels */

.airport-summary-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;

  color: var(--mj-text-muted);

  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Main values */

.airport-summary-location .airport-summary-value {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}


/* Airport city/name */

.airport-summary-subvalue {
  margin-top: 4px;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;

  color: var(--mj-text-muted);
}

/* Hidden */

.airport-summary-bar.hidden {
  display: none !important;
}


/* =====================================================
   FLIGHT SUMMARY BAR
===================================================== */

.flight-summary {
  display: flex;
  align-items: center;
  gap: 32px;
}


.flight-metric {
  min-width: 110px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  text-align: center;
}


/* =====================================================
   SUMMARY BAR TYPOGRAPHY
===================================================== */

/* Labels */
.flight-metric .metric-label,
.journey-summary-label,
.airport-summary-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;

  color: var(--mj-text-muted);

  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* Main values */
.flight-metric span:not(.metric-label),
.airport-summary-metric .airport-summary-value {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;

  letter-spacing: -0.02em;
}


/* Route */
.flight-route {
  margin-top: 4px;

  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;

  letter-spacing: -0.02em;
}


/* Airport name */
.airport-summary-subvalue {
  margin-top: 4px;

  font-size: 14px;
  font-weight: 400;
  line-height: 1.1;

  color: var(--mj-text-muted);
}


/* =====================================================
   MAPBOX OVERRIDES
===================================================== */


.mapboxgl-popup,
.mapboxgl-popup-content {
  font-family: "Manrope", sans-serif;
}
.mapboxgl-popup {
  font-size: 12px;
}

.mapboxgl-popup-content {
  background: #fff !important;
  color: #111 !important;
  border-radius: 8px;

  font-family: inherit;
  font-size: 12px;
}

.mapboxgl-ctrl-top-right {
  top: 10px;
}


/* =====================================================
   ADD-JOURNEY MODALS
===================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  min-width: 320px;
  padding: 24px;

  background: rgba(20, 20, 25, 0.95);
  color: #fff;
  border-radius: 12px;
}

.modal-wide {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.modal-actions {
  margin-top: 20px;
  text-align: right;
}

.modal-actions button {
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-primary {
  background: #ffd700;
  color: #111;
  border: 1px solid #ffd700;
}

.btn-secondary {
  background: #333;
  color: #fff;
  border: 1px solid #555;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 6px;

  color: #111;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.form-grid textarea {
  min-height: 80px;
  resize: vertical;
}


/* =====================================================
   SCROLLBARS
===================================================== */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}


/* =====================================================
   RESPONSIVE SAFETY
===================================================== */

@media (max-width: 1100px) {
  #glassBar {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .airport-summary,
  .flight-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .flight-metrics,
  .airport-metrics {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
