/* Wardway Responsive Foundation - Phase 1 */

@media (max-width: 1400px) {
  .guided-sequence { width: 240px; bottom: 18px; }
  .guided-step { font-size: 11px !important; }
}

@media (max-width: 1024px) {
  body { overflow-y: auto; }

  .far-wall {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .far-panel.left,
  .far-panel.right,
  .far-panel.center {
    width: 100% !important;
    min-height: auto;
  }

  .far-panel.center { min-height: 520px; }

  .guided-sequence {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 16px;
    transform: translateX(-50%);
    width: min(92vw, 340px);
  }
}

@media (max-width: 700px) {
  .far-panel.left,
  .far-panel.right { display: none; }

  .far-panel.center,
  #global-map { min-height: 100vh; }

  .guided-sequence {
    width: calc(100vw - 28px);
    bottom: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .guided-input {
    height: 38px;
    font-size: 14px;
  }

  .guided-step {
    min-height: 38px;
    font-size: 12px !important;
  }
}

@media (max-width: 420px) {
  .guided-sequence { gap: 6px; }
  .guided-step { padding: 7px 8px !important; }
}


/* Keep side panels usable when content exceeds screen height */
.far-panel.left,
.far-panel.right {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 100vh;
  scrollbar-width: thin;
}

/* Prevent right panel from disappearing offscreen on laptop widths */
@media (max-width: 1400px) {
  .far-panel.right {
    min-width: 260px;
    max-width: 32vw;
  }

  .far-panel.left {
    min-width: 240px;
    max-width: 30vw;
  }
}


/* Laptop command-center proportions: smaller sides, dominant map */
@media (min-width: 1025px) and (max-width: 1500px) {
  .far-wall {
    display: grid !important;
    grid-template-columns: minmax(220px, 22%) minmax(520px, 56%) minmax(220px, 22%);
    gap: 14px;
  }

  .far-panel.left,
  .far-panel.right,
  .far-panel.center {
    width: auto !important;
  }

  .far-panel.center {
    min-width: 0;
  }
}


/* Apprentice GCC actual layout wrapper */
@media (min-width: 1025px) and (max-width: 1500px) {
  .main-layout {
    display: grid !important;
    grid-template-columns: minmax(220px, 20%) minmax(620px, 60%) minmax(220px, 20%) !important;
    gap: 14px !important;
  }

  .main-layout .far-panel.left,
  .main-layout .far-panel.center,
  .main-layout .far-panel.right {
    width: auto !important;
    min-width: 0 !important;
  }
}
