/* =========================================================
   Hotel Zumbi Universe — Hotel Map / Base
   Path: /css/screens/hotel-map.css
   V21 — Base Evolutiva / Timers / Upgrade Panel
   ========================================================= */

.hotel-map-screen,
#base {
  min-height: 100dvh;
  background: #05090d;
  color: #f5fff9;
  overflow: hidden;
}

.hotel-map {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  padding: 12px;
  isolation: isolate;
  overflow: hidden;
}

.hotel-map__bg {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .10), rgba(0, 0, 0, .76)),
    url("../../assets/img/hotel-map.webp") center / cover no-repeat;
}

.hotel-map__vignette {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 52%, rgba(47, 255, 184, .05) 0 32%, rgba(0, 0, 0, .22) 58%, rgba(0, 0, 0, .82) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .68));
}

.hotel-map__hud,
.hotel-map__resources,
.hz-map-mini-stats {
  display: none !important;
}

.hz-game-map-card {
  position: relative;
  z-index: 8;
  min-height: calc(100dvh - 92px);
  margin-top: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

.hotel-map__stage {
  position: absolute;
  inset: 0;
  z-index: 9;
  min-height: 100%;
}

.hotel-map__stage::before,
.hotel-map__stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(66vw, 650px);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  pointer-events: none;
}

.hotel-map__stage::before {
  border: 1px solid rgba(112, 255, 214, .16);
  background:
    radial-gradient(circle, rgba(76, 255, 194, .12) 0 3%, transparent 4%),
    radial-gradient(circle, rgba(76, 255, 194, .07) 0 34%, rgba(76, 255, 194, .035) 35% 52%, transparent 68%);
  box-shadow:
    0 0 0 1px rgba(112, 255, 214, .05),
    0 0 80px rgba(36, 255, 172, .08),
    inset 0 0 80px rgba(30, 255, 173, .045);
}

.hotel-map__stage::after {
  opacity: .42;
  background:
    linear-gradient(90deg, transparent 49.85%, rgba(118, 255, 214, .14) 50%, transparent 50.15%),
    linear-gradient(0deg, transparent 49.85%, rgba(118, 255, 214, .14) 50%, transparent 50.15%);
}

.hz-map-lines {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .62;
}

.hz-map-lines path,
.hz-map-lines circle {
  fill: none;
  stroke: rgba(118, 255, 214, .20);
  stroke-width: .28;
  stroke-dasharray: 1.8 1.2;
  filter: drop-shadow(0 0 4px rgba(72, 255, 190, .18));
}

.hz-map-lines circle {
  fill: rgba(76, 255, 194, .025);
}

.hotel-node,
.hotel-wall-node {
  position: absolute;
  z-index: 10;
  border-radius: 50%;
  cursor: pointer;
  translate: -50% -50%;
  transition:
    transform .16s ease,
    filter .16s ease,
    box-shadow .16s ease;
}

.hotel-node {
  width: 52px;
  height: 52px;
  border: 0;
  color: #04100b;
  background:
    radial-gradient(circle, #dfffee 0 8%, #6dffd0 9% 16%, rgba(26, 255, 171, .35) 17% 42%, rgba(0, 0, 0, .12) 43% 100%);
  box-shadow:
    0 0 0 1px rgba(158, 255, 222, .34),
    0 0 18px rgba(69, 255, 184, .55),
    0 0 38px rgba(69, 255, 184, .25);
}

.hotel-node:hover,
.hotel-node:focus-visible,
.hotel-wall-node:hover,
.hotel-wall-node:focus-visible {
  transform: scale(1.12);
  filter: brightness(1.15);
}

.hotel-node::before,
.hotel-wall-node::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(107, 255, 207, .22);
  animation: hotelPulse 2.4s ease-in-out infinite;
}

.hotel-node span,
.hotel-wall-node span {
  position: absolute;
  left: 50%;
  bottom: -17px;
  translate: -50% 0;
  min-width: 48px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #dffff3;
  font-size: .58rem;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(0, 0, 0, .35);
}

