/* ╔══════════════════════════════════════════════════════════════╗
   ║  PREREQUISITE WEB — Component Styles                        ║
   ║  Live physics simulation with draggable nodes               ║
   ╚══════════════════════════════════════════════════════════════╝ */

/* ── PROGRAM CONTROLS ────────────────────────────────────────── */
.pw-controls {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .5rem .75rem;
}
.pw-label {
  font-size: .7rem; color: var(--light-gray);
  text-transform: uppercase; letter-spacing: .1em; margin-right: .25rem;
}
.pw-btn {
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.2);
  color: var(--light-gray); padding: .35rem .9rem; border-radius: 4px;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; transition: all .18s;
  cursor: pointer;
}
.pw-btn:hover  { border-color: var(--gold); color: var(--gold); }
.pw-btn.active { background: var(--gold); border-color: var(--gold); color: var(--dark-brown); }

.pw-zoom {
  display: flex; align-items: center; gap: .3rem;
  margin-left: auto;
}
.zoom-btn {
  background: rgba(255,255,255,.08); border: 1.5px solid rgba(255,255,255,.2);
  color: var(--light-gray); width: 28px; height: 28px;
  border-radius: 4px; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.zoom-btn:hover { border-color: var(--gold); color: var(--gold); }
.zoom-level {
  font-family: var(--font-mono); font-size: .7rem; color: var(--light-gray);
  min-width: 3rem; text-align: center;
}


/* ── GRAPH AREA ──────────────────────────────────────────────── */
#pw-main {
  position: relative; overflow: hidden;
  padding: 0; flex: 1;
  height: calc(100vh - 120px);
}
#pw-container {
  width: 100%; height: 100%;
  cursor: grab;
  overflow: hidden;
}
#pw-svg { display: block; }


/* ── NODES ───────────────────────────────────────────────────── */
.pw-node { cursor: default; }
.pw-node.draggable { cursor: grab; }
.pw-node.draggable:active { cursor: grabbing; }
.pw-node:hover rect {
  stroke: var(--gold) !important;
  stroke-width: 2 !important;
  filter: drop-shadow(0 2px 10px rgba(245,184,10,.3));
}
.pw-node.placeholder rect { stroke-dasharray: 4,2; }


/* ── EDGES ───────────────────────────────────────────────────── */
.pw-arrow-prereq { stroke: rgba(245,184,10,.6); stroke-width: 1.5; fill: none; }
.pw-arrow-coreq  { stroke: rgba(107,201,201,.6); stroke-width: 1.5; fill: none; stroke-dasharray: 5,3; }


/* ── LEGEND ──────────────────────────────────────────────────── */
#pw-legend {
  position: fixed; bottom: 1rem; right: 1rem;
  background: rgba(51,26,0,.93); border: 1px solid rgba(245,184,10,.3);
  border-radius: 8px; padding: .65rem .85rem;
  font-size: .62rem; z-index: 90; backdrop-filter: blur(4px); max-width: 185px;
}
#pw-legend h4 {
  font-family: var(--font-display); font-size: .72rem;
  color: var(--gold); margin-bottom: .45rem; letter-spacing: .04em;
}
#pw-legend .legend-row {
  display: flex; align-items: center; gap: .45rem; margin-bottom: .28rem; color: var(--light-gray);
}


/* ── DETAIL PANEL (hidden — kept for HTML compatibility) ────── */
#pw-panel { display: none; }


/* ── TOOLTIP ─────────────────────────────────────────────────── */
#pw-tooltip {
  position: fixed; background: rgba(51,26,0,.95); border: 1px solid var(--gold);
  color: var(--white); font-size: .65rem; padding: .3rem .6rem;
  border-radius: 4px; pointer-events: none; opacity: 0; transition: opacity .12s;
  z-index: 300; max-width: 280px; line-height: 1.4;
}
#pw-tooltip.vis { opacity: 1; }


/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .pw-controls { gap: .3rem; }
  .pw-btn { padding: .25rem .5rem; font-size: .7rem; }
}
