/* PLABS_KIDS_MAYA_MAP — full-bleed modelado3d + UI limpia (patrón BeatBox) */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&display=swap");

body.pl-kids[data-world="maya"] #app,
body.theme-maya #app,
html.theme-maya body #app,
body[data-world="maya"] #app,
#app.theme-maya-map {
  --my-orange: #ed8a19;
  --my-amber: #fbbf24;
  --my-ink: #f8fafc;
  --my-panel: #2b2b2b;
  font-family: Outfit, Fredoka, Nunito, system-ui, sans-serif;
  background-color: #1a1410 !important;
  background-image: url("../assets/mayalab/map-bg-ui.png") !important;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  min-height: 100vh;
  max-width: none !important;
}

body.pl-kids[data-world="maya"] #starfield,
body.theme-maya #starfield,
html.theme-maya #starfield,
body[data-world="maya"] #app::before,
#app.theme-maya-map::before {
  display: none !important;
}

body.pl-kids[data-world="maya"] .hud,
body.theme-maya .hud,
body[data-world="maya"] .hud,
#app.theme-maya-map .hud {
  background: rgba(20, 16, 12, 0.86) !important;
  border-bottom: 1px solid rgba(237, 138, 25, 0.45) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  color: #f3f3f3 !important;
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 30;
}

body.pl-kids[data-world="maya"] .hud__name,
body.theme-maya .hud__name,
#app.theme-maya-map .hud__name {
  color: #ffe7c2 !important;
  font-weight: 800;
}

body.pl-kids[data-world="maya"] .stat,
body.pl-kids[data-world="maya"] .lang,
body.pl-kids[data-world="maya"] .hud__back,
body.theme-maya .stat,
body.theme-maya .lang,
body.theme-maya .hud__back,
#app.theme-maya-map .stat,
#app.theme-maya-map .lang,
#app.theme-maya-map .hud__back {
  background: rgba(32, 28, 22, 0.92) !important;
  border: 1px solid rgba(237, 138, 25, 0.4) !important;
  color: #fde68a !important;
  font-weight: 800;
}

/* ===== MAP FULL BLEED ===== */
body[data-world="maya"] #mapwrap.mapwrap,
body[data-world="maya"] .mapwrap.mapwrap--maya,
body.pl-kids[data-world="maya"] .mapwrap--lingo,
body.pl-kids[data-world="maya"] .mapwrap--maya,
.mapwrap--maya {
  position: relative !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 0 100px !important;
  min-height: calc(100vh - 64px) !important;
  background-color: #1a1410 !important;
  background-image: url("../assets/mayalab/map-bg-ui.png") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.mapwrap--maya::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 80% at 50% 46%, rgba(12, 10, 8, 0.78) 0%, rgba(12, 10, 8, 0.38) 55%, transparent 80%),
    linear-gradient(180deg, rgba(10, 8, 6, 0.5) 0%, transparent 16%, transparent 76%, rgba(10, 8, 6, 0.58) 100%);
}

.mapwrap--maya .mappath {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  opacity: 0.32;
}

.mapwrap--maya .mappath .lingo-path-bg {
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 14;
  stroke-linecap: round;
  fill: none;
}

.mapwrap--maya .mappath .lingo-path-fg {
  stroke: #ed8a19;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 14;
  fill: none;
  filter: drop-shadow(0 0 4px rgba(237, 138, 25, 0.55));
}

.mapwrap--maya .map {
  position: relative !important;
  z-index: 4 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 340px);
  margin: 0 auto;
  padding: 6px 8px 40px;
  box-sizing: border-box;
}

.mapwrap--maya .node,
.mapwrap--maya .unit-banner--lingo,
.mapwrap--maya .map-lingo-hero {
  position: relative;
  z-index: 5;
  transform: none !important;
}

.mapwrap--maya .map-lingo-hero--maya,
.mapwrap--maya .map-lingo-hero {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 4px 0 12px !important;
  padding: 8px 10px !important;
  background: rgba(20, 16, 12, 0.78) !important;
  border: 1px solid rgba(237, 138, 25, 0.45) !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(8px);
}

.mapwrap--maya .map-lingo-hero__mascot {
  width: 52px !important;
  height: 52px !important;
  object-fit: contain !important;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.mapwrap--maya .map-lingo-hero__bubble {
  margin: 0;
  color: #f8fafc !important;
  font-family: Outfit, Fredoka, Nunito, sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.2;
}

.mapwrap--maya .map-lingo-hero__bubble small {
  display: block;
  margin-top: 2px;
  color: #fde68a !important;
  font-weight: 600;
  font-size: 0.68rem;
  opacity: 0.92;
}

.mapwrap--maya .unit-banner--lingo {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: auto !important;
  max-width: 100%;
  margin: 0 0 14px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  background: rgba(24, 20, 14, 0.82) !important;
  border: 1px solid rgba(237, 138, 25, 0.45) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35) !important;
  backdrop-filter: blur(6px);
  color: #ffe7c2 !important;
}

.mapwrap--maya .unit-banner--lingo::after { display: none !important; }

.mapwrap--maya .unit-banner__emoji { font-size: 1rem; }

.mapwrap--maya .unit-banner__kicker {
  display: inline;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fdba74;
  margin-right: 6px;
}

.mapwrap--maya .unit-banner__title {
  display: inline;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff8f0;
}

.mapwrap--maya .unit-banner__text {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
}