.hotel-node.is-building,
.hotel-wall-node.is-building {
  filter: brightness(1.2);
  box-shadow:
    0 0 0 1px rgba(255, 215, 106, .55),
    0 0 22px rgba(255, 215, 106, .48),
    0 0 46px rgba(255, 215, 106, .20);
}

.hotel-node.is-building span,
.hotel-wall-node.is-building span {
  color: #ffe28a;
  background: rgba(20, 12, 2, .82);
}

.hotel-node.is-locked {
  opacity: .62;
  filter: grayscale(.35);
}

.hotel-node__lock,
.hotel-node__alert,
.hotel-node__timer {
  position: absolute;
  display: grid;
  place-items: center;
  font-style: normal;
}

.hotel-node__lock {
  right: -2px;
  bottom: -2px;
  font-size: .72rem;
}

.hotel-node__alert {
  top: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff4f5f;
  box-shadow: 0 0 12px rgba(255, 79, 95, .75);
}

.hotel-node__timer {
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffd76a;
  box-shadow: 0 0 14px rgba(255, 215, 106, .55);
}

.hotel-node__timer::before {
  content: "⏳";
  font-size: .58rem;
}

.hotel-node--core { left: 50%; top: 48%; }
.hotel-node--arsenal { left: 34%; top: 41%; }
.hotel-node--lab { left: 62%; top: 39%; }
.hotel-node--garage { left: 68%; top: 54%; }
.hotel-node--defense { left: 50%; top: 64%; }
.hotel-node--survivors { left: 32%; top: 55%; }
.hotel-node--operations { left: 49%; top: 32%; }
.hotel-node--rewards { left: 74%; top: 47%; }

.hotel-wall-node {
  z-index: 11;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 220, 105, .55);
  color: #160e02;
  background:
    radial-gradient(circle, rgba(255, 232, 126, .95) 0 14%, rgba(255, 188, 55, .34) 15% 48%, rgba(0, 0, 0, .22) 49%);
  box-shadow: 0 0 22px rgba(255, 205, 75, .34);
}

.hotel-wall-node span {
  color: #ffe28a;
}

.hotel-wall-node--north { left: 50%; top: 18%; }
.hotel-wall-node--south { left: 50%; top: 82%; }
.hotel-wall-node--east { left: 86%; top: 51%; }
.hotel-wall-node--west { left: 14%; top: 51%; }

/* PAINEL DE UPGRADE V21 */

.hz-upgrade-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  max-height: 82dvh;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(121, 255, 211, .32);
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(circle at 14% 0%, rgba(83, 255, 190, .12), transparent 38%),
    linear-gradient(180deg, rgba(12, 30, 38, .98), rgba(2, 7, 10, .99));
  box-shadow:
    0 -18px 55px rgba(0, 0, 0, .62),
    0 0 35px rgba(58, 255, 183, .16);
}

.hz-upgrade-panel__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

.hz-upgrade-panel .eyebrow {
  margin: 0;
  color: #78ffd1;
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hz-upgrade-panel h2 {
  margin: 4px 42px 4px 0;
  font-size: 1.48rem;
  line-height: 1;
}

.hz-upgrade-panel > strong {
  display: block;
  color: #ffd86f;
  font-size: .9rem;
}

.hz-upgrade-panel__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 14px;
}

.hz-upgrade-panel__stats article,
.hz-upgrade-panel__req,
.hz-upgrade-panel__cost,
.hz-upgrade-panel__builders {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .055);
}

