.edb-nzmap{width:100%;color:#fff; position: relative;}
.edb-nzmap__grid{display:grid;grid-template-columns:1.1fr .9fr;gap:28px;align-items:end}
@media (max-width:900px){.edb-nzmap__grid{grid-template-columns:1fr}}
.edb-nzmap__heading{margin:0 0 10px;font-weight:500; font-family: 'Poppins'; color: #fff; text-align: center; margin: 0 auto 25px auto; font-size:clamp(18px,2.2vw,22px);opacity:.8}
.edb-nzmap__svg svg{width:100%;height:auto;display:block}

/* Force your SVG classes to take our colors */
.edb-nzmap .cls-2{fill:var(--map)!important}
.edb-nzmap .cls-3{fill:var(--pin)!important}

/* Regions become clickable via JS (we target children .cls-2 so base Map stays map color) */
.edb-region{cursor:pointer}
.edb-region .cls-2{transition:fill .2s ease}
.edb-region.is-hover .cls-2{fill:var(--hover)!important}
.edb-region.is-active .cls-2{fill:var(--active)!important}

/* Pins */
/* Animate the inner shape, not the wrapper that holds the base transform */
.edb-pin-shape { pointer-events: none; transform-box: fill-box; transform-origin: center; }
.edb-pin.is-active .edb-pin-shape {
  animation: edb-bob 1s ease-in-out infinite;
}

@keyframes edb-bob {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}


/* Panel */
.edb-nzmap__panel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px}
.edb-nzmap__logo-wrap{min-height:60px; width:100%; margin-bottom: 20px; max-height: 155px; display:flex;align-items:center;justify-content:center}
.edb-nzmap__logo{max-width:270px; margin-bottom: 40px; width: 100%;  height:auto;display:block;filter:drop-shadow(0 6px 16px rgba(0,0,0,.2)); transition: all .2s ease; }
.edb-nzmap__region-name{font-size:clamp(22px,3vw,32px);font-weight:700;text-align:center; transition: all .2s ease;}
.edb-nzmap__buttons{display:flex;gap:14px;flex-wrap:wrap;justify-content:center; margin-top: 15px;}
.edb-nzmap__btn{    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
    font-family: 'Poppins';
    width: 100%;
    text-align: center;
    transition: all .2s ease-in-out;
}
.edb-nzmap__btn--ghost{background: #fff; color: #05465B; outline: 2px solid #fff;}
.edb-nzmap__btn--ghost:active{background: var(--map); color: #fff; outline: 2px solid #fff;}
.edb-nzmap__btn--ghost:hover{background: rgba(255,255,255,.6); color: #05465B; outline: 2px solid #fff;}
.edb-nzmap__btn--primary{background:transparent;color:#fff;outline:2px solid rgba(255,255,255,.5)}
.edb-nzmap__btn--primary:hover{outline-color:#fff}
.edb-nzmap__btn.is-saved{box-shadow:0 0 0 3px rgba(255,255,255,.6) inset}

/* Fade/slide swap for label + logo */
.edb-nzmap__region-name,
.edb-nzmap__logo {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .24s ease, transform .24s ease;
  will-change: opacity, transform;
}
.edb-fade-out {
  opacity: 0;
  transform: translateY(4px);
}

/* Optional: reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .edb-nzmap__region-name,
  .edb-nzmap__logo {
    transition: none;
  }
}

/* toast host sits bottom-right of the module */
.edb-toast-host{
  position:absolute; right:12px; bottom:12px;
  display:flex; flex-direction:column; gap:10px;
  z-index:5; pointer-events:none;
}

/* toast */
.edb-toast{
  pointer-events:none;
  background:#fff; color:#0a3a41;
  border-radius:12px; padding:15px 20px;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
  font-weight:600; line-height:1.2;
  font-family: 'Poppins';
  font-size: 14px;
  opacity:0; transform:translateY(6px);
  transition:opacity .22s ease, transform .22s ease;
  max-width:min(320px, 80vw);
  border-left:4px solid transparent;
}

.edb-toast.is-enter{ opacity:1; transform:translateY(0); }
.edb-toast.is-leave{ opacity:0; transform:translateY(6px); }

@media (prefers-reduced-motion: reduce) {
  .edb-toast{ transition:none; }
}

.edb-nzmap__homepage .edb-nzmap__panel, .findeducatorpage .edb-nzmap__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #05465B;
  padding: 50px 30px;
  border-radius: 1rem;
  width: 420px;
  position: absolute;
  bottom: -40px;
  right: -30px;
}
.findeducatorpage .edb-nzmap__panel {
  right: -120px;
}
.edb-nzmap__panel[hidden] { display: none !important; }

.edb-nzmap__homepage {
  margin-left: 140px;
}
.edb-nzmap__homepage .edb-nzmap__heading {
  display:none;
}
.findeducatorpage .edb-nzmap__heading {
  color: #05465B;
  font-weight: 600;
  font-size: 26px;
}
.edb-nzmap__big_heading {
  color: #05465B;
  font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2em;
  text-align: center;
}
.edb-nzmap__big_heading3 {
  font-family: 'Lemon Tuesday', Helvetica, Arial, Lucida, sans-serif;
  font-size: 36px;
  color: #F16461 !important;
  line-height: 1.2em;
  text-align: center;
  margin-bottom: 20px;
}
.edb-nzmap__homepage .edb-toast-host, .findeducatorpage .edb-toast-host{
  position:absolute; right:12px; bottom:-98px;
  display:flex; flex-direction:column; gap:10px;
  z-index:5; pointer-events:none;
}
@media (max-width:640px) {
  .edb-nzmap__homepage {
    margin-left: 0;
  }
  .edb-nzmap__homepage .edb-nzmap__panel, .findeducatorpage .edb-nzmap__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #05465B;
  padding: 50px 30px;
  border-radius: 1rem;
  width: 100%;
  margin-top: 60px;
  position: relative;
  bottom: 0;
  right: 0;
}
}


/* Find an Educator Page */

.findeducatorpage .edb-nzmap {
  max-width: 800px;
  margin: 0 auto;
}

/* Smooth animation for the map */
.edb-nzmap__map {
  transition: transform 320ms cubic-bezier(.22,.61,.36,1), opacity 220ms ease;
  will-change: transform;
}

/* When NO region is selected, slide the map to the right a bit */
.edb-nzmap:not([data-selected]) .edb-nzmap__map {
  transform: translateX(6rem);   /* tweak distance to taste */
  opacity: 0.96;                 /* optional: a subtle dim */
}

/* When a region IS selected, reset it (your current position) */
.edb-nzmap[data-selected] .edb-nzmap__map {
  transform: translateX(0);
  opacity: 1;
}

/* Optional: also slide/fade the panel in for a nice paired motion */
.edb-nzmap__panel {
  transition: transform 320ms cubic-bezier(.22,.61,.36,1), opacity 220ms ease;
  transform: translateX(-1rem);
  opacity: 0;
}
.edb-nzmap[data-selected] .edb-nzmap__panel {
  transform: translateX(0);
  opacity: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .edb-nzmap__map,
  .edb-nzmap__panel {
    transition: none;
  }
}

/* --- HOMEPAGE VARIANT: keep the map fixed, no shift --- */
.edb-nzmap.edb-nzmap__homepage .edb-nzmap__map {
  transform: none !important;
  opacity: 1 !important;
}

/* Prevent the "no selection" shift specifically */
.edb-nzmap.edb-nzmap__homepage:not([data-selected]) .edb-nzmap__map {
  transform: none !important;
  opacity: 1 !important;
}

/* (Optional) Disable the homepage map transition entirely */
.edb-nzmap.edb-nzmap__homepage .edb-nzmap__map {
  transition: none;
}