/* PARTNER destinations browse (`.pd`, both partnerships): the live partner
   layout — regions list on the left, the A–Z country tray on the right.
   Mobile (≤1024px): the columns collapse into the house pill pattern with two
   pills (Countries / Regions) toggling the panels via the shared data-tabs
   behavior; desktop shows BOTH panels side by side, so the pills hide and the
   tab-set `hidden` attribute is overridden. Renders only on partner sites —
   the main section keeps its own styles (home.css / destination-picker.css). */

.pd__tabs {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.pd__label {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.pd__region-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pd__region-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-btn);
  color: var(--color-text);
}

.pd__region-list a:hover {
  background: var(--color-bg-alt);
  color: var(--color-action);
}

.pd__region-icon {
  width: 30px;
  height: 20px;
  flex: 0 0 auto;
}

/* Same column-flow tray semantics as main's Countries tab (home.css
   .home-countries__grid): a vertical waterfall flowing into columns that
   scrolls horizontally; the A–Z bar anchors to the inline letter markers. */
.pd__grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, auto);
  grid-auto-columns: 13.5rem;
  gap: 2px var(--space-3);
  overflow-x: auto;
  overflow-y: hidden;
  /* Gutter the az-filter lands jumped-to letters at (see js/az-filter.js). */
  padding: 3px var(--space-3) var(--space-4);
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

.pd__grid::-webkit-scrollbar {
  height: 4px;
}

.pd__grid::-webkit-scrollbar-track {
  background: transparent;
}

.pd__grid::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: var(--radius-pill);
}

/* A–Z jump bar: spans the FULL width of the countries column with the letters
   spread evenly across it (the shared .dest-picker__letters is inline-width;
   here it fills the column). Scoped to .pd so main's picker is untouched. */
.pd .dest-picker__letters {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.pd__country {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-btn);
  color: var(--color-text);
}

.pd__country:hover {
  background: var(--color-bg-alt);
  color: var(--color-action);
}

.pd__flag {
  width: 30px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 4px;
}

.pd__name {
  font-size: 0.9375rem;
  line-height: 1.3;
}

@media (min-width: 1025px) {
  .pd__tabs {
    display: none;
  }

  .pd__layout {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
  }

  /* Desktop always shows both panels — override the mobile tab toggling
     (data-tabs sets `hidden`; a resize after toggling must not lose a column). */
  .pd__layout [data-tab-panel][hidden] {
    display: block;
  }
}

@media (max-width: 1024px) {
  /* The pills already name the visible panel. */
  .pd__label {
    display: none;
  }

  /* A–Z bar stays ONE line and scrolls/drags side to side instead of wrapping
     to two rows — letters keep their natural size, the row overflows. */
  .pd .dest-picker__letters {
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* clean row; it's obviously draggable */
  }

  .pd .dest-picker__letters::-webkit-scrollbar {
    display: none;
  }

  .pd .dest-picker__letters button {
    flex: 0 0 auto;
  }
}
