/* ============================================================
   Plant a Band — Walk Forest 3D
   ============================================================ */

.pab-walk-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .pab-walk-wrap {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ── Canvas 3D ── */
.pab-walk-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 480px;
  background: #0d1a0a;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #2a5c1e;
}

#pab-walk-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── HUD titolo ── */
.pab-walk-hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}
.pab-walk-title {
  font-size: 15px;
  font-weight: 700;
  color: #b8e68a;
  text-shadow: 0 1px 6px rgba(0,0,0,.8);
  letter-spacing: 1px;
}
.pab-walk-subtitle {
  font-size: 12px;
  color: rgba(184,230,138,.7);
  margin-top: 2px;
}

/* ── Crosshair ── */
.pab-walk-crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px;
  pointer-events: none;
  z-index: 10;
}
.pab-walk-crosshair::before,
.pab-walk-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(184,230,138,.7);
  border-radius: 2px;
}
.pab-walk-crosshair::before { width: 2px; height: 16px; left: 7px; top: 0; }
.pab-walk-crosshair::after  { width: 16px; height: 2px; left: 0; top: 7px; }

/* ── Label albero vicino ── */
.pab-walk-tree-label {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(42,92,30,.92);
  color: #fff;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  z-index: 20;
  border: 1px solid #5aaa38;
  pointer-events: none;
  line-height: 1.5;
}
.pab-tree-label-band {
  font-weight: 700;
  color: #b8e68a;
  font-size: 15px;
  display: block;
  margin-bottom: 2px;
}

/* ── Pulsante interazione ── */
.pab-walk-interact {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: #3a7d2c;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  transition: background .15s, transform .1s;
  letter-spacing: .4px;
}
.pab-walk-interact:hover { background: #2a5c1e; transform: translateX(-50%) translateY(-2px); }

/* ── Frecce PC ── */
.pab-walk-arrows {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: 36px 36px 36px;
  grid-template-rows: 36px 36px;
  gap: 4px;
  z-index: 20;
}
@media (max-width: 767px) {
  .pab-walk-arrows { display: none; }
}

.pab-arrow {
  width: 36px; height: 36px;
  background: rgba(42,92,30,.85);
  border: 1px solid #5aaa38;
  color: #b8e68a;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s;
  user-select: none;
  -webkit-user-select: none;
}
.pab-arrow:active, .pab-arrow.is-pressed { background: rgba(90,160,56,.85); }
.pab-arrow-up    { grid-column: 2; grid-row: 1; }
.pab-arrow-left  { grid-column: 1; grid-row: 2; }
.pab-arrow-down  { grid-column: 2; grid-row: 2; }
.pab-arrow-right { grid-column: 3; grid-row: 2; }
.pab-arrow-rotl  { grid-column: 1; grid-row: 1; font-size: 16px; }
.pab-arrow-rotr  { grid-column: 3; grid-row: 1; font-size: 16px; }

/* ── Joystick mobile ── */
.pab-joystick-wrap {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 20;
  display: none;
  align-items: flex-end;
  gap: 10px;
}
@media (max-width: 767px) {
  .pab-joystick-wrap { display: flex; }
  .pab-walk-crosshair { display: none; }
}

.pab-joystick-base {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(42,92,30,.55);
  border: 2px solid rgba(90,170,56,.6);
  position: relative;
  touch-action: none;
  flex-shrink: 0;
}
.pab-joystick-knob {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(184,230,138,.85);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform .05s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.pab-rot-btns {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pab-rot-btn {
  width: 42px; height: 42px;
  background: rgba(42,92,30,.75);
  border: 1px solid #5aaa38;
  color: #b8e68a;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  touch-action: manipulation;
}
.pab-rot-btn:active { background: rgba(90,160,56,.85); }

/* ── Minimappa ── */
.pab-minimap-wrap {
  width: 100%;
  max-width: 240px;
  background: #0d1a0a;
  border-radius: 12px;
  padding: 12px;
  border: 1.5px solid #2a5c1e;
  box-sizing: border-box;
  flex-shrink: 0;
}
@media (max-width: 899px) {
  .pab-minimap-wrap { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
}

.pab-minimap-title {
  font-size: 13px;
  font-weight: 700;
  color: #b8e68a;
  margin-bottom: 8px;
  letter-spacing: .5px;
}

.pab-minimap-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid #2a5c1e;
  background: #0d1a0a;
}

.pab-minimap-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pab-ml-item {
  font-size: 11px;
  color: rgba(184,230,138,.7);
}

/* ── Modal info albero ── */
.pab-walk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: pabFadeIn .15s ease;
}
@keyframes pabFadeIn { from { opacity:0 } to { opacity:1 } }

.pab-walk-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  animation: pabSlideUp .2s ease;
}
@keyframes pabSlideUp { from { transform:translateY(18px);opacity:0 } to { transform:translateY(0);opacity:1 } }

.pab-walk-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  font-size: 18px; cursor: pointer;
  color: #6b7c65;
  padding: 4px 6px; border-radius: 4px;
  transition: background .12s;
}
.pab-walk-modal-close:hover { background: #f0f0f0; }

/* modal body ricicla gli stili dal CSS principale (già caricato) */
