/*
 * WOW ATLAS Global 2.0 — P1 country/home overlay.
 * Additive and reversible: native Angular handlers and data are preserved.
 */

:root {
  --p1-green: #103f38;
  --p1-green-2: #174d44;
  --p1-coral: #f45a48;
  --p1-mint: #cce5dd;
  --p1-paper: #fbf7ee;
  --p1-yellow: #f5ce66;
}

/* The P0 node stays in the DOM to avoid observer churn, but is fully retired. */
.p0-design-overlay .p0-onboarding-flight {
  display: none !important;
  animation: none !important;
}

/* Home H1: one straight, centred plane glyph with no skew or floating tilt. */
.p1-country-home .g2-plane {
  width: 68px !important;
  height: 68px !important;
  right: 14px !important;
  top: 15px !important;
  overflow: visible;
  fill: var(--p1-green) !important;
  stroke: none !important;
  filter: drop-shadow(5px 7px 0 rgba(219, 231, 215, .92)) !important;
  transform: none !important;
  animation: none !important;
}

.p1-country-home .g2-plane > .p1-plane-body {
  fill: var(--p1-green);
}

/* The country illustration now lives directly on Home. */
.wa-home-map-h1 .g2-home .g2-city-card {
  position: relative;
}

.wa-home-map-h1 .g2-home .g2-city-card__map[data-wa-home-preview] {
  background-image: var(--wa-h1-preview-art) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.wa-home-map-h1 .g2-home[data-wa-h1-preview="country"] .g2-city-card__map {
  background-color: rgba(251, 247, 238, .28) !important;
  background-size: contain !important;
  box-shadow: inset 0 0 0 1px rgba(16, 63, 56, .045);
}

.wa-home-map-h1 .g2-home[data-wa-h1-preview="city"] .g2-city-card__map {
  background-size: cover !important;
}

.wa-home-map-h1 .g2-home .g2-wow-sticker {
  display: none !important;
}

.wa-home-map-h1 .g2-home[data-wa-h1-preview="country"] .g2-rating,
.wa-home-map-h1 .g2-home[data-wa-h1-preview="country"] .g2-map-pin {
  display: none !important;
}

.wa-home-map-h1 .wa-h1-home-pins {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: var(--wa-h1-map-height, 296px);
  overflow: hidden;
  border-radius: 42px;
  pointer-events: none;
}

.wa-home-map-h1 .wa-h1-home-pins[hidden] {
  display: none !important;
}

.wa-home-map-h1 .wa-h1-home-pin {
  --wa-h1-pin-delay: 0s;
  position: absolute;
  left: clamp(62px, var(--wa-h1-left), calc(100% - 62px));
  top: clamp(34px, var(--wa-h1-top), calc(100% - 72px));
  min-width: 124px;
  min-height: 54px;
  border: 4px solid rgba(251, 247, 238, .96);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas: "code city" "code count";
  column-gap: 8px;
  align-items: center;
  background: linear-gradient(145deg, var(--p1-green-2), var(--p1-green));
  color: #fff;
  box-shadow: 0 0 0 2px var(--p1-green), 0 12px 23px rgba(16, 63, 56, .24);
  transform: translate(-50%, -50%);
  animation: p1-country-pin-float 4.9s ease-in-out var(--wa-h1-pin-delay) infinite;
  pointer-events: auto;
  cursor: pointer;
}

.wa-home-map-h1 .wa-h1-home-pin > b {
  grid-area: code;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--p1-coral);
  color: #fff;
  font: 900 9px/1 var(--wow-sans, sans-serif);
  letter-spacing: .04em;
}

