/* Gamblee browsing-market selector. */

.g-market-selector {
  --market-border: #dfe5ee;
  --market-border-hover: #cdd6e2;
  --market-background: #ffffff;
  --market-background-hover: #f8fafc;
  --market-text: #263b5b;
  --market-muted: #8190a5;
  --market-divider: #e3e8ef;
  --market-focus: rgba(106, 150, 211, 0.20);

  position: relative;
  flex: 0 0 auto;
  color: var(--market-text);
}

.g-market-selector[hidden],
.g-market-selector__enhanced[hidden],
.g-market-selector__menu[hidden] {
  display: none;
}

.g-market-selector.is-enhanced .g-market-selector__fallback {
  display: none;
}

.g-market-selector__fallback-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.g-market-selector__fallback-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.g-market-selector__fallback-select,
.g-market-selector__fallback-submit {
  height: 38px;
  border: 1px solid var(--market-border);
  border-radius: 10px;
  background: var(--market-background);
  color: var(--market-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.g-market-selector__fallback-select {
  min-width: 108px;
  padding: 0 30px 0 10px;
}

.g-market-selector__fallback-submit {
  padding: 0 10px;
  cursor: pointer;
}

.g-market-selector__fallback-select:focus,
.g-market-selector__fallback-submit:focus-visible {
  outline: 3px solid var(--market-focus);
  outline-offset: 2px;
}

.g-market-selector__enhanced {
  position: relative;
}

.g-market-selector__button {
  display: inline-grid;
  grid-template-columns: 34px minmax(0, auto) 7px;
  align-items: center;
  gap: 8px;
  min-width: 88px;
  height: 38px;
  margin: 0;
  padding: 0 10px 0 9px;
  border: 1px solid var(--market-border);
  border-radius: 10px;
  background: var(--market-background);
  color: var(--market-text);
  box-shadow: 0 1px 2px rgba(31, 49, 75, 0.04);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.g-market-selector__button:hover,
.g-market-selector.is-open .g-market-selector__button {
  border-color: var(--market-border-hover);
  background: var(--market-background-hover);
  box-shadow: 0 3px 10px rgba(31, 49, 75, 0.07);
}

.g-market-selector__button:focus-visible {
  outline: 3px solid var(--market-focus);
  outline-offset: 2px;
}

.g-market-selector__flag {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 34px;
  height: 18px;
  padding-right: 10px;
  overflow: hidden;
  border-right: 1px solid var(--market-divider);
  color: #7386a2;
}

.g-market-selector__flag-image,
.g-market-selector__flag img {
  display: block;
  width: 22px;
  height: 12px;
  max-width: 22px;
  max-height: 12px;
  margin: 0;
  border-radius: 1.5px;
  object-fit: contain;
  object-position: center;
}
.g-market-selector__flag-image--globe {
  width: 15px;
  height: 15px;
  max-width: 15px;
  max-height: 15px;
  margin-left: 2px;
  border-radius: 0;
  object-fit: initial;
}

.g-market-selector__current {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.g-market-selector__chevron {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.25px solid var(--market-muted);
  border-bottom: 1.25px solid var(--market-muted);
  transform: rotate(45deg);
  transition: margin 160ms ease, transform 160ms ease;
}

.g-market-selector.is-open .g-market-selector__chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}

.g-market-selector__menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 210px;
  max-height: min(320px, 55vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #e0e6ee;
  border-radius: 13px;
  background: #fff;
  box-shadow:
    0 18px 42px rgba(37, 55, 82, 0.12),
    0 5px 14px rgba(37, 55, 82, 0.05);
  z-index: 1300;
}

.g-market-selector__option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #384b66;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.g-market-selector__option:hover,
.g-market-selector__option:focus-visible {
  background: #f7f9fc;
  color: #263b5b;
  outline: none;
}

.g-market-selector__option[aria-checked="true"] {
  background: #f3f6fa;
  color: #263b5b;
  font-weight: 650;
}

.g-market-selector__check {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  opacity: 0;
}

.g-market-selector__option[aria-checked="true"] .g-market-selector__check {
  opacity: 1;
}

.g-market-selector__check::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #7890b2;
  border-bottom: 2px solid #7890b2;
  transform: rotate(45deg);
}

.g-market-selector--header {
  display: none;
}

.g-market-selector--sidebar {
  width: 100%;
}

.g-market-selector--sidebar .g-market-selector__enhanced,
.g-market-selector--sidebar .g-market-selector__button,
.g-market-selector--sidebar .g-market-selector__fallback,
.g-market-selector--sidebar .g-market-selector__fallback-row {
  width: 100%;
}

.g-market-selector--sidebar .g-market-selector__button {
  grid-template-columns: 34px minmax(0, 1fr) 7px;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  font-size: 13px;
  text-align: left;
  box-shadow: 0 2px 7px rgba(35, 52, 81, 0.04);
}

.g-market-selector--sidebar .g-market-selector__current {
  text-align: left;
}

.g-market-selector--sidebar .g-market-selector__menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  width: 100%;
}

.g-market-selector--sidebar .g-market-selector__fallback-select {
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
}

@media (min-width: 768px) {
  .g-market-selector--header {
    display: block;
    margin-left: 10px;
    margin-right: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-market-selector__button,
  .g-market-selector__chevron {
    transition: none;
  }
}

/* Bonus-listing availability switcher. */
.g-listing-country-switcher {
  --listing-market-frame: #c5d9f3;
  --listing-market-frame-strong: #afc9ec;
  --listing-market-surface: #ffffff;
  --listing-market-selected: #dbe8ff;
  --listing-market-selected-border: #b7cdf4;
  --listing-market-text: #304a73;
  --listing-market-muted: #7186a7;
  --listing-market-focus: rgba(91, 136, 202, 0.22);

  position: relative;
  width: 100%;
  margin: 0 0 14px;
  color: var(--listing-market-text);
  box-sizing: border-box;
  z-index: 15;
}

.g-listing-country-switcher .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.g-listing-country-switcher[hidden],
.g-listing-country-switcher__picker[hidden],
.g-listing-country-switcher__country-row[hidden],
.g-listing-country-switcher__empty[hidden] {
  display: none !important;
}

.g-listing-country-switcher--mobile {
  display: none;
}

/* The frame is the control itself: no padded card behind it. */
.g-listing-country-switcher__frame {
  position: relative;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--listing-market-frame);
  border-radius: 14px;
  background: var(--listing-market-surface);
  box-shadow: 0 8px 22px rgba(55, 82, 122, 0.055);
  box-sizing: border-box;
}

.g-listing-country-switcher__toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 0;
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  background: #ffffff;
}

