/* Destination picker: regions rail + A–Z bar + horizontally scrollable
   letter-grouped country tray (sales + install pages). */

.dest-picker {
  padding-block: var(--space-7);
}

.dest-picker__layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

/* The tray's letter groups have a wide intrinsic content width; without an
   explicit min-width the grid track sizes to fit them unclipped, blowing out
   the whole page's horizontal overflow instead of the tray scrolling. */
.dest-picker__countries {
  min-width: 0;
}

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

.dest-picker__regions ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dest-picker__regions a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 0;
  color: var(--color-text);
  font-size: var(--text-body);
}

.dest-picker__regions a:hover {
  color: var(--color-action);
  text-decoration: none;
}

.dest-picker__region-icon {
  width: 42px;
  height: 28px;
}

.dest-picker__letters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  margin-bottom: var(--space-4);
}

.dest-picker__letters button {
  border: 0;
  background: none;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  padding: 4px 7px;
  border-radius: var(--radius-btn);
}

.dest-picker__letters button:hover:not(:disabled),
.dest-picker__letters button.is-active {
  background: var(--color-bg-alt);
  color: var(--color-action);
}

.dest-picker__letters button.is-active {
  font-weight: 600;
}

.dest-picker__letters button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Anchor-arrival glow: a brief orange halo on the destination the A–Z bar
   jumped to, so the eye catches the landing point (see js/az-filter.js). */
@keyframes az-flash {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 146, 11, 0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(245, 146, 11, 0.85);
  }
}

/* Two quick pulses (0.5s each) once the tray has finished scrolling to the
   letter (js/az-filter.js fires this on scrollend). */
.az-flash {
  animation: az-flash 0.5s ease-out 2;
}

.dest-picker__tray {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-behavior: smooth;
}

.dest-picker__group {
  flex: none;
}

.dest-picker__letter {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.dest-picker__list {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(6, auto);
  gap: 0 var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.dest-picker__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 0;
  width: 205px;
  color: var(--color-text);
  font-size: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dest-picker__item:hover {
  color: var(--color-action);
  text-decoration: none;
}

.dest-picker__flag {
  width: 24px;
  height: 18px;
  border-radius: 3px;
}

@media (max-width: 1024px) {
  .dest-picker__layout {
    grid-template-columns: 1fr;
  }
}