.wa-home-map-h1 .wa-h1-home-pin > strong {
  grid-area: city;
  overflow: hidden;
  color: #fff;
  font: 700 14px/1.02 var(--wow-serif, Georgia, serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-home-map-h1 .wa-h1-home-pin > small {
  grid-area: count;
  color: rgba(255, 255, 255, .68);
  font: 700 7px/1.1 var(--wow-sans, sans-serif);
  white-space: nowrap;
}

.wa-home-map-h1 .wa-h1-home-pin.is-active {
  background: linear-gradient(145deg, #205d51, #103f38);
  filter: saturate(1.08);
}

.wa-home-map-h1 .wa-h1-home-pin:focus-visible {
  outline: 3px solid var(--p1-yellow);
  outline-offset: 4px;
}

/* Keeps the obsolete country screen invisible underneath the native picker. */
.wa-h1-picker-transition .g2-phone::after {
  content: "";
  position: absolute;
  z-index: 88;
  inset: 0;
  border-radius: inherit;
  background: rgba(204, 229, 221, .98);
  pointer-events: none;
}

/* Country view: back control and country selector share the same row. */
.p1-country-home .g2-countries > .g2-back {
  width: 58px;
  min-width: 58px;
  height: 58px;
  float: left;
  margin: 0 12px 34px 0 !important;
  padding: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, .9);
}

.p1-country-home .g2-countries > .g2-country-chip--large {
  width: calc(100% - 70px);
  min-height: 58px;
  margin: 0 0 34px 70px !important;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  padding-block: 7px;
  background: rgba(255, 253, 247, .94);
  box-shadow: 0 13px 30px rgba(16, 63, 56, .12), inset 0 1px rgba(255, 255, 255, .92);
}

.p1-country-home .g2-countries > .g2-kicker {
  clear: both;
}

.p1-country-home .g2-country-chip--large .g2-vector-icon[data-p1-has-flag="true"] > app-g2-icon,
.p1-country-home .g2-country-chip--large .g2-vector-icon[data-p1-has-flag="true"] > svg {
  display: none !important;
}

.p1-country-home .p1-country-flag {
  display: block;
  font-size: 25px;
  line-height: 1;
  filter: saturate(.93);
}

.p1-country-home .g2-countries > h1 {
  max-width: 480px;
  margin: 8px 0 0 !important;
  font-size: clamp(44px, 8.8vw, 60px) !important;
  line-height: .91 !important;
}

.p1-country-home .g2-countries > .g2-lead {
  margin-top: 11px !important;
}

/*
 * Keep the Angular background URL as source-of-truth, but paint it on a
 * contained inner layer. This fixes cropping without altering country data.
 */
.p1-country-home .g2-country-map[data-p1-country-map="framed"] {
  height: clamp(395px, 58vh, 475px) !important;
  margin: 25px -8px 16px !important;
  border: 7px solid rgba(255, 255, 255, .91);
  border-radius: 43px !important;
  background-image: none !important;
  background-color: rgba(255, 255, 255, .22);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .52),
    0 20px 46px rgba(16, 63, 56, .15);
  filter: none !important;
  isolation: isolate;
}

.p1-country-home .p1-country-art {
  position: absolute;
  z-index: 0;
  inset: 13px;
  border-radius: 33px;
  background-color: rgba(251, 247, 238, .28);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: inset 0 0 0 1px rgba(16, 63, 56, .035);
  pointer-events: none;
}

/* The country illustrations already contain their coral route. */
.p1-country-home .g2-country-map__route {
  display: none !important;
}

/* The prototype compass decoration is intentionally not part of this release. */
.p1-country-home .g2-country-map .g2-country-compass,
.p1-country-home .g2-country-map .country-map-compass,
.p1-country-home .g2-country-map .p0-country-compass,
.p1-country-home .g2-country-map [data-country-compass] {
  display: none !important;
}

/* Prototype-like dark-green city chips with coral code medallions. */
.p1-country-home .g2-country-pin {
  --p1-pin-delay: 0s;
  min-width: 126px !important;
  min-height: 55px;
  border: 4px solid rgba(251, 247, 238, .96) !important;
  border-radius: 999px !important;
  padding: 5px 13px 5px 5px !important;
  grid-template-columns: 39px minmax(0, 1fr) !important;
  grid-template-rows: auto auto;
  grid-template-areas:
    "code city"
    "code count";
  column-gap: 9px;
  align-items: center;
  background: linear-gradient(145deg, var(--p1-green-2), var(--p1-green)) !important;
  color: #fff !important;
  z-index: 2;
  box-shadow:
    0 0 0 2px var(--p1-green),
    0 13px 25px rgba(16, 63, 56, .25) !important;
  transform: translate(-50%, -50%);
  animation: p1-country-pin-float 4.9s ease-in-out var(--p1-pin-delay) infinite;
  will-change: transform;
}

.p1-country-home .g2-country-pin > b {
  grid-area: code;
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--p1-coral);
  color: #fff !important;
  font: 900 9px/1 var(--wow-sans, sans-serif) !important;
  letter-spacing: .04em !important;
}

.p1-country-home .g2-country-pin > strong {
  grid-area: city;
  margin: 0 !important;
  color: #fff;
  font-size: 15px !important;
  line-height: 1.02;
  white-space: nowrap;
}

.p1-country-home .g2-country-pin > small {
  grid-area: count;
  color: rgba(255, 255, 255, .66) !important;
  font-size: 7px !important;
  white-space: nowrap;
}

.p1-country-home .g2-country-pin--active {
  background: linear-gradient(145deg, #205d51, #103f38) !important;
  filter: saturate(1.08);
}

.p1-country-home .g2-country-pin:hover {
  animation-play-state: paused;
  transform: translate(-50%, calc(-50% - 6px)) rotate(-1deg) !important;
}

.p1-country-home .g2-geo-note {
  display: none !important;
}

/* Country picker sheet: keep every native option and click handler. */
.p1-country-home .g2-country-sheet {
  left: 0 !important;
  right: 0 !important;
  width: calc(100% - 16px) !important;
  max-height: calc(100% - 24px);
  max-width: 620px;
  margin-inline: auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px 25px 24px !important;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 38px !important;
  background: var(--p1-paper) !important;
  box-shadow: 0 28px 70px rgba(9, 36, 32, .31) !important;
  scrollbar-width: none;
}

.p1-country-home .g2-country-sheet::-webkit-scrollbar {
  display: none;
}

.p1-country-home .g2-country-sheet > div {
  margin-bottom: 19px !important;
}

.p1-country-home .g2-country-sheet > div small {
  color: var(--p1-coral) !important;
  font-size: 8px !important;
  letter-spacing: .16em !important;
}

.p1-country-home .g2-country-sheet h2 {
  margin-top: 7px !important;
  font-size: clamp(34px, 9vw, 45px) !important;
  line-height: .9;
  letter-spacing: -.035em;
}

.p1-country-home .g2-country-sheet > div > button {
  width: 48px !important;
  height: 48px !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, .9) !important;
}

