/**
 * Regional site suggestion banner and region switcher.
 *
 * The banner is injected at the top of <body> by js/pz_global.js when the
 * visitor's IP suggests a different regional site from the one the URL serves.
 *
 * Styling deliberately mirrors pztheme's own conventions rather than inventing
 * a look: .pz-button is 16px/bold with a 40px pill radius on --core-color, and
 * .pz-button-transparent is the same size with a 2px outline. Reusing those
 * makes the banner read as part of the site instead of a bolted-on notice.
 *
 * Brand custom properties come from the active theme
 * (pztheme/css/global/colorPallete.css). Every var() carries a literal
 * fallback because this module renders under seventeen themes, and the ones
 * that never defined the palette would otherwise get unstyled controls.
 *
 * The band is --accent-1 rather than the lighter --accent-2: the site header
 * is itself --accent-2, so a lavender banner would merge into it instead of
 * announcing itself.
 *
 * Sizes are absolute (px) rather than em or %, because body is set to 87.5%
 * (14px) — sizing relative to that is what made the first version feel too
 * small. The theme states its own button size in px for the same reason.
 */

.pz-region-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  padding: 1.125rem 1.5rem;
  background: var(--accent-1, #37155C);
  border-bottom: 3px solid var(--core-color, #8F27F6);
  color: #fff;
  /* Inherit the theme's face (proxima-nova) rather than naming it, so the
     banner follows whichever theme is active. */
  font-family: inherit;
  font-size: 21px;
  line-height: 1.4;
}

.pz-region-banner__message {
  flex: 0 1 auto;
  margin: 0;
  font-weight: 600;
}

/* Buttons carry the theme's pill geometry. font: inherit first, because a
   <button> would otherwise fall back to the browser's UI font. */
.pz-region-banner__accept,
.pz-region-banner__dismiss {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pz-region-banner__accept {
  padding: 0.75rem 2rem;
  border: 2px solid #fff;
  border-radius: 40px;
  background-color: #fff;
  color: var(--accent-1, #37155C);
  text-decoration: none;
}

.pz-region-banner__accept:hover,
.pz-region-banner__accept:focus-visible {
  background-color: var(--core-color, #8F27F6);
  border-color: var(--core-color, #8F27F6);
  color: #fff;
  text-decoration: none;
}

.pz-region-banner__dismiss {
  padding: 0.75rem 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 40px;
  background: transparent;
  color: #fff;
}

.pz-region-banner__dismiss:hover,
.pz-region-banner__dismiss:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Keyboard focus must stay visible against a coloured band. */
.pz-region-banner__accept:focus-visible,
.pz-region-banner__dismiss:focus-visible {
  outline: 3px solid var(--green-accent-1, #50F2BB);
  outline-offset: 2px;
}

@media only screen and (max-width: 830px) {
  .pz-region-banner {
    /* Stacked and full-width below the theme's own breakpoint: side-by-side
       pills wrap awkwardly on a phone. */
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 18px;
    text-align: center;
  }

  .pz-region-banner__accept,
  .pz-region-banner__dismiss {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}

/* -------------------------------------------------------------------------
   Region switcher block
   ------------------------------------------------------------------------- */

.pz-region-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
}

.pz-region-switcher a {
  color: var(--core-color, #8F27F6);
  font-weight: 600;
  text-decoration: none;
}

.pz-region-switcher a:hover,
.pz-region-switcher a:focus-visible {
  text-decoration: underline;
}

.pz-region-switcher .is-active {
  color: var(--accent-1, #37155C);
  font-weight: 800;
  text-decoration: none;
  cursor: default;
}