.g-listing-country-switcher__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--listing-market-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.g-listing-country-switcher__option--country {
  justify-content: flex-start;
}

.g-listing-country-switcher__option + .g-listing-country-switcher__option {
  border-left: 1px solid var(--listing-market-frame);
}

.g-listing-country-switcher__option:hover {
  background: #f3f7fd;
  color: var(--listing-market-text);
}

.g-listing-country-switcher__option.is-active {
  z-index: 1;
  background: var(--listing-market-selected);
  color: #3f5f93;
  box-shadow: none;
}

.g-listing-country-switcher__option:focus-visible,
.g-listing-country-switcher__change:focus-visible,
.g-listing-country-switcher__detected:focus-visible,
.g-listing-country-switcher__country-row:focus-visible {
  outline: 3px solid var(--listing-market-focus);
  outline-offset: 2px;
}

.g-listing-country-switcher__flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 28px;
  overflow: visible;
}

.g-listing-country-switcher__flag-image,
.g-listing-country-switcher__flag img {
  display: block;
  width: 36px;
  height: 24px;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 3px;
  object-fit: contain;
  object-position: center;
  box-shadow: 0 0 0 1px rgba(48, 74, 115, 0.10);
}


.g-listing-country-switcher__flag-asset {
  display: block;
  flex: 0 0 auto;
  width: 38px;
  height: 24px;
  border-radius: 3px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: 0 0 0 1px rgba(48, 74, 115, 0.10);
}

.g-listing-country-switcher__flag .g-market-selector__flag-image--globe {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  box-shadow: none;
}

