/*
 * Bluemina Passport Mobility Index — Frontend Styles v2.1
 * Full responsive design — mobile, tablet, desktop, wide
 * BEM naming: .bpmi__element--modifier
 * CSS custom properties for all colours (admin-overridable)
 */

/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════ */
:root {
  --bpmi-navy:        #0B1E3D;
  --bpmi-navy-mid:    #162D55;
  --bpmi-navy-light:  #1E3A6E;
  --bpmi-gold:        #C9933A;
  --bpmi-gold-light:  #E2B060;
  --bpmi-gold-pale:   #FDF3E3;
  --bpmi-bg:          #F3F6FB;
  --bpmi-surface:     #FFFFFF;
  --bpmi-border:      #DCE3EF;
  --bpmi-text:        #1A2845;
  --bpmi-text-mid:    #3C516E;
  --bpmi-text-soft:   #6E84A3;
  --bpmi-text-pale:   #9FAEC3;
  --bpmi-success:     #1DB266;
  --bpmi-warning:     #F59E0B;
  --bpmi-danger:      #EF4444;

  /* Access-type palette */
  --bpmi-vf-bg:   #E8F8EF; --bpmi-vf-fg:   #0C6E3A; --bpmi-vf-dot:   #1DB266;
  --bpmi-voa-bg:  #EAF2FF; --bpmi-voa-fg:  #1050A8; --bpmi-voa-dot:  #3B7CF5;
  --bpmi-ev-bg:   #F2EAFF; --bpmi-ev-fg:   #5B2EA8; --bpmi-ev-dot:   #8B5CF6;
  --bpmi-eta-bg:  #E5FBFA; --bpmi-eta-fg:  #0C6068; --bpmi-eta-dot:  #14B8B0;
  --bpmi-vr-bg:   #FFF4E5; --bpmi-vr-fg:   #8C4A00; --bpmi-vr-dot:   #F59E0B;
  --bpmi-na-bg:   #FDECEA; --bpmi-na-fg:   #7A1020; --bpmi-na-dot:   #EF4444;

  /* Spacing & shape */
  --bpmi-r-sm: 6px;
  --bpmi-r-md: 10px;
  --bpmi-r-lg: 14px;
  --bpmi-r-xl: 18px;
  --bpmi-ease: 0.18s ease;

  /* Orange / Amber action palette */
  --bpmi-orange:      #F2A900;
  --bpmi-orange-dark: #D98E00;
  --bpmi-orange-soft: #FFF8E1;
}

/* ═══════════════════════════════════════════════════════
   BASE CONTAINER
   ═══════════════════════════════════════════════════════ */
.bpmi {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bpmi-text);
  background: var(--bpmi-bg);
  border-radius: var(--bpmi-r-xl);
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(11,30,61,.10);
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

/* Standalone shortcode containers — own padding */
.bpmi--ranking,
.bpmi--details,
.bpmi--compare,
.bpmi--methodology {
  padding: 24px;
  background: var(--bpmi-surface);
}

/* ─── Tabbed wrapper ─────────────────────────────────── */
.bpmi--tabs { background: var(--bpmi-surface); }

.bpmi__tab-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bpmi-surface);
  border-bottom: 2px solid var(--bpmi-border);
  padding: 14px 20px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bpmi__tab-nav::-webkit-scrollbar { display: none; }

.bpmi__tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px 12px;
  background: #EDF0F6;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--bpmi-text-mid);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--bpmi-ease), color var(--bpmi-ease),
              border-color var(--bpmi-ease);
  flex-shrink: 0;
  line-height: 1;
  margin-bottom: -2px;
}
.bpmi__tab-btn svg { flex-shrink: 0; opacity: .55; }
.bpmi__tab-btn:hover {
  background: #E2E7F0;
  color: var(--bpmi-text);
}
.bpmi__tab-btn--active,
.bpmi__tab-btn[aria-selected="true"] {
  background: var(--bpmi-surface);
  color: var(--bpmi-navy);
  border-bottom-color: var(--bpmi-navy);
  font-weight: 900;
}
.bpmi__tab-btn--active svg,
.bpmi__tab-btn[aria-selected="true"] svg { opacity: 1; }

.bpmi__tab-panel { padding: 28px 24px 24px; background: var(--bpmi-surface); }
.bpmi__tab-panel[hidden] { display: none; }

/* Nested shortcode inside tab — remove double padding */
.bpmi__tab-panel .bpmi--ranking,
.bpmi__tab-panel .bpmi--details,
.bpmi__tab-panel .bpmi--compare,
.bpmi__tab-panel .bpmi--methodology {
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════ */
.bpmi__sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════
   TOOLBAR (ranking top bar)
   ═══════════════════════════════════════════════════════ */
.bpmi__panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bpmi__toolbar-left { flex-shrink: 0; }
.bpmi__ranking-count {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bpmi-text-mid);
  background: var(--bpmi-bg);
  border: 1px solid var(--bpmi-border);
  padding: 4px 12px;
  border-radius: 20px;
}
.bpmi__toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   CONTROLS — search input & select dropdowns
   ═══════════════════════════════════════════════════════ */
.bpmi__ctrl-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.bpmi__ctrl-icon {
  position: absolute;
  left: 10px;
  color: var(--bpmi-text-soft);
  display: flex;
  pointer-events: none;
  z-index: 1;
}
.bpmi__ctrl-search {
  height: 36px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--bpmi-border);
  border-radius: var(--bpmi-r-md);
  font-size: 13px;
  color: var(--bpmi-text);
  background: var(--bpmi-bg);
  outline: none;
  width: 200px;
  max-width: 100%;
  transition: border-color var(--bpmi-ease), box-shadow var(--bpmi-ease);
}
.bpmi__ctrl-search:focus {
  border-color: var(--bpmi-orange);
  box-shadow: 0 0 0 3px rgba(242,169,0,.20);
}
.bpmi__ctrl-search::placeholder { color: var(--bpmi-text-pale); }