.mapwrap--maya .node {
  margin: 22px auto !important;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mapwrap--maya .node__btn,
.mapwrap--maya .node--lingo .node__btn {
  width: 74px !important;
  height: 74px !important;
  border-radius: 50% !important;
  border: 3px solid #ed8a19 !important;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.22), transparent 45%),
    linear-gradient(165deg, #4a4a4a, #1a1a1a) !important;
  box-shadow:
    0 0 0 5px rgba(0, 0, 0, 0.55),
    0 10px 22px rgba(0, 0, 0, 0.55),
    inset 0 -6px 14px rgba(0,0,0,.4) !important;
  color: #ffe7c2 !important;
}

.mapwrap--maya .node__btn i[data-lucide] {
  width: 28px;
  height: 28px;
  stroke-width: 2.3;
  color: #fde68a;
}

.mapwrap--maya .node--done .node__btn {
  background: linear-gradient(165deg, #ed8a19, #9a3412) !important;
  border-color: #fff8f0 !important;
}

.mapwrap--maya .node--done .node__btn i[data-lucide] { color: #fff8f0; }

.mapwrap--maya .node--active .node__btn {
  background: linear-gradient(165deg, #fbbf24, #ea580c) !important;
  border-color: #fffbeb !important;
  box-shadow:
    0 0 0 5px rgba(237, 138, 25, 0.35),
    0 0 28px rgba(251, 191, 36, 0.45),
    0 12px 26px rgba(0,0,0,.5) !important;
  animation: myMapPulse 1.4s ease-in-out infinite;
}

.mapwrap--maya .node--active .node__btn i[data-lucide] { color: #1c1917; }

@keyframes myMapPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.mapwrap--maya .node--active::before {
  content: "PLAY";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: #ed8a19;
  color: #1c1917;
  z-index: 6;
}

.mapwrap--maya .node--boss .node__btn {
  background: linear-gradient(165deg, #57534e, #1c1917) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 0 4px rgba(237, 138, 25, 0.55) !important;
}

.mapwrap--maya .node--boss .node__btn i[data-lucide] { color: #fde68a; }

.mapwrap--maya .node--locked .node__btn {
  opacity: 0.5;
  filter: grayscale(0.35);
  border-color: rgba(255,255,255,.22) !important;
}

.mapwrap--maya .node__label { margin-top: 8px; }

.mapwrap--maya .node__labelpill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 12, 8, 0.92);
  border: 1px solid rgba(237, 138, 25, 0.45);
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.78rem;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
}

.mapwrap--maya .node--done .node__labelpill {
  border-color: rgba(237, 138, 25, 0.65);
  color: #fde68a;
}

.mapwrap--maya .node--active .node__labelpill {
  border-color: #fbbf24;
  color: #fde68a;
}

.mapwrap--maya .node--locked .node__labelpill { opacity: 0.6; }

.mapwrap--maya .stars {
  font-size: 0.7rem;
  margin-top: 4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
}

@media (min-width: 900px) {
  .mapwrap--maya {
    background-size: cover !important;
    background-position: center top !important;
  }
  .mapwrap--maya .map { width: min(100%, 360px); }
}

@media (max-width: 560px) {
  .mapwrap--maya { padding: 4px 0 90px !important; }
  .mapwrap--maya .map { width: min(100%, 300px); }
  .mapwrap--maya .node__btn,
  .mapwrap--maya .node--lingo .node__btn {
    width: 68px !important;
    height: 68px !important;
  }
}

/* ===== Clase en video (modal Maya) ===== */
#lessonModal .ltab[data-tab="class"] {
  background: rgba(237, 138, 25, 0.14);
  border-color: rgba(237, 138, 25, 0.45);
  font-weight: 800;
}

#lessonModal .ltab-panel[data-panel="class"] {
  display: none !important;
}

#lessonModal .ltab-panel[data-panel="class"].is-active {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 0;
  flex: 1;
  background: #0b0b0f;
}

#lessonModal.lesson--class .lesson {
  background: #0b0b0f !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#lessonModal.lesson--class .maya-class-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
  width: 100%;
  padding: 0;
  height: 100%;
}

#lessonModal.lesson--class .maya-class-panel .video.video--embed,
#lessonModal .ltab-panel[data-panel="class"].is-active .video.video--embed,
#lessonModal.lesson--class .maya-class-video {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: unset !important;
  position: relative;
}

#lessonModal .ltab-panel[data-panel="class"] .video__iframe,
#lessonModal.lesson--class .video__iframe,
#lessonModal.lesson--class .video__iframe--class {
  display: block !important;
  visibility: visible !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.maya-class-panel .video.video--embed,
.maya-class-video {
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 0;
  background: #000;
}

.maya-class-video__note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 3;
  margin: 0;
  padding: 6px 10px;
  font-weight: 700;
  color: #fde68a;
  text-align: center;
  font-size: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.maya-class-video__empty {
  text-align: center;
  padding: 48px 16px;
  font-weight: 800;
  color: #94a3b8;
}

.maya-lab-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(52vh, 420px);
  padding: 24px;
  text-align: center;
  background: linear-gradient(160deg, rgba(43, 43, 43, 0.95), rgba(26, 20, 16, 0.98));
  border: 2px dashed rgba(237, 138, 25, 0.45);
  border-radius: 18px;
}

.maya-lab-pending__icon { font-size: 2.5rem; margin-bottom: 8px; }

.maya-lab-pending__title {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: 1.15rem;
  color: #fde68a;
}

.maya-lab-pending__sub {
  margin: 0;
  font-weight: 650;
  color: #cbd5e1;
  max-width: 36ch;
  line-height: 1.45;
}

#lessonModal .ltab-panel[data-panel="class"] .btn[data-tab-go="build"] {
  align-self: center;
  min-width: min(100%, 280px);
}

.maya-class-done {
  display: block;
  margin: 16px auto 0;
  min-width: min(100%, 320px);
}
