/* ============================================================================
 * How-to-use guide modal. Reuses .vcl-app's own --ink/--muted/--border/--panel
 * tokens (vcl-style.css) so it reads as part of the toolbox, not a bolted-on
 * component. position:fixed is safe here for the same reason the Selection
 * bar uses it -- .vcl-app deliberately carries no transform (vcl-style.css
 * comment above .vcl-app's own position:relative rule).
 * ============================================================================ */

#vcl-guideModal {
  position: fixed;
  inset: 0;
  background: rgba(26, 35, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 20px;
  z-index: 1000;
}

/* Fixed height (not max-height): the box must not grow when a tool's content is longer or an
   accordion opens, or -- centered via #vcl-guideModal's align-items:center -- growing taller
   shifts its top edge upward each time, which reads as the whole modal "jumping". A constant
   height keeps its screen position stable across every tool and every accordion state; the
   body scrolls internally (.vcl-guide-body, flex: 1 1 auto below) for whichever tool's content
   doesn't fit. */
.vcl-app .vcl-guide-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  height: min(640px, 86vh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(20, 30, 40, 0.25);
  font-family: "IBM Plex Sans", -apple-system, sans-serif;
  color: var(--ink);
}

.vcl-app .vcl-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.vcl-app .vcl-guide-head h2 { margin: 0; font-size: 17px; font-weight: 600; font-family: "IBM Plex Serif", serif; }
.vcl-app .vcl-guide-close {
  width: 30px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.vcl-app .vcl-guide-close:hover { color: var(--ink); }

.vcl-app .vcl-guide-body { flex: 1 1 auto; min-height: 0; padding: 20px 22px; overflow-y: auto; }

.vcl-app .vcl-guide-stepper { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.vcl-app .vcl-guide-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: none; padding: 0; cursor: pointer; }
.vcl-app .vcl-guide-dot.is-current { background: var(--tc, var(--accent)); width: 20px; border-radius: 5px; }
.vcl-app .vcl-guide-counter { font-family: "IBM Plex Mono", monospace; font-size: 11px; color: var(--ink-faint); margin-left: 4px; }

.vcl-app .vcl-guide-page-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.vcl-app .vcl-guide-dot-lg { width: 10px; height: 10px; border-radius: 50%; background: var(--tc, var(--accent)); flex-shrink: 0; }
.vcl-app .vcl-guide-page-head h3 { margin: 0; font-size: 16px; font-family: "IBM Plex Serif", serif; }
.vcl-app .vcl-guide-tagline { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 16px; }

.vcl-app .vcl-guide-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--paper);
}
.vcl-app .vcl-guide-section summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vcl-app .vcl-guide-section summary::-webkit-details-marker { display: none; }
.vcl-app .vcl-guide-section summary::after { content: "+"; margin-left: auto; color: var(--ink-faint); font-weight: 400; }
.vcl-app .vcl-guide-section[open] summary::after { content: "\2013"; }
.vcl-app .vcl-guide-section__body { padding: 0 14px 14px 34px; margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.vcl-app .vcl-guide-section__body li { margin-bottom: 5px; }

.vcl-app .vcl-guide-nav {
  display: flex;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  flex: none;
}
.vcl-app .vcl-guide-nav button {
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.vcl-app .vcl-guide-nav button:disabled { opacity: 0.35; cursor: default; }