.bpmi__ctrl-select {
  height: 36px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--bpmi-border);
  border-radius: var(--bpmi-r-md);
  font-size: 13px;
  color: var(--bpmi-text);
  background: var(--bpmi-bg);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color var(--bpmi-ease), box-shadow var(--bpmi-ease);
}
.bpmi__ctrl-select:focus {
  border-color: var(--bpmi-orange);
  box-shadow: 0 0 0 3px rgba(242,169,0,.20);
}
.bpmi__ctrl-chevron {
  position: absolute;
  right: 8px;
  color: var(--bpmi-text-soft);
  pointer-events: none;
  display: flex;
}
.bpmi__ctrl-wrap--lg .bpmi__ctrl-select {
  width: 100%;
  height: 42px;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════
   TABLE — shared base
   ═══════════════════════════════════════════════════════ */
.bpmi__table-wrap {
  position: relative; /* establish a stacking context so z-index below works */
  z-index: 1;          /* sit above page background/decorative shapes (e.g. Elementor shape dividers) */
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--bpmi-r-lg);
  border: 1px solid var(--bpmi-border);
  box-shadow: 0 4px 24px rgba(11,30,61,.08);
  background: var(--bpmi-bg); /* opaque background so nothing shows through behind the table */
}
.bpmi__table,
.bpmi__table-wrap .bpmi__table,
.bpmi__table-wrap table.bpmi__table {
  width:          100%   !important; /* defeat theme `table { width: auto }` resets — high specificity */
  min-width: 600px;        /* table scrolls horizontally below this */
  max-width: none !important;
  table-layout:   auto    !important;
  border-collapse: collapse !important;
  border-spacing: 0       !important;
  font-size: 13.5px;
}
.bpmi__th {
  padding: 12px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.82);
  background: var(--bpmi-navy);
  border:        none                      !important; /* defeat theme `th,td{border:1px solid}` */
  border-bottom: 2px solid var(--bpmi-navy-light) !important;
  white-space: nowrap;
}
.bpmi__td {
  padding: 11px 14px;
  vertical-align: middle;
  border:        none                       !important; /* defeat theme `th,td{border:1px solid}` */
  border-bottom: 1px solid var(--bpmi-border) !important;
}
.bpmi__tr {
  transition: background var(--bpmi-ease);
}
.bpmi__tr:last-child .bpmi__td { border-bottom: none !important; }
.bpmi__tr:nth-child(even) { background: #FAFBFD; }
.bpmi__tr:hover            { background: #EEF4FF; } /* subtle cool blue — premium feel */

/* ── Column widths ───────────────────────────────────── */
.bpmi__th--rank     { width: 64px;  text-align: center; }
.bpmi__td--rank     { text-align: center; }
.bpmi__th--region   { min-width: 110px; }
.bpmi__th--score    { min-width: 120px; }

/* ── Ranking table — fixed proportions ──────────────────
   Shrinks Region / Mobility Score, grows Actions, gives the
   remainder to Passport. Scoped to .bpmi__ranking-table only
   so the destinations / compare tables keep auto layout.
   Higher-specificity selector needed to win over the
   `.bpmi__table-wrap .bpmi__table { table-layout: auto }` rule above. */
.bpmi__table-wrap .bpmi__table.bpmi__ranking-table {
  table-layout: fixed !important;
}
.bpmi__ranking-table .bpmi__th--rank   { width: 8%  !important; min-width: 0; }
.bpmi__ranking-table .bpmi__th--region { width: 15% !important; min-width: 0; }
.bpmi__ranking-table .bpmi__th--score  { width: 15% !important; min-width: 0; }
.bpmi__ranking-table .bpmi__th--action { width: 18% !important; min-width: 0; }
/* Passport column (no dedicated class) takes the remainder ≈ 44% —
   absorbs the space freed up from Actions so there's no leftover
   empty gap after the Details/Compare buttons. */
.bpmi__th--visafree { width: 80px;  text-align: center; }
.bpmi__td--visafree { text-align: center; font-weight: 600; color: var(--bpmi-vf-fg); }
.bpmi__th--updated  { width: 100px; }
.bpmi__th--action   { width: 200px; white-space: nowrap; }
.bpmi__td--action   {
  width: 180px;
  white-space: nowrap;
}
.bpmi__th--num      { width: 42px; text-align: center; }
.bpmi__td--num      { text-align: center; color: var(--bpmi-text-pale); font-size: 12px; }
.bpmi__th--access   { width: 140px; }
.bpmi__th--notes    { min-width: 120px; }
.bpmi__th--metric   { min-width: 140px; }
.bpmi__th--compare-a,
.bpmi__th--compare-b { min-width: 140px; }

/* ═══════════════════════════════════════════════════════
   RANK BADGE
   ═══════════════════════════════════════════════════════ */
.bpmi__rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  background: var(--bpmi-navy);
  border: none;
  border-radius: var(--bpmi-r-sm);
  font-size: 12px;
  font-weight: 800;
  color: var(--bpmi-gold-light);
}

/* ── Region pill badge ───────────────────────────────── */
.bpmi__region-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: var(--bpmi-bg);
  border: 1px solid var(--bpmi-border);
  color: var(--bpmi-text-mid);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   COUNTRY CELL — flag + name + code badge
   ═══════════════════════════════════════════════════════ */
.bpmi__flag-emoji {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
  vertical-align: middle;
  margin-right: 6px;
}
.bpmi__country-name {
  font-weight: 600;
  color: var(--bpmi-text);
  vertical-align: middle;
}
.bpmi__code-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bpmi-bg);
  border: 1px solid var(--bpmi-border);
  color: var(--bpmi-text-soft);
  vertical-align: middle;
  margin-left: 5px;
}