.hz-upgrade-panel__stats small,
.hz-upgrade-panel__req small,
.hz-upgrade-panel__cost small,
.hz-upgrade-panel__builders small {
  display: block;
  color: #79ffd0;
  margin-bottom: 5px;
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.hz-upgrade-panel__stats b,
.hz-upgrade-panel__builders b {
  color: #fff;
  font-size: .92rem;
}

.hz-upgrade-panel__req,
.hz-upgrade-panel__cost,
.hz-upgrade-panel__builders {
  margin-top: 12px;
}

.hz-upgrade-panel__req span,
.hz-upgrade-panel__cost span {
  display: inline-flex;
  margin: 4px 5px 0 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.hz-upgrade-panel__req span.is-ok {
  color: #75ffd0;
  background: rgba(83, 255, 190, .10);
}

.hz-upgrade-panel__req span.is-bad {
  color: #ff9ba7;
  background: rgba(255, 79, 95, .10);
}

.hz-upgrade-panel .btn-primary,
.hz-upgrade-panel .btn-secondary {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
}

.hz-upgrade-panel__error {
  margin: 10px 0 0;
  color: #ff9ba7;
  font-size: .75rem;
  line-height: 1.35;
}

/* LEGADO DESATIVADO */

.hotel-map__panel {
  display: none !important;
}

/* DEFESA ALERTA */

.hz-defense-alert {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 79, 95, .22), transparent 38%),
    rgba(0, 0, 0, .78);
  backdrop-filter: blur(8px);
}

.hz-defense-alert-panel {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(255, 79, 95, .38);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 79, 95, .16), transparent 42%),
    linear-gradient(180deg, rgba(20, 8, 14, .98), rgba(3, 6, 10, .98));
  box-shadow: 0 22px 70px rgba(0, 0, 0, .58);
  text-align: center;
}

.hz-defense-alert-panel h2 {
  margin: 6px 0;
  color: #fff;
}

.hz-defense-alert-panel p {
  color: #d9ede8;
}

.hz-defense-countdown {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 16px auto;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 79, 95, .16);
  box-shadow: 0 0 34px rgba(255, 79, 95, .38);
  font-size: 2.2rem;
}

.hz-defense-alert-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@keyframes hotelPulse {
  0%, 100% {
    transform: scale(.95);
    opacity: .35;
  }

  50% {
    transform: scale(1.22);
    opacity: .8;
  }
}

@media (min-width: 900px) {
  .hotel-map {
    width: min(1090px, calc(100vw - 32px));
    margin-inline: auto;
    padding: 18px 24px;
  }

  .hotel-node {
    width: 60px;
    height: 60px;
  }

  .hotel-wall-node {
    width: 52px;
    height: 52px;
  }

  .hz-upgrade-panel {
    top: 0;
    left: auto;
    right: 0;
    width: 390px;
    height: 100dvh;
    max-height: none;
    border-radius: 28px 0 0 28px;
  }
}

@media (max-width: 760px) {
  .hotel-map {
    height: calc(100dvh - 96px);
    min-height: 0;
    padding: 6px;
  }

  .hz-game-map-card {
    min-height: 100%;
  }

  .hotel-map__stage::before,
  .hotel-map__stage::after {
    top: 57%;
    width: 112vw;
  }

  .hotel-node {
    width: 44px;
    height: 44px;
  }

  .hotel-wall-node {
    width: 38px;
    height: 38px;
  }

  .hotel-node span,
  .hotel-wall-node span {
    font-size: .52rem;
  }

  .hz-upgrade-panel__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hz-defense-alert-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .hotel-node--core { left: 50%; top: 50%; }
  .hotel-node--arsenal { left: 32%; top: 43%; }
  .hotel-node--lab { left: 64%; top: 42%; }
  .hotel-node--garage { left: 69%; top: 56%; }
  .hotel-node--defense { left: 50%; top: 66%; }
  .hotel-node--survivors { left: 31%; top: 57%; }
  .hotel-node--operations { left: 50%; top: 34%; }
  .hotel-node--rewards { left: 76%; top: 49%; }

  .hotel-wall-node--north { left: 50%; top: 21%; }
  .hotel-wall-node--south { left: 50%; top: 84%; }
  .hotel-wall-node--east { left: 90%; top: 53%; }
  .hotel-wall-node--west { left: 10%; top: 53%; }
}