.g-listing-country-switcher__flag-emoji {
  display: block;
  font-size: 25px;
  line-height: 1;
}

.g-listing-country-switcher__mobile-code,
.g-listing-country-switcher__mobile-chevron {
  display: none;
}

.g-listing-country-switcher--desktop .g-listing-country-switcher__mobile-code {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  color: #3f5f93;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Visually integrated lower segment, separated by one divider. */
.g-listing-country-switcher__change {
  display: block;
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px 8px;
  border: 0;
  border-top: 1px solid var(--listing-market-frame);
  border-radius: 0 0 13px 13px;
  background: #ffffff;
  color: #6581aa;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 150ms ease, color 150ms ease;
}

.g-listing-country-switcher__change:hover,
.g-listing-country-switcher.is-picker-open .g-listing-country-switcher__change {
  background: #f7faff;
  color: #3f5f93;
}

/* Keep the picker inside the listing sidebar; long names wrap inside the panel. */
.g-listing-country-switcher__picker {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  width: auto;
  max-height: min(420px, calc(100vh - 32px));
  margin: 0;
  padding: 10px 9px 10px 10px;
  overflow: hidden;
  border: 1px solid var(--listing-market-frame-strong);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(37, 55, 82, 0.14), 0 5px 14px rgba(37, 55, 82, 0.06);
  box-sizing: border-box;
}

/*
 * Desktop bonus-listing toolbar.
 * This changes only the presentation of Core's existing selector: the country,
 * All, picker, persistence, and listing events continue to use Core behavior.
 */
@media (min-width: 1025px) {
  .gmblee-tabs-country-slot {
    position: relative;
    z-index: 30;
    width: 252px;
  }

  .gmblee-tabs-country-slot > .g-listing-country-switcher--desktop {
    width: 100%;
    margin: 0;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__frame {
    display: block;
    border-color: #d9e3ee;
    border-radius: 10px;
    box-shadow: none;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__toggle {
    grid-template-columns: minmax(0, 1fr) 58px;
    border-radius: 9px;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__option {
    height: 42px;
    padding: 0 10px;
    font-size: 12px;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__option--country {
    gap: 7px;
    padding-right: 36px;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__flag {
    flex-basis: 30px;
    width: 30px;
    height: 20px;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__flag-image,
  .gmblee-tabs-country-slot .g-listing-country-switcher__flag img,
  .gmblee-tabs-country-slot .g-listing-country-switcher__flag-asset {
    width: 28px;
    height: 19px;
    border-radius: 2px;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__change {
    position: absolute;
    top: 0;
    right: 58px;
    z-index: 2;
    width: 30px;
    min-height: 42px;
    padding: 0;
    border-top: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__change::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    margin: -5px 0 0 -4px;
    border-right: 1.5px solid #7186a7;
    border-bottom: 1.5px solid #7186a7;
    transform: rotate(45deg);
    transition: margin 150ms ease, transform 150ms ease;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher.is-picker-open .g-listing-country-switcher__change::before {
    margin-top: -1px;
    transform: rotate(225deg);
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__change:hover,
  .gmblee-tabs-country-slot .g-listing-country-switcher.is-picker-open .g-listing-country-switcher__change {
    background: transparent;
  }

  .gmblee-tabs-country-slot .g-listing-country-switcher__picker {
    top: calc(100% + 7px);
    right: 0;
    left: auto;
    width: 320px;
  }
}

.g-listing-country-switcher__search-wrap {
  position: relative;
  margin-bottom: 8px;
}

.g-listing-country-switcher__search {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #d7e1ef;
  border-radius: 9px;
  outline: 0;
  background: #fbfdff;
  color: #304a73;
  box-shadow: none;
  font: inherit;
  font-size: 13px;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.g-listing-country-switcher__search:focus {
  border-color: #9fbce5;
  outline: 0;
  box-shadow: 0 0 0 3px var(--listing-market-focus);
}

.g-listing-country-switcher__search::placeholder {
  color: #8798b0;
}

.g-listing-country-switcher__detected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  margin: 0 0 7px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: #f3f7fd;
  color: #46648f;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.g-listing-country-switcher__detected:hover {
  background: #eaf2fd;
}

.g-listing-country-switcher__detected:disabled {
  display: none;
}

.g-listing-country-switcher__detected small {
  min-width: 0;
  overflow: hidden;
  color: #7d90ad;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.g-listing-country-switcher__list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0 0 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.g-listing-country-switcher__country-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #384f70;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  overflow: visible;
}

.g-listing-country-switcher__country-row:hover,
.g-listing-country-switcher__country-row:focus-visible {
  background: #f4f8fd;
  color: #263f64;
}

.g-listing-country-switcher__country-row[aria-selected="true"] {
  background: #edf4fe;
  color: #365a8d;
  font-weight: 700;
}

.g-listing-country-switcher__country-row-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 38px;
  min-width: 38px;
  height: 25px;
  overflow: visible;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(48, 74, 115, 0.14);
}

.g-listing-country-switcher__country-row-flag .g-listing-country-switcher__flag-image,
.g-listing-country-switcher__country-row-flag img {
  display: block;
  flex: 0 0 auto;
  width: 36px;
  min-width: 0;
  max-width: none;
  height: 24px;
  min-height: 0;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 3px;
  object-fit: contain;
  object-position: center;
  box-shadow: none;
}

.g-listing-country-switcher__country-row-flag .g-listing-country-switcher__flag-asset {
  display: block;
  width: 38px;
  height: 25px;
  border-radius: 3px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  box-shadow: none;
}

.g-listing-country-switcher__country-row-flag .g-listing-country-switcher__flag-emoji {
  font-size: 23px;
}

.g-listing-country-switcher__country-row-label {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}

.g-listing-country-switcher__country-row-check {
  position: relative;
  width: 16px;
  height: 16px;
  opacity: 0;
}

.g-listing-country-switcher__country-row[aria-selected="true"] .g-listing-country-switcher__country-row-check {
  opacity: 1;
}

.g-listing-country-switcher__country-row-check::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #6686b4;
  border-bottom: 2px solid #6686b4;
  transform: rotate(45deg);
}

.g-listing-country-switcher__empty {
  margin: 12px 4px 5px;
  color: #7c8da7;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1024px) {
  .g-listing-country-switcher--desktop {
    display: none;
  }

  .g-listing-country-switcher--mobile {
    display: block;
    width: 100%;
    margin: 0 0 10px;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__frame {
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(31, 47, 70, 0.055);
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__toggle {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 72px;
    border-radius: 999px;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__option {
    height: 42px;
    padding: 0 12px;
    font-size: 12px;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__option--country {
    justify-content: flex-start;
    gap: 9px;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__flag {
    display: inline-flex;
    flex: 0 0 38px;
    width: 38px;
    height: 25px;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__flag-image,
  .g-listing-country-switcher--mobile .g-listing-country-switcher__flag img {
    width: 36px;
    min-width: 0;
    max-width: none;
    height: 24px;
    min-height: 0;
    max-height: none;
    border-radius: 2px;
    object-fit: contain;
    object-position: center;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__flag-emoji {
    font-size: 22px;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__mobile-code {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    color: #3f5f93;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__mobile-chevron {
    display: inline-block;
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 150ms ease, margin-top 150ms ease;
  }

  .g-listing-country-switcher--mobile.is-picker-open .g-listing-country-switcher__mobile-chevron {
    margin-top: 3px;
    transform: rotate(225deg);
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__change {
    display: none;
  }

  .g-listing-country-switcher--mobile .g-listing-country-switcher__picker {
    top: calc(100% + 6px);
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 24px));
    max-height: min(520px, calc(100vh - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .g-listing-country-switcher__option,
  .g-listing-country-switcher__change,
  .g-listing-country-switcher__mobile-chevron {
    transition: none;
  }
}

.g-listing-country-switcher.opens-up .g-listing-country-switcher__picker {
  top: auto;
  bottom: calc(100% + 6px);
}

/* Final listing-country presentation. */
.g-listing-country-switcher__country-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  min-height: 46px;
  gap: 10px;
  max-width: 100%;
  padding: 8px 12px;
  overflow: visible;
}

.g-listing-country-switcher__country-row-flag {
  justify-self: start;
  width: 38px;
  min-width: 38px;
  height: 25px;
}

.g-listing-country-switcher__country-row-flag .g-listing-country-switcher__flag-image,
.g-listing-country-switcher__country-row-flag img {
  width: 36px;
  min-width: 0;
  max-width: none;
  height: 24px;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  object-position: center;
}

.g-listing-country-switcher__country-row-flag .g-listing-country-switcher__flag-asset {
  width: 38px;
  height: 25px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

@media (max-width: 1024px) {
  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile {
    grid-column: 1 / -1;
    grid-row: 1;
    display: block;
    width: 100%;
    margin: 0;
    z-index: 45;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__frame {
    border: 1px solid var(--listing-market-frame);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(31, 47, 70, 0.055);
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__toggle {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 72px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: none;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__option {
    height: 42px;
    padding: 0 12px;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__option--country {
    justify-content: flex-start;
    gap: 9px;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__flag {
    flex: 0 0 38px;
    width: 38px;
    height: 25px;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__flag-image,
  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__flag img {
    width: 36px;
    min-width: 0;
    max-width: none;
    height: 24px;
    min-height: 0;
    max-height: none;
    object-fit: contain;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__flag-asset {
    width: 36px;
    height: 23px;
    background-size: contain;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__mobile-code {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    color: #3f5f93;
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__option--all {
    font-size: 12px;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__mobile-chevron {
    width: 6px;
    height: 6px;
    margin-left: auto;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__change {
    display: none;
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile.is-picker-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1390;
    background: rgba(20, 36, 58, 0.10);
  }

  /* Mobile opens as a lightweight overlay so it never pushes cards down. */
  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__picker {
    position: fixed;
    top: 92px;
    right: 14px;
    bottom: auto;
    left: 14px;
    z-index: 1400;
    width: auto;
    max-height: min(68vh, 520px);
    margin: 0;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(37, 55, 82, 0.12);
  }

  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile.opens-up .g-listing-country-switcher__picker {
    top: auto;
    bottom: auto;
  }

  .gmblee-mobile-toolbar .g-listing-country-switcher__search {
    height: 42px;
  }

  .gmblee-mobile-toolbar .g-listing-country-switcher__list {
    max-height: min(38vh, 300px);
    padding-right: 0;
    padding-left: 0;
  }

  .gmblee-mobile-toolbar .g-listing-country-switcher__country-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    min-height: 46px;
    padding: 8px 12px;
  }

  .gmblee-mobile-toolbar .g-listing-country-switcher__country-row-flag {
    width: 38px;
    min-width: 38px;
    height: 25px;
  }
}

@media (max-width: 380px) {
  .gmblee-mobile-toolbar > .g-listing-country-switcher--mobile .g-listing-country-switcher__toggle {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 66px;
  }
}

.g-listing-country-switcher
.g-listing-country-switcher__list
> button.g-listing-country-switcher__country-row {
  width: 100%;
  max-width: 100%;
  margin: 0 !important;
}

/* Country selector: nested regulated Canadian regions. */
.g-market-selector__option--subdivision {
  position: relative;
  min-height: 38px;
  padding-left: 30px;
  color: #526782;
  font-size: 12.5px;
}

.g-market-selector__option--subdivision::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15px;
  width: 7px;
  height: 7px;
  border-bottom: 1px solid #b8c5d7;
  border-left: 1px solid #b8c5d7;
  transform: translateY(-70%);
}

.g-listing-country-switcher__country-row--subdivision {
  position: relative;
  min-height: 40px;
  padding-left: 30px;
  color: #526782;
  font-size: 12.5px;
}

.g-listing-country-switcher__country-row--subdivision::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 7px;
  height: 7px;
  border-bottom: 1px solid #b8c5d7;
  border-left: 1px solid #b8c5d7;
  transform: translateY(-70%);
}

.g-listing-country-switcher__country-row--subdivision .g-listing-country-switcher__country-row-flag {
  opacity: .78;
}