/* ═══════════════════════════════════════════════════════
   ACTION BUTTONS (Details / Compare in ranking rows)
   ═══════════════════════════════════════════════════════ */
/* Actions cell — inner wrapper handles flex, not the td itself */
.bpmi__td--action {
  white-space: nowrap;
  vertical-align: middle;
}
.bpmi__td--action .bpmi__action-btn + .bpmi__action-btn {
  margin-left: 5px;
}

/* Flex wrapper — keeps both buttons on one line regardless of theme resets */
.bpmi__action-group {
  display:        flex        !important;
  flex-direction: row         !important;
  flex-wrap:      nowrap      !important;
  align-items:    center      !important;
  gap:            6px;
}
.bpmi__action-group .bpmi__action-btn {
  display:    inline-flex !important;
  width:      auto        !important;
  flex:       0 0 auto    !important;
  min-width:  0;
}

/* Base — shared by ALL plugin action/filter buttons */
.bpmi__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 8px;
  border: none;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background var(--bpmi-ease), box-shadow var(--bpmi-ease),
              transform var(--bpmi-ease);
  line-height: 1;
}
.bpmi__action-btn:active { transform: scale(.97); }

/*
 * Both Details and Compare → amber/gold
 * Double selector + !important defeats theme button { background } resets.
 */
.bpmi .bpmi__action-btn--details,
.bpmi .bpmi__action-btn--compare,
.bpmi__action-btn--details,
.bpmi__action-btn--compare {
  background:       var(--bpmi-orange) !important;
  background-color: var(--bpmi-orange) !important;
  color:            #ffffff             !important;
  border:           none                !important;
}
.bpmi .bpmi__action-btn--details:hover,
.bpmi .bpmi__action-btn--compare:hover,
.bpmi__action-btn--details:hover,
.bpmi__action-btn--compare:hover {
  background:       var(--bpmi-orange-dark) !important;
  background-color: var(--bpmi-orange-dark) !important;
  box-shadow: 0 3px 14px rgba(217,142,0,.45);
}

/* ═══════════════════════════════════════════════════════
   NO RESULTS
   ═══════════════════════════════════════════════════════ */
.bpmi__no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--bpmi-text-soft);
  text-align: center;
}
.bpmi__no-results svg { opacity: .35; }
.bpmi__no-results p   { margin: 0; font-size: 14px; }

/* ═══════════════════════════════════════════════════════
   ACCESS-TYPE BADGES
   ═══════════════════════════════════════════════════════ */
.bpmi__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.bpmi__badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bpmi__badge--visa-free       { background: var(--bpmi-vf-bg);  color: var(--bpmi-vf-fg);  }
.bpmi__badge--visa-free       .bpmi__badge-dot { background: var(--bpmi-vf-dot); }
.bpmi__badge--visa-on-arrival { background: var(--bpmi-voa-bg); color: var(--bpmi-voa-fg); }
.bpmi__badge--visa-on-arrival .bpmi__badge-dot { background: var(--bpmi-voa-dot);}
.bpmi__badge--evisa           { background: var(--bpmi-ev-bg);  color: var(--bpmi-ev-fg);  }
.bpmi__badge--evisa           .bpmi__badge-dot { background: var(--bpmi-ev-dot); }
.bpmi__badge--eta             { background: var(--bpmi-eta-bg); color: var(--bpmi-eta-fg); }
.bpmi__badge--eta             .bpmi__badge-dot { background: var(--bpmi-eta-dot);}
.bpmi__badge--visa-required   { background: var(--bpmi-vr-bg);  color: var(--bpmi-vr-fg);  }
.bpmi__badge--visa-required   .bpmi__badge-dot { background: var(--bpmi-vr-dot); }
.bpmi__badge--no-admission    { background: var(--bpmi-na-bg);  color: var(--bpmi-na-fg);  }
.bpmi__badge--no-admission    .bpmi__badge-dot { background: var(--bpmi-na-dot); }

/* ═══════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════ */
.bpmi__pagination-wrap,
.bpmi__dest-pagination {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.bpmi__pagination {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bpmi-surface);
  border: 1px solid var(--bpmi-border);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 1px 4px rgba(11,30,61,.06);
}
/*
 * Pagination buttons — all properties use !important to defeat
 * themes that set button { color: white; background: colored }.
 * Inactive buttons get a visible light background so text is
 * always readable regardless of what the theme does.
 */
