.ais-platform-switcher { display: none; }

@media (max-width: 1024px) and (orientation: portrait) {
  /* Anchor to the control row, directly below its period selector. */
  .ais-mobile-v1.ais-platform-map .ais-map-heading > .ais-platform-switcher {
    display: flex !important;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    pointer-events: auto;
  }

  .ais-platform-switcher > a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    padding: 2px;
    border: 1px solid #d4e0e6;
    border-radius: 8px;
    box-shadow: 0 2px 7px #173b4929;
    text-decoration: none;
  }

  .ais-platform-switcher img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* The three colours match the active platform brand palettes. */
  .ais-platform-switcher > a[data-platform="Ship2Buy"] { background: #11263a; }
  .ais-platform-switcher > a[data-platform="Ship2Base"] { background: #20665c; }
  .ais-platform-switcher > a[data-platform="Ship2Work"] { background: #872b3d; }

  .ais-platform-switcher > a:focus-visible {
    outline: 3px solid var(--brand-map-focus, #147fc0);
    outline-offset: 2px;
  }

  .ais-mobile-v1.ais-platform-map .ais-location-warning {
    top: calc(214px + env(safe-area-inset-top)) !important;
  }

}
