/*
 * WOW ATLAS Global 2.0 — UI U2.1.
 * Additive staging-only refinement over Experience U2.
 * Native Angular buttons, routes and event handlers stay intact.
 */

:root {
  --u21-green: #0f4a40;
  --u21-green-deep: #083a33;
  --u21-coral: #f45a48;
  --u21-paper: #fbf7ee;
  --u21-yellow: #f4cf5d;
  --u21-lilac: #cdb7ef;
  --u21-sky: #83c7ed;
}

/* Rich menu medallions injected by experience-u2-1.js. */
html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u21-rich-icon="true"] > span:first-child > .u2-menu-icon {
  display: none !important;
}

html.wa-u2-1-ui.r3-ui-overlay .u2-1-menu-icon {
  width: 49px;
  height: 49px;
  display: block;
  overflow: visible;
  pointer-events: none;
  transform: translateZ(0);
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u21-rich-icon="true"] > span:first-child {
  width: 66px !important;
  height: 66px !important;
  flex: 0 0 66px !important;
  border: 3px solid rgba(255, 255, 255, .88) !important;
  background:
    radial-gradient(circle at 30% 21%, rgba(255, 255, 255, .98), rgba(255, 255, 255, .3) 38%, transparent 39%),
    linear-gradient(145deg, rgba(255, 253, 247, .98), rgba(232, 241, 236, .94)) !important;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, .96),
    inset 0 -5px 10px rgba(15, 74, 64, .08),
    0 13px 24px rgba(31, 53, 46, .19) !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="places"][data-u21-rich-icon="true"] > span:first-child {
  width: 78px !important;
  height: 78px !important;
  flex-basis: 78px !important;
  background: linear-gradient(145deg, #fff8f3, #f7c1ae) !important;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, .96),
    0 16px 29px rgba(194, 64, 50, .27) !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="countries"][data-u21-rich-icon="true"] > span:first-child {
  background: linear-gradient(145deg, #fff9f2, #f7d5c5) !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="ai"][data-u21-rich-icon="true"] > span:first-child {
  width: 69px !important;
  height: 69px !important;
  flex-basis: 69px !important;
  background: linear-gradient(145deg, #f9f4ff, #ded0f5) !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="missions"][data-u21-rich-icon="true"] > span:first-child {
  background: linear-gradient(145deg, #fff9da, #f4d45f) !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="passport"][data-u21-rich-icon="true"] > span:first-child {
  width: 70px !important;
  height: 70px !important;
  flex-basis: 70px !important;
  background: linear-gradient(145deg, #eff9ff, #b8dff2) !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="stories"][data-u21-rich-icon="true"] > span:first-child {
  background: linear-gradient(145deg, #fff8ef, #d9ece4) !important;
}

/*
 * Deliberately irregular route. Selectors stop at the first eight buttons,
 * therefore the accepted Atlas Club star and its native U2 position are untouched.
 */
html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"] > [data-u2-map-grid="true"]::before {
  inset: -2px 0 22px !important;
  background-image: url("/assets/u2-1/adventure-route-u2-1.svg") !important;
  background-size: 100% 100% !important;
  opacity: .86 !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="home"] {
  left: 2% !important;
  right: auto !important;
  top: 0 !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="countries"] {
  left: auto !important;
  right: -2% !important;
  top: 8.5% !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="places"] {
  left: 15% !important;
  right: auto !important;
  top: 21% !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="ai"] {
  left: auto !important;
  right: 3% !important;
  top: 32.5% !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="missions"] {
  left: -1% !important;
  right: auto !important;
  top: 44.5% !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="passport"] {
  left: auto !important;
  right: 6% !important;
  top: 56% !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="offline"] {
  left: 12% !important;
  right: auto !important;
  top: 68.5% !important;
}

html.wa-u2-1-ui.r3-ui-overlay
.g2-menu[data-u2-adventure-menu="map"]
button[data-u2-menu-key="stories"] {
  left: auto !important;
  right: 1% !important;
  top: 77% !important;
}

/* Exact 4:3 content area: the former 8px border changed the inner ratio. */
html.wa-u2-1-ui.wa-home-map-h1
.g2-home[data-wa-h1-preview="city"] .g2-city-card__map[data-wa-home-preview] {
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 4 / 3 !important;
  border: 0 !important;
  outline: 1px solid rgba(255, 255, 255, .55);
  outline-offset: 7px;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, .92),
    0 18px 42px rgba(17, 65, 57, .16) !important;
}

/* Stable daily passport variants selected by experience-u2-1.js. */
html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] {
  isolation: isolate;
  background-repeat: repeat, repeat, no-repeat !important;
  background-size: 118px 118px, 174px 174px, cover !important;
  background-position: 0 0, 30px 18px, center !important;
  animation: wa-u21-passport-particles 28s ease-in-out infinite alternate;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop="1"] {
  background-image:
    radial-gradient(circle, rgba(244, 207, 93, .72) 0 2px, transparent 2.6px),
    radial-gradient(circle, rgba(255, 255, 255, .42) 0 1.5px, transparent 2.1px),
    linear-gradient(138deg, #0a3e37 0%, #17675a 43%, #79b8a4 100%) !important;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop="2"] {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .58) 0 2px, transparent 2.6px),
    radial-gradient(circle, rgba(244, 90, 72, .45) 0 1.5px, transparent 2.1px),
    linear-gradient(138deg, #503b75 0%, #9a7bc9 45%, #e8c4d7 100%) !important;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop="3"] {
  background-image:
    radial-gradient(circle, rgba(15, 74, 64, .5) 0 2px, transparent 2.6px),
    radial-gradient(circle, rgba(255, 255, 255, .54) 0 1.5px, transparent 2.1px),
    linear-gradient(138deg, #f5b19c 0%, #f4d775 46%, #a9d8d1 100%) !important;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop]::before {
  z-index: 0 !important;
  background:
    linear-gradient(180deg, rgba(8, 58, 51, .03), rgba(8, 58, 51, .68)) !important;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop]::after {
  content: "";
  position: absolute;
  z-index: 1;
  right: -34px;
  top: -39px;
  width: 205px;
  height: 205px;
  border: 1px dashed rgba(255, 255, 255, .34);
  border-radius: 50%;
  opacity: .58;
  background:
    repeating-conic-gradient(from 6deg, rgba(255, 255, 255, .82) 0 2deg, transparent 2deg 14deg);
  -webkit-mask: radial-gradient(circle, transparent 0 54px, #000 55px 67px, transparent 68px);
  mask: radial-gradient(circle, transparent 0 54px, #000 55px 67px, transparent 68px);
  pointer-events: none;
  animation: wa-u21-passport-compass 34s linear infinite;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] > i,
html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] > .g2-passport-cover__owner {
  z-index: 2 !important;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] > i {
  animation: wa-u21-passport-stamp-float 8.4s ease-in-out infinite;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] > i:nth-of-type(2) {
  animation-delay: -3.1s;
  animation-duration: 9.7s;
}

html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] > i:nth-of-type(3) {
  animation-delay: -5.8s;
  animation-duration: 10.8s;
}

/* Premium trace actions; the original buttons and click handlers remain. */
html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key] {
  position: relative;
  min-height: 94px !important;
  border: 1px solid rgba(255, 255, 255, .74) !important;
  padding: 12px 9px !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  color: var(--u21-green-deep) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(239, 244, 241, .84)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 11px 21px rgba(15, 74, 64, .1);
}

html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key="planned"] {
  background: linear-gradient(145deg, #fff8f4, #f6d3c5) !important;
}

html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key="visited"] {
  background: linear-gradient(145deg, #f4fbf8, #c8e3d9) !important;
}

html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key="share"] {
  background: linear-gradient(145deg, #fffced, #efdf9f) !important;
}

html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key] > app-g2-icon {
  display: none !important;
}

html.wa-u2-1-ui .g2-place .u2-1-trace-icon {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  overflow: visible;
  filter: drop-shadow(0 6px 7px rgba(15, 74, 64, .16));
  pointer-events: none;
}

html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key] > span {
  position: relative;
  z-index: 1;
  line-height: 1.16;
}

html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key].active {
  color: #fff !important;
  background: linear-gradient(145deg, #17675a, var(--u21-green-deep)) !important;
  box-shadow: 0 12px 24px rgba(8, 58, 51, .24);
}

@keyframes wa-u21-passport-particles {
  0% { background-position: 0 0, 30px 18px, center; }
  100% { background-position: 35px -24px, -18px 42px, center; }
}

@keyframes wa-u21-passport-compass {
  to { transform: rotate(360deg); }
}

@keyframes wa-u21-passport-stamp-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 2px -7px; }
}

@media (max-width: 520px) {
  html.wa-u2-1-ui.r3-ui-overlay .u2-1-menu-icon {
    width: 44px;
    height: 44px;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u21-rich-icon="true"] > span:first-child {
    width: 61px !important;
    height: 61px !important;
    flex-basis: 61px !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u2-menu-key="places"][data-u21-rich-icon="true"] > span:first-child {
    width: 72px !important;
    height: 72px !important;
    flex-basis: 72px !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u2-menu-key="passport"][data-u21-rich-icon="true"] > span:first-child,
  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u2-menu-key="ai"][data-u21-rich-icon="true"] > span:first-child {
    width: 65px !important;
    height: 65px !important;
    flex-basis: 65px !important;
  }
}