.bpmi__page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border:            1px solid var(--bpmi-border) !important;
  border-radius:     8px;
  background:        var(--bpmi-bg)       !important;
  background-color:  var(--bpmi-bg)       !important;
  background-image:  none                 !important;
  color:             var(--bpmi-text-mid) !important;
  font-size:         13px;
  font-weight:       600;
  cursor:            pointer;
  display:           inline-flex;
  align-items:       center;
  justify-content:   center;
  transition:        background var(--bpmi-ease), color var(--bpmi-ease),
                     border-color var(--bpmi-ease), box-shadow var(--bpmi-ease);
  line-height:       1;
  box-shadow:        none !important;
}
.bpmi__page-btn:hover:not([disabled]) {
  background:        #E8EDF5          !important;
  background-color:  #E8EDF5          !important;
  border-color:      var(--bpmi-navy) !important;
  color:             var(--bpmi-navy) !important;
}
.bpmi__page-btn--active {
  background:        var(--bpmi-navy) !important;
  background-color:  var(--bpmi-navy) !important;
  background-image:  none             !important;
  border-color:      var(--bpmi-navy) !important;
  color:             #ffffff          !important;
  font-weight:       700;
  pointer-events:    none;
  box-shadow:        0 2px 8px rgba(11,30,61,.20) !important;
}
/* Disabled prev/next arrows — faint but still readable */
.bpmi__page-btn[disabled] {
  opacity:       .45;
  cursor:        not-allowed;
  border-color:  var(--bpmi-border) !important;
  color:         var(--bpmi-text-pale) !important;
}
.bpmi__page-ellipsis {
  padding: 0 4px;
  color:       var(--bpmi-text-pale) !important;
  font-size:   15px;
  line-height: 36px;
  user-select: none;
  display:     inline-flex;
  align-items: center;
}

/* Pagination container — guarantee white background so all text is readable */
.bpmi__pagination {
  background:        var(--bpmi-surface) !important;
  background-color:  var(--bpmi-surface) !important;
}

/* ═══════════════════════════════════════════════════════
   LOADING SPINNER
   ═══════════════════════════════════════════════════════ */
.bpmi__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  color: var(--bpmi-text-soft);
  font-size: 14px;
}
.bpmi__spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--bpmi-border);
  border-top-color: var(--bpmi-gold);
  border-radius: 50%;
  animation: bpmi-spin .75s linear infinite;
  flex-shrink: 0;
}
@keyframes bpmi-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════
   DETAILS — SELECTOR BAR
   ═══════════════════════════════════════════════════════ */
.bpmi__selector-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.bpmi__selector-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bpmi-text-mid);
  white-space: nowrap;
  flex-shrink: 0;
}
.bpmi__selector-bar .bpmi__ctrl-wrap { flex: 1; max-width: 420px; }

/* ═══════════════════════════════════════════════════════
   DETAILS — EMPTY STATE
   ═══════════════════════════════════════════════════════ */
.bpmi__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 24px;
  text-align: center;
  color: var(--bpmi-text-soft);
}
.bpmi__empty-icon svg {
  opacity: .18;
  width: 72px; height: 72px;
  color: var(--bpmi-navy-light);
}
.bpmi__empty-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--bpmi-text-mid);
}
.bpmi__empty-text {
  margin: 0;
  font-size: 14px;
  max-width: 340px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════
   DETAILS — SUMMARY / HEADER CARD
   ═══════════════════════════════════════════════════════ */
.bpmi__summary-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, var(--bpmi-navy) 0%, var(--bpmi-navy-light) 100%);
  border-radius: var(--bpmi-r-lg);
  padding: 20px 24px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.bpmi__summary-flag {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
}
.bpmi__summary-identity {
  flex: 1;
  min-width: 130px;
}
.bpmi__summary-country {
  margin: 0 0 5px;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.bpmi__summary-region {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.12);
  padding: 3px 10px;
  border-radius: 12px;
}
.bpmi__summary-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.bpmi__meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
}
.bpmi__meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.5);
}
.bpmi__meta-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--bpmi-gold-light);
}

/* ═══════════════════════════════════════════════════════
   DETAILS — 6 STAT CARDS
   ═══════════════════════════════════════════════════════ */