.p1-country-home .g2-country-sheet > button {
  min-height: 80px !important;
  margin-top: 10px !important;
  border: 1px solid rgba(16, 63, 56, .035) !important;
  border-radius: 24px !important;
  padding: 11px 14px 11px 11px !important;
  grid-template-columns: 49px minmax(0, 1fr) auto !important;
  gap: 13px !important;
  background: rgba(255, 255, 255, .69) !important;
  box-shadow: 0 8px 20px rgba(16, 63, 56, .045);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease !important;
}

.p1-country-home .g2-country-sheet > button:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 25px rgba(16, 63, 56, .09);
}

.p1-country-home .g2-country-sheet > button.active {
  background: linear-gradient(145deg, var(--p1-green-2), var(--p1-green)) !important;
  color: #fff;
  box-shadow: 0 15px 30px rgba(16, 63, 56, .23) !important;
}

.p1-country-home .g2-country-sheet > button > b {
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
  background: var(--p1-paper) !important;
  color: var(--p1-coral) !important;
}

.p1-country-home .g2-country-sheet > button > b[data-p1-flag] {
  font-size: 0 !important;
}

.p1-country-home .g2-country-sheet > button > b[data-p1-flag]::before {
  content: attr(data-p1-flag);
  font-size: 25px;
  line-height: 1;
}

.p1-country-home .g2-country-sheet > button strong {
  font-family: var(--wow-serif, Georgia, serif);
  font-size: 18px !important;
  line-height: 1;
}

.p1-country-home .g2-country-sheet > button small {
  font-size: 8px !important;
}

.p1-country-home .g2-country-sheet > button.active small {
  color: rgba(255, 255, 255, .63) !important;
}

.p1-country-home .g2-country-sheet > button em {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(204, 229, 221, .55);
  color: var(--p1-coral) !important;
  font-size: 8px !important;
}

.p1-country-home .g2-country-sheet > button.active em {
  background: rgba(255, 255, 255, .14);
  color: var(--p1-yellow) !important;
}

.p1-country-home .g2-country-sheet > p {
  display: none !important;
}

@keyframes p1-home-plane-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-3deg); }
  50% { transform: translate3d(4px, -5px, 0) rotate(-1deg); }
}

@keyframes p1-country-pin-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) rotate(-.45deg); }
  50% { transform: translate(-50%, -50%) translateY(-5px) rotate(.45deg); }
}

@media (max-width: 520px) {
  .p1-country-home .g2-plane {
    width: 58px !important;
    height: 58px !important;
    right: 12px !important;
    top: 18px !important;
  }

  .wa-home-map-h1 .wa-h1-home-pin {
    left: clamp(56px, var(--wa-h1-left), calc(100% - 56px));
    top: clamp(32px, var(--wa-h1-top), calc(100% - 66px));
    min-width: 108px;
    min-height: 49px;
    border-width: 3px;
    padding-right: 9px;
    grid-template-columns: 34px minmax(0, 1fr);
    column-gap: 6px;
  }

  .wa-home-map-h1 .wa-h1-home-pin > b {
    width: 34px;
    height: 34px;
    font-size: 8px;
  }

  .wa-home-map-h1 .wa-h1-home-pin > strong {
    font-size: 12px;
  }

  .p1-country-home .g2-country-map[data-p1-country-map="framed"] {
    height: 410px !important;
    margin-inline: -4px !important;
    border-width: 6px;
    border-radius: 38px !important;
  }

  .p1-country-home .p1-country-art {
    inset: 10px;
    border-radius: 29px;
  }

  .p1-country-home .g2-country-pin {
    min-width: 111px !important;
    min-height: 51px;
    padding-right: 10px !important;
    grid-template-columns: 35px minmax(0, 1fr) !important;
  }

  .p1-country-home .g2-country-pin > b {
    width: 35px;
    height: 35px;
    font-size: 8px !important;
  }

  .p1-country-home .g2-country-pin > strong {
    font-size: 13px !important;
  }

  .p1-country-home .g2-country-sheet {
    left: 0 !important;
    right: 0 !important;
    width: calc(100% - 16px) !important;
    margin-inline: auto;
    bottom: 8px !important;
    padding: 24px 20px 20px !important;
  }
}

@media (max-height: 720px) and (max-width: 520px) {
  .p1-country-home .g2-country-map[data-p1-country-map="framed"] {
    height: 375px !important;
  }

  .p1-country-home .g2-country-sheet > button {
    min-height: 70px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .p1-country-home .g2-plane,
  .p1-country-home .g2-country-pin,
  .wa-home-map-h1 .wa-h1-home-pin {
    animation: none !important;
  }
}