/* A separate irregular layout for short phones; Atlas Club keeps U2's 83.5%. */
@media (max-width: 520px) and (max-height: 760px) {
  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="home"] {
    left: 2% !important; right: auto !important; top: 0 !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="countries"] {
    left: auto !important; right: -2% !important; top: 9.2% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="places"] {
    left: 16% !important; right: auto !important; top: 19.2% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="ai"] {
    left: auto !important; right: 3% !important; top: 31.2% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="missions"] {
    left: -1% !important; right: auto !important; top: 40.8% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="passport"] {
    left: auto !important; right: 6% !important; top: 52% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="offline"] {
    left: 12% !important; right: auto !important; top: 60.8% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"] button[data-u2-menu-key="stories"] {
    left: auto !important; right: 1% !important; top: 71.6% !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay .u2-1-menu-icon {
    width: 39px;
    height: 39px;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u21-rich-icon="true"] > span:first-child {
    width: 52px !important;
    height: 52px !important;
    flex-basis: 52px !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u2-menu-key="places"][data-u21-rich-icon="true"] > span:first-child {
    width: 61px !important;
    height: 61px !important;
    flex-basis: 61px !important;
  }

  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u2-menu-key="passport"][data-u21-rich-icon="true"] > span:first-child,
  html.wa-u2-1-ui.r3-ui-overlay
  .g2-menu[data-u2-adventure-menu="map"]
  button[data-u2-menu-key="ai"][data-u21-rich-icon="true"] > span:first-child {
    width: 55px !important;
    height: 55px !important;
    flex-basis: 55px !important;
  }
}

@media (max-width: 430px) {
  html.wa-u2-1-ui .g2-place .g2-trace > div > button[data-u21-trace-key] {
    min-height: 76px !important;
    padding: 10px 15px !important;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    gap: 13px;
  }

  html.wa-u2-1-ui .g2-place .u2-1-trace-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop],
  html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop]::after,
  html.wa-u2-1-ui .g2-passport-cover[data-u21-passport-backdrop] > i {
    animation: none !important;
  }
}