.bpmi__stat-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.bpmi__stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 16px 10px;
  border-radius: var(--bpmi-r-lg);
  border: 1.5px solid;
  text-align: center;
  transition: transform var(--bpmi-ease), box-shadow var(--bpmi-ease);
}
.bpmi__stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.09);
}
.bpmi__stat-card-icon { display: flex; }
.bpmi__stat-card-count { font-size: 24px; font-weight: 800; line-height: 1; }
.bpmi__stat-card-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.3;
}
.bpmi__stat-card--vf  { background: var(--bpmi-vf-bg);  border-color: #A7F3C9; color: var(--bpmi-vf-fg); }
.bpmi__stat-card--vf  .bpmi__stat-card-icon { color: var(--bpmi-vf-dot); }
.bpmi__stat-card--voa { background: var(--bpmi-voa-bg); border-color: #BFDBFE; color: var(--bpmi-voa-fg); }
.bpmi__stat-card--voa .bpmi__stat-card-icon { color: var(--bpmi-voa-dot);}
.bpmi__stat-card--ev  { background: var(--bpmi-ev-bg);  border-color: #DDD6FE; color: var(--bpmi-ev-fg); }
.bpmi__stat-card--ev  .bpmi__stat-card-icon { color: var(--bpmi-ev-dot); }
.bpmi__stat-card--eta { background: var(--bpmi-eta-bg); border-color: #99F6E4; color: var(--bpmi-eta-fg); }
.bpmi__stat-card--eta .bpmi__stat-card-icon { color: var(--bpmi-eta-dot);}
.bpmi__stat-card--vr  { background: var(--bpmi-vr-bg);  border-color: #FDE68A; color: var(--bpmi-vr-fg); }
.bpmi__stat-card--vr  .bpmi__stat-card-icon { color: var(--bpmi-vr-dot); }
.bpmi__stat-card--na  { background: var(--bpmi-na-bg);  border-color: #FECACA; color: var(--bpmi-na-fg); }
.bpmi__stat-card--na  .bpmi__stat-card-icon { color: var(--bpmi-na-dot); }

/* ═══════════════════════════════════════════════════════
   DETAILS — DESTINATIONS TOOLBAR & FILTERS
   ═══════════════════════════════════════════════════════ */
.bpmi__destinations-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.bpmi__filters {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.bpmi__filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1.5px solid var(--bpmi-border) !important;
  background:       var(--bpmi-bg)       !important;
  background-color: var(--bpmi-bg)       !important;
  background-image: none                 !important;
  color:            var(--bpmi-text-mid) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
  transition: background var(--bpmi-ease), border-color var(--bpmi-ease),
              color var(--bpmi-ease), box-shadow var(--bpmi-ease);
}
.bpmi__filter:hover {
  border-color: var(--bpmi-orange);
  color: var(--bpmi-orange-dark);
  background: var(--bpmi-orange-soft);
}
.bpmi__filter--active,
.bpmi__filter[aria-pressed="true"] {
  background:   var(--bpmi-orange) !important;
  border-color: var(--bpmi-orange) !important;
  color:        #ffffff            !important;
  box-shadow: 0 2px 8px rgba(242,169,0,.35);
}

/* ── Empty destination message ─────────────────────── */
.bpmi__td--empty-msg {
  text-align: center;
  padding: 28px 16px;
  color: var(--bpmi-text-soft);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   COMPARE — SELECTORS
   ═══════════════════════════════════════════════════════ */
.bpmi__compare-selectors {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
}
.bpmi__compare-slot {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.bpmi__compare-slot-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--bpmi-text-soft);
}
.bpmi__compare-slot--a .bpmi__compare-slot-label { color: var(--bpmi-navy-light); }
.bpmi__compare-slot--b .bpmi__compare-slot-label { color: var(--bpmi-gold); }
.bpmi__compare-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bpmi-navy);
  color: var(--bpmi-gold-light);
  font-weight: 900;
  font-size: 12.5px;
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* Compare warning */
.bpmi__compare-warning {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #FFF7ED;
  border: 1px solid #FDD8A4;
  border-radius: var(--bpmi-r-md);
  padding: 11px 16px;
  font-size: 13px;
  color: #92400E;
  margin-bottom: 16px;
}
.bpmi__compare-warning svg { flex-shrink: 0; color: #F59E0B; }

/* Compare table winner */
.bpmi__td--compare-a,
.bpmi__td--compare-b { font-size: 13.5px; }
.bpmi__td--winner {
  background: #ECFDF5;
  font-weight: 700;
  color: #065F46;
}

/* ═══════════════════════════════════════════════════════
   INSIGHTS CARDS (compare)
   ═══════════════════════════════════════════════════════ */
.bpmi__insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.bpmi__insight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 18px 14px;
  background: var(--bpmi-bg);
  border: 1px solid var(--bpmi-border);
  border-radius: var(--bpmi-r-lg);
  text-align: center;
}
.bpmi__insight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bpmi-navy);
  color: var(--bpmi-gold-light);
}
.bpmi__insight-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--bpmi-text-soft);
}
.bpmi__insight-value {
  font-size: 17px;
  font-weight: 800;
  color: var(--bpmi-text);
}

/* ═══════════════════════════════════════════════════════
   EXCLUSIVE DESTINATIONS (compare advantages)
   ═══════════════════════════════════════════════════════ */
.bpmi__advantages {
  border: 1px solid var(--bpmi-border);
  border-radius: var(--bpmi-r-lg);
  padding: 18px 20px;
  margin-top: 8px;
}
.bpmi__advantages-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bpmi-text);
}
.bpmi__advantages-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--bpmi-text-soft);
}
.bpmi__advantages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.bpmi__adv-col-title {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--bpmi-r-sm);
}
.bpmi__adv-col-title--a { background: var(--bpmi-navy); color: var(--bpmi-gold-light); }
.bpmi__adv-col-title--b { background: var(--bpmi-gold-pale); color: var(--bpmi-gold); border: 1px solid var(--bpmi-gold); }

.bpmi__adv-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}
.bpmi__adv-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--bpmi-text-mid);
  padding: 5px 0;
  border-bottom: 1px solid var(--bpmi-border);
}
.bpmi__adv-item:last-child { border-bottom: none; }
.bpmi__adv-more {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--bpmi-text-soft);
}

/* ═══════════════════════════════════════════════════════
   METHODOLOGY
   ═══════════════════════════════════════════════════════ */
.bpmi__methodology { max-width: 820px; }
.bpmi__method-title {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 800;
  color: var(--bpmi-navy);
}
.bpmi__method-section { margin-bottom: 26px; }
.bpmi__method-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bpmi-text);
  border-left: 3px solid var(--bpmi-gold);
  padding-left: 10px;
}
.bpmi__method-section p {
  margin: 0;
  font-size: 14px;
  color: var(--bpmi-text-mid);
  line-height: 1.7;
}
.bpmi__method-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.bpmi__method-cat {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  background: var(--bpmi-bg);
  border: 1px solid var(--bpmi-border);
  border-radius: var(--bpmi-r-md);
}
.bpmi__method-cat p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.bpmi__method-section--disclaimer {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--bpmi-r-lg);
  padding: 14px 18px;
}
.bpmi__method-section--disclaimer h4 { color: #92400E; border-left-color: #F59E0B; }
.bpmi__method-section--disclaimer p  { color: #78350F; }
.bpmi__method-section--source-files { }
.bpmi__source-files {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--bpmi-text-mid);
  line-height: 2;
}
.bpmi__source-files code {
  background: var(--bpmi-bg);
  border: 1px solid var(--bpmi-border);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.bpmi__source-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--bpmi-text-soft);
  font-style: italic;
}
.bpmi__method-footer {
  margin: 0;
  font-size: 12px;
  color: var(--bpmi-text-pale);
  font-style: italic;
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--bpmi-border);
}

