/* ===== css/demo/menu-overrides.css ===== */
/* Demo-only shell around the captured panel markup. */

html, body { height: 100%; }
body { margin: 0; overflow: hidden; }
#root { height: 100vh; }

/* 12-column widget grid: spans come from the live layout, positions are ours. */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.demo-cell { min-width: 0; }

@media (max-width: 1023px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr); }
  .demo-cell { grid-column: auto !important; }
}

/* Nav state is driven by the demo router, not React. */
aside button[data-goto] { background-color: transparent !important; }
aside button[data-goto]:hover { background-color: var(--bg-elevated) !important; }
aside button[data-goto].demo-active {
  background-color: #6366f1 !important;
  color: #fff !important;
  border-color: transparent !important;
}
aside button[data-goto].demo-active * { color: #fff !important; }
aside button[data-off] { opacity: .45; cursor: not-allowed; }

/* Theme drawer */
#themeModal { display: none; }
#themeModal.open { display: flex; }
#themeModal.open ~ .demo-tag { display: none; }

/* Switch off state: the captured markup hardcodes the on colour inline. */
.demo-switch-off { background-color: var(--bg-elevated) !important; }

.demo-tag {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(9, 9, 11, .92);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--text-secondary);
}
.demo-tag a { color: var(--accent-secondary); text-decoration: none; white-space: nowrap; }
.demo-tag a:hover { text-decoration: underline; }
.demo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-hex);
  box-shadow: 0 0 9px var(--accent-hex);
  flex: none;
}

@media (max-width: 720px) {
  .demo-tag { display: none; }
}

/* Interaction layer -------------------------------------------------- */
button { cursor: pointer; }
button:active { filter: brightness(1.12); }

.demo-pick {
  border-color: var(--accent-hex) !important;
  box-shadow: 0 0 0 1px var(--accent-hex), 0 0 18px -6px var(--accent-hex) !important;
}

.theme-card.demo-collapsed > *:not(.widget-drag-handle) { display: none; }
.theme-card.demo-collapsed .widget-drag-handle { border-bottom: 0; }

.demo-move .demo-cell {
  outline: 1px dashed color-mix(in srgb, var(--accent-hex) 45%, transparent);
  outline-offset: 3px;
}
.demo-move .demo-cell > .theme-card { cursor: grab; }

.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 12px);
  z-index: 90;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(10px);
}
.demo-toast.show { opacity: 1; transform: translate(-50%, 0); }
.demo-side-hidden { display: none !important; }

/* Key binder: listening state on the chip being rebound. */
.demo-binding {
  border-color: var(--accent-hex) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-hex) 30%, transparent);
}
.demo-binding span { opacity: .9; animation: demo-pulse 1s ease-in-out infinite; }
@keyframes demo-pulse { 50% { opacity: .35; } }

/* Small screens: the capture is a desktop app, so the shell sheds chrome. */
@media (max-width: 900px) {
  aside { display: none !important; }
  header {
    height: auto !important;
    min-height: 56px;
    padding: 8px 12px !important;
    flex-wrap: wrap;
    gap: 8px !important;
  }
  header > div { flex-wrap: wrap; overflow: visible; }
  header .h-4.w-px { display: none !important; }
  main { padding: 12px !important; }
  main h1 { font-size: 17px !important; }
  .demo-grid { gap: 12px; }
}
