/* ============================================================
 * AROQA Progress Path Feature Styles (Phase 7 Modular Extraction)
 * Dedicated stylesheet for Dashboard Progress Path (state.section === 'path').
 * Shared primitives (.workspace-page, .surface-card, .card-kicker, .primary-btn)
 * remain in dist/product-ui.css.
 * ============================================================ */

/* Progress map intro & legend */
.path-intro {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  margin-bottom: 22px;
}

.path-intro h1 {
  margin: 11px 0;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.05;
}

.path-intro p {
  max-width: 720px;
  color: #8299a5;
}

.path-legend {
  display: flex;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid #ffffff0d;
  border-radius: 13px;
  background: #ffffff04;
}

.path-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #728995;
  font-size: 9px;
}

.path-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.path-legend .done {
  background: var(--ui-teal);
}

.path-legend .current {
  background: var(--ui-cyan);
  box-shadow: 0 0 9px var(--ui-cyan);
}

.path-legend .locked {
  background: #596d78;
}

/* Progress map shell & header */
.battle-map-shell {
  padding: 23px;
}

.map-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-head span {
  display: block;
  color: #5dd4e8;
  font: 700 8px "Space Grotesk";
  letter-spacing: .14em;
}

.map-head b {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.map-head > strong {
  font: 700 24px "Space Grotesk";
}

/* Interactive SVG route canvas & learning nodes */
.battle-map {
  position: relative;
  min-width: 820px;
  height: 500px;
  margin-top: 18px;
  border: 1px solid #8beaff10;
  border-radius: 21px;
  background:
    radial-gradient(circle at 52% 50%, #187c932e, transparent 23%),
    radial-gradient(circle at 78% 22%, #635bd32b, transparent 22%),
    linear-gradient(145deg, #081620, #040a11);
  overflow: hidden;
}

.battle-map:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#91eafa08 1px, transparent 1px),
    linear-gradient(90deg, #91eafa08 1px, transparent 1px);
  background-size: 50px 50px;
}

.battle-map > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-base,
.route-done {
  fill: none;
  stroke: #657c8842;
  stroke-width: 4;
  stroke-dasharray: 7 8;
}

.route-done {
  stroke: url(#none);
  stroke: #6ce2c7;
  filter: drop-shadow(0 0 6px #4fdab8);
  stroke-dasharray: none;
}

.map-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #dbeaf0;
  text-align: start;
}

.map-node > span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid #7b929e55;
  border-radius: 17px;
  background: #091620;
  font: 700 15px "Space Grotesk";
  box-shadow: 0 14px 35px #0007;
}

.map-node > div {
  padding: 9px 11px;
  border: 1px solid #ffffff0d;
  border-radius: 11px;
  background: #06111bd9;
  min-width: 132px;
}

.map-node b {
  display: block;
  font-size: 10px;
}

.map-node small {
  display: block;
  margin-top: 3px;
  color: #637c88;
}

.map-node.done > span {
  border-color: #5de0bd7a;
  background: #42cda717;
  color: #6fe5c7;
  box-shadow: 0 0 28px #43d2ad32;
}

.map-node.current > span {
  width: 70px;
  height: 70px;
  border-color: #8beaff;
  background: radial-gradient(circle, #2b8194, #091722 62%);
  color: white;
  box-shadow: 0 0 0 10px #72e5f209, 0 0 45px #58dcec4b;
}

.map-node.current > div {
  border-color: #8beaff3b;
}

.map-node.boss > span {
  border-color: #8d86ff75;
  background: radial-gradient(circle, #4d478f, #0b1320);
  box-shadow: 0 0 36px #726af13b;
}

.map-node.locked {
  opacity: .42;
}

.map-node .ui-icon {
  width: 17px;
}

.map-node.n1 {
  left: 4%;
  bottom: 10%;
}

.map-node.n2 {
  left: 24%;
  bottom: 28%;
}

.map-node.n3 {
  left: 43%;
  bottom: 23%;
}

.map-node.n4 {
  left: 55%;
  top: 24%;
}

.map-node.n5 {
  right: 11%;
  top: 28%;
}

.map-node.n6 {
  right: 3%;
  top: 5%;
}

.map-atmosphere i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8beaff;
  box-shadow: 0 0 10px #8beaff;
}

.map-atmosphere i:nth-child(1) {
  left: 18%;
  top: 18%;
}

.map-atmosphere i:nth-child(2) {
  left: 72%;
  bottom: 16%;
}

.map-atmosphere i:nth-child(3) {
  right: 20%;
  top: 14%;
  background: #8a84ff;
}

/* Current challenge summary panel */
.current-node-panel {
  display: grid;
  grid-template-columns: 65px 1fr auto auto;
  align-items: center;
  gap: 17px;
  margin-top: 11px;
  padding: 17px;
  border: 1px solid #8beaff1b;
  border-radius: 17px;
  background: #ffffff04;
}

.node-emblem {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #8beaff4f;
  border-radius: 16px;
  background: #76e4f20e;
  color: #9ceef8;
  font: 700 18px "Space Grotesk";
}

.current-node-panel h3 {
  margin: 4px 0;
  font-size: 15px;
}

.current-node-panel p {
  margin: 0;
  color: #6d8490;
}

.node-rewards {
  display: flex;
  gap: 5px;
}

.node-rewards span {
  padding: 7px 9px;
  border: 1px solid #ffffff0e;
  border-radius: 8px;
  color: #899faa;
  font: 600 8px "Space Grotesk";
}

.current-node-panel .primary-btn {
  min-height: 41px;
  border-radius: 11px;
  font-size: 10px;
}

/* Diagnostic fallback card */
.progress-path-diagnostic-fallback {
  padding: 28px;
}

/* Responsive layout rules for Progress Path */
@media (max-width: 1280px) {
  .battle-map-shell {
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .path-intro {
    grid-template-columns: 1fr;
  }

  .path-legend {
    overflow-x: auto;
  }

  .battle-map-shell {
    margin-inline: -13px;
    border-radius: 0;
    border-inline: 0;
  }

  .current-node-panel {
    min-width: 780px;
  }
}