/* ═══════════════════════════════════════════════════════
   CTA PANEL
   ═══════════════════════════════════════════════════════ */
.bpmi__cta-panel {
  margin-top: 22px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--bpmi-navy) 0%, var(--bpmi-navy-light) 100%);
  border-radius: var(--bpmi-r-lg);
  text-align: center;
}
.bpmi__cta-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #fff; }
.bpmi__cta-text  { margin: 0 0 14px; font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; }
.bpmi__cta-btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--bpmi-gold);
  color: var(--bpmi-navy);
  border-radius: var(--bpmi-r-md);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--bpmi-ease), transform var(--bpmi-ease);
}
.bpmi__cta-btn:hover { background: var(--bpmi-gold-light); transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 1280px (large tablets / small laptops)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .bpmi__stat-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 1024px
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .bpmi--ranking,
  .bpmi--details,
  .bpmi--compare,
  .bpmi--methodology { padding: 20px; }

  .bpmi__tab-panel { padding: 20px; }

  .bpmi__compare-selectors { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .bpmi__insights { grid-template-columns: 1fr 1fr; }
  .bpmi__insights .bpmi__insight-card:last-child { grid-column: span 2; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 768px (tablet portrait)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .bpmi--ranking,
  .bpmi--details,
  .bpmi--compare,
  .bpmi--methodology { padding: 16px; }

  .bpmi__tab-panel  { padding: 16px; }
  .bpmi__tab-btn    { padding: 12px 14px; font-size: 12px; gap: 5px; }

  /* Toolbar stacks */
  .bpmi__panel-toolbar  { flex-direction: column; align-items: stretch; gap: 8px; }
  .bpmi__toolbar-right  { flex-wrap: wrap; gap: 6px; }
  .bpmi__ctrl-search    { width: 100%; }
  .bpmi__ctrl-wrap      { flex: 1; min-width: 130px; }

  /* Selector bar */
  .bpmi__selector-bar { flex-direction: column; align-items: stretch; }
  .bpmi__selector-bar .bpmi__ctrl-wrap { max-width: 100%; }

  /* Summary card */
  .bpmi__summary-card    { flex-direction: column; text-align: center; gap: 12px; }
  .bpmi__summary-meta    { justify-content: center; gap: 16px; }
  .bpmi__summary-country { font-size: 19px; }
  .bpmi__summary-flag    { font-size: 44px; }

  /* Stat cards */
  .bpmi__stat-cards { grid-template-columns: repeat(3, 1fr); }

  /* Compare */
  .bpmi__compare-selectors {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .bpmi__compare-vs { margin: 0 auto; }

  /* Insights */
  .bpmi__insights { grid-template-columns: 1fr; }
  .bpmi__insights .bpmi__insight-card:last-child { grid-column: auto; }

  /* Advantages */
  .bpmi__advantages-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Pagination */
  .bpmi__pagination { justify-content: center; }

  /* Destinations toolbar */
  .bpmi__destinations-toolbar { flex-direction: column; align-items: stretch; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 480px (mobile)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .bpmi--ranking,
  .bpmi--details,
  .bpmi--compare,
  .bpmi--methodology { padding: 12px; }

  .bpmi__tab-panel  { padding: 12px; }

  /* Tabs — compact on mobile */
  .bpmi__tab-btn    { padding: 8px 12px 10px; font-size: 10px; letter-spacing: .05em; }
  .bpmi__tab-nav    { gap: 4px; padding: 10px 12px 0; }

  /* Stat cards 2 per row */
  .bpmi__stat-cards       { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .bpmi__stat-card        { padding: 12px 8px; }
  .bpmi__stat-card-count  { font-size: 20px; }
  .bpmi__stat-card-label  { font-size: 9.5px; }

  /* Summary */
  .bpmi__summary-flag    { font-size: 38px; }
  .bpmi__summary-country { font-size: 17px; }
  .bpmi__meta-value      { font-size: 17px; }

  /* Action buttons — stay inline even on small screens, just shrink */
  .bpmi__action-group { gap: 4px; }
  .bpmi__action-btn   { height: 28px !important; font-size: 10px; padding: 0 10px; }

  /* Pagination smaller */
  .bpmi__page-btn { min-width: 30px; height: 30px; font-size: 12px; padding: 0 6px; }
  .bpmi__pagination { gap: 2px; padding: 4px; border-radius: 10px; }

  /* Adv list shorter */
  .bpmi__adv-list { max-height: 180px; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — 360px (small Android)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .bpmi--ranking,
  .bpmi--details,
  .bpmi--compare,
  .bpmi--methodology { padding: 10px; }

  .bpmi__stat-cards { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .bpmi__filters    { gap: 4px; }
  .bpmi__filter     { padding: 4px 9px; font-size: 11px; }
}

/* ═══════════════════════════════════════════════════════
   SIDE DRAWER — passport details panel
   Opens from right (LTR). Slides from left on RTL.
   ═══════════════════════════════════════════════════════ */

/* ── Overlay ────────────────────────────────────────── */
.bpmi-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(11, 30, 61, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0s linear 0.26s;
}
.bpmi-drawer-overlay--open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.26s ease;
}

/* ── Drawer panel ───────────────────────────────────── */
.bpmi-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  width: min(560px, 94vw);
  background: #fff;
  box-shadow: -6px 0 40px rgba(11, 30, 61, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.bpmi-drawer--open {
  transform: translateX(0);
}

/* RTL: drawer opens from left */
[dir="rtl"] .bpmi-drawer {
  right: auto;
  left: 0;
  box-shadow: 6px 0 40px rgba(11, 30, 61, 0.18);
  transform: translateX(-100%);
}
[dir="rtl"] .bpmi-drawer--open {
  transform: translateX(0);
}

/* ── Drawer header ──────────────────────────────────── */
/*
 * PHP outputs:
 *   .bpmi-drawer__header
 *     .bpmi-drawer__flag
 *     .bpmi-drawer__title-group
 *       h2.bpmi-drawer__country
 *       span.bpmi-drawer__meta
 *     button.bpmi-drawer__close
 */
.bpmi-drawer__header {
  flex-shrink: 0;
  display: flex;                    /* flex row: flag | title-group | (close btn absolute) */
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(135deg, var(--bpmi-navy) 0%, var(--bpmi-navy-light) 100%);
  padding: 16px 52px 14px 16px;    /* right padding makes space for absolute close btn */
  position: relative;
}
/* Legacy selector — kept so old cached HTML still works */
.bpmi-drawer__header-top { display: contents; }

.bpmi-drawer__flag {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

/* PHP class for the title + meta wrapper */
.bpmi-drawer__title-group,
.bpmi-drawer__identity {
  flex: 1;
  min-width: 0;
}

/*
 * Country name — must stay white on navy.
 * id + element selectors give the highest possible specificity
 * without JavaScript, overriding any theme h2 rule.
 */
#bpmi-drawer h2.bpmi-drawer__country,
#bpmi-drawer .bpmi-drawer__country,
.bpmi-drawer .bpmi-drawer__country,
h2.bpmi-drawer__country,
.bpmi-drawer__country {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff !important;
  background: transparent !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #ffffff !important; /* Safari gradient-text override */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.bpmi-drawer__meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.bpmi-drawer__meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.bpmi-drawer__meta-chip strong {
  color: var(--bpmi-gold-light);
  font-weight: 700;
}

/* ── Close button — icon only, orange, no background box ── */
#bpmi-drawer-close,
.bpmi-drawer__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 28px !important;
  height: 28px !important;
  padding: 5px !important;
  border-radius: 50% !important;
  border: none !important;
  /* No background — just the icon */
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  /* Orange icon */
  color: var(--bpmi-orange) !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
  line-height: 1;
}
#bpmi-drawer-close svg,
.bpmi-drawer__close svg {
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0;
  display: block;
}
#bpmi-drawer-close:hover,
.bpmi-drawer__close:hover {
  background: rgba(242, 169, 0, 0.15) !important;
  color: var(--bpmi-orange-dark) !important;
  transform: scale(1.12);
}
[dir="rtl"] #bpmi-drawer-close,
[dir="rtl"] .bpmi-drawer__close {
  right: auto !important;
  left: 14px !important;
}

/* ── Stat cards row ─────────────────────────────────── */
.bpmi-drawer__stats {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* 5 types + total */
  gap: 0;
  background: var(--bpmi-bg);
  border-bottom: 1px solid var(--bpmi-border);
}
.bpmi-drawer__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border-right: 1px solid var(--bpmi-border);
  text-align: center;
  cursor: default;
}
.bpmi-drawer__stat:last-child { border-right: none; }
.bpmi-drawer__stat-value {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  color: var(--bpmi-text); /* default; overridden per type below */
}
.bpmi-drawer__stat-label {
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bpmi-text-soft);
  line-height: 1.3;
}
/* Stat colours by type */
.bpmi-drawer__stat--vf  .bpmi-drawer__stat-value { color: var(--bpmi-vf-fg);  }
.bpmi-drawer__stat--voa .bpmi-drawer__stat-value { color: var(--bpmi-voa-fg); }
.bpmi-drawer__stat--eta .bpmi-drawer__stat-value { color: var(--bpmi-eta-fg); }
.bpmi-drawer__stat--ev  .bpmi-drawer__stat-value { color: var(--bpmi-ev-fg);  }
.bpmi-drawer__stat--vr  .bpmi-drawer__stat-value { color: var(--bpmi-vr-fg);  }

/* ── Toolbar (search + filter chips) ───────────────── */
.bpmi-drawer__toolbar {
  flex-shrink: 0;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--bpmi-border);
  background: var(--bpmi-bg);
}
.bpmi-drawer__search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.bpmi-drawer__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bpmi-text-soft);
  display: flex;
  pointer-events: none;
}
.bpmi-drawer__search {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--bpmi-border);
  border-radius: var(--bpmi-r-md);
  font-size: 13px;
  color: var(--bpmi-text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bpmi-drawer__search:focus {
  border-color: var(--bpmi-orange);
  box-shadow: 0 0 0 3px rgba(242,169,0,.20);
}
.bpmi-drawer__search::placeholder { color: var(--bpmi-text-pale); }
.bpmi-drawer__chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bpmi-drawer__chips::-webkit-scrollbar { display: none; }
.bpmi-drawer__chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1.5px solid var(--bpmi-border) !important;
  background:       #ffffff              !important;
  background-color: #ffffff              !important;
  background-image: none                 !important;
  font-size: 11px;
  font-weight: 700;
  color:      var(--bpmi-text-mid)       !important;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.03em;
  box-shadow: none !important;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.bpmi-drawer__chip:hover {
  border-color: var(--bpmi-orange);
  color: var(--bpmi-orange-dark);
}
.bpmi-drawer__chip--active,
.bpmi-drawer__chip[aria-pressed="true"] {
  background:   var(--bpmi-orange) !important;
  border-color: var(--bpmi-orange) !important;
  color:        #ffffff            !important;
}

/* ── Body (scrollable destination list) ─────────────── */
/* .bpmi-drawer__body kept for legacy — PHP outputs .bpmi-drawer__destinations */
.bpmi-drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
}

/* Actual PHP-rendered scrollable container */
.bpmi-drawer__destinations {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0;
  min-height: 0; /* Critical: allow flex child to shrink below content size */
}

/* ── Loading state ──────────────────────────────────── */
.bpmi-drawer__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: var(--bpmi-text-soft);
  font-size: 13.5px;
}
.bpmi-drawer__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--bpmi-border);
  border-top-color: var(--bpmi-gold);
  border-radius: 50%;
  animation: bpmi-spin 0.75s linear infinite;
}

/* ── Destination list items ─────────────────────────── */
.bpmi-drawer__dest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bpmi-drawer__dest-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  border-bottom: 1px solid #EDF1F8; /* lighter than --bpmi-border for better rhythm */
  transition: background 0.12s ease;
}
.bpmi-drawer__dest-item:last-child { border-bottom: none; }
.bpmi-drawer__dest-item:hover      { background: #EEF4FF; }
.bpmi-drawer__dest-flag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.bpmi-drawer__dest-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--bpmi-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bpmi-drawer__dest-code {
  font-size: 10px;
  color: var(--bpmi-text-pale);
  font-weight: 600;
  letter-spacing: .04em;
  flex-shrink: 0;
}

/* ── Empty / no results ─────────────────────────────── */
.bpmi-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--bpmi-text-soft);
  text-align: center;
  font-size: 14px;
}
.bpmi-drawer__empty p { margin: 0; }

/* ── Body scroll lock ───────────────────────────────── */
body.bpmi-drawer-open {
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   DRAWER RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  .bpmi-drawer             { width: 100vw; max-width: 100vw; }
  .bpmi-drawer__header     { padding: 14px 44px 12px 14px; }
  .bpmi-drawer__flag       { font-size: 30px; }
  .bpmi-drawer__country    { font-size: 15px !important; }
  .bpmi-drawer__close,
  #bpmi-drawer-close     { width: 26px !important; height: 26px !important; top: 10px !important; right: 10px !important; padding: 4px !important; }
  .bpmi-drawer__close svg,
  #bpmi-drawer-close svg { width: 14px !important; height: 14px !important; }
  .bpmi-drawer__stats      { grid-template-columns: repeat(6, 1fr); }
  .bpmi-drawer__stat-value { font-size: 14px; }
  .bpmi-drawer__stat-label { font-size: 7px; }
}

@media (max-width: 360px) {
  .bpmi-drawer__stats      { grid-template-columns: repeat(3, 1fr); }
  .bpmi-drawer__stat       { padding: 9px 4px; }
  .bpmi-drawer__stat-value { font-size: 13px; }
  .bpmi-drawer__stat-label { font-size: 7px; }
}

/* ═══════════════════════════════════════════════════════
   IMPROVE MOBILITY  [bpmi_improve_mobility]
   ═══════════════════════════════════════════════════════ */
.bpmi--improve { padding: 0; }
.bpmi__improve-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  background: linear-gradient(135deg, var(--bpmi-navy) 0%, var(--bpmi-navy-light) 100%);
  border-radius: var(--bpmi-r-xl);
  padding: 36px 40px;
  color: #fff;
}
[dir="rtl"] .bpmi__improve-inner { flex-direction: row-reverse; text-align: right; }
.bpmi__improve-icon { flex-shrink: 0; color: var(--bpmi-gold); opacity: .85; }
.bpmi__improve-body { flex: 1; }
.bpmi__improve-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.bpmi__improve-text {
  margin: 0 0 22px;
  font-size: 14px;
  color: rgba(255,255,255,.82);
  line-height: 1.6;
}
.bpmi__improve-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
[dir="rtl"] .bpmi__improve-actions { justify-content: flex-end; }
.bpmi__improve-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 22px;
  border-radius: var(--bpmi-r-md);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background var(--bpmi-ease), box-shadow var(--bpmi-ease), transform var(--bpmi-ease);
}
.bpmi__improve-btn:active { transform: scale(.97); }
.bpmi__improve-btn--primary {
  background: var(--bpmi-gold) !important;
  color: var(--bpmi-navy)      !important;
  border: none !important;
}
.bpmi__improve-btn--primary:hover {
  background: var(--bpmi-orange-dark) !important;
  box-shadow: 0 4px 16px rgba(217,142,0,.45);
}
.bpmi__improve-btn--secondary {
  background: transparent                !important;
  color: #fff                            !important;
  border: 2px solid rgba(255,255,255,.5) !important;
}
.bpmi__improve-btn--secondary:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.9) !important;
}
@media (max-width: 640px) {
  .bpmi__improve-inner   { flex-direction: column; text-align: center; padding: 28px 20px; }
  [dir="rtl"] .bpmi__improve-inner { flex-direction: column; }
  .bpmi__improve-icon    { display: none; }
  .bpmi__improve-title   { font-size: 18px; }
  .bpmi__improve-actions { justify-content: center; }
}
