/* WME Neo — floating theme switcher + command palette.
   Shown in BOTH skins (Tier 0/1 only), so it uses classic tokens as fallbacks. */
.neo-switch { position: fixed; left: 20px; bottom: 20px; z-index: 9000; font-family: Inter, system-ui, sans-serif; }
.neo-switch-fab {
  width: 46px; height: 46px; border-radius: 999px; border: 1px solid var(--neo-border, var(--card-border, #dfe3ea));
  background: var(--neo-surface, var(--bg, #fff)); color: var(--neo-accent, var(--wme-blue, #1463b8));
  box-shadow: var(--neo-shadow, 0 8px 24px -12px rgba(15, 23, 42, .3)); cursor: pointer; font-size: 17px;
  display: grid; place-items: center; transition: transform 180ms cubic-bezier(.2, .7, .2, 1), box-shadow 180ms;
}
.neo-switch-fab:hover { transform: translateY(-2px); box-shadow: var(--neo-shadow-lg, 0 16px 40px -16px rgba(15, 23, 42, .4)); }
.neo-switch-fab:focus-visible { outline: none; box-shadow: var(--neo-ring, 0 0 0 3px rgba(20, 99, 184, .25)); }
.neo-switch.open .neo-switch-fab { background: var(--neo-accent, var(--wme-blue, #1463b8)); color: #fff; border-color: transparent; }
.neo-switch-panel {
  position: absolute; left: 0; bottom: 56px; width: 268px; padding: 12px;
  background: var(--neo-surface, var(--bg, #fff)); color: var(--neo-text, var(--ink, #111827));
  border: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); border-radius: 14px;
  box-shadow: var(--neo-shadow-lg, 0 16px 40px -16px rgba(15, 23, 42, .4));
  opacity: 0; transform: translateY(6px) scale(.98); pointer-events: none; transform-origin: bottom left;
  transition: opacity 160ms ease, transform 180ms cubic-bezier(.2, .7, .2, 1);
}
.neo-switch.open .neo-switch-panel { opacity: 1; transform: none; pointer-events: auto; }
.neo-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
.neo-switch-label { font-size: 12px; font-weight: 600; color: var(--neo-muted, var(--muted, #6b7280)); letter-spacing: .01em; }
.neo-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--neo-surface-2, var(--bg-alt, #f8fafc)); border: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); }
.neo-seg button {
  border: 0; background: transparent; border-radius: 7px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--neo-muted, var(--muted, #6b7280)); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: background 160ms, color 160ms, box-shadow 160ms;
}
.neo-seg button:hover { color: var(--neo-text, var(--ink, #111827)); }
.neo-seg button.active { background: var(--neo-surface, var(--bg, #fff)); color: var(--neo-accent, var(--wme-blue, #1463b8)); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.neo-seg button:focus-visible { outline: none; box-shadow: var(--neo-ring, 0 0 0 3px rgba(20, 99, 184, .25)); }
.neo-seg button i { font-size: 11px; }
.neo-switch-palette {
  margin-top: 8px; width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); border-radius: 10px; background: transparent; font: inherit; font-size: 12.5px;
  color: var(--neo-text, var(--ink, #111827)); cursor: pointer; transition: background 160ms;
}
.neo-switch-palette:hover { background: var(--neo-surface-2, var(--bg-alt, #f8fafc)); }
.neo-switch-palette i { color: var(--neo-accent, var(--wme-blue, #1463b8)); }
.neo-switch-palette kbd { margin-left: auto; font: 600 10.5px/1 Inter, system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; color: var(--neo-muted, var(--muted, #6b7280)); background: var(--neo-surface-2, var(--bg-alt, #f8fafc)); border: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); }

/* Command palette */
.neo-palette { position: fixed; inset: 0; z-index: 9500; display: none; background: rgba(2, 6, 23, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.neo-palette.open { display: block; }
.neo-palette-box {
  width: min(640px, 92vw); margin: 12vh auto 0; background: var(--neo-surface, var(--bg, #fff)); color: var(--neo-text, var(--ink, #111827));
  border: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); border-radius: 16px; box-shadow: var(--neo-shadow-lg, 0 24px 60px -16px rgba(0, 0, 0, .45));
  overflow: hidden; animation: neoModalIn .2s cubic-bezier(.2, .7, .2, 1);
}
.neo-palette-search { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border-bottom: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); }
.neo-palette-search i { color: var(--neo-muted, var(--muted, #6b7280)); }
.neo-palette-search input {
  flex: 1; border: 0 !important; box-shadow: none !important; background: transparent !important; font: inherit; font-size: 15px; min-height: 44px; padding: 0; color: inherit; outline: none;
}
.neo-palette-search kbd { font: 600 10.5px/1 Inter, system-ui, sans-serif; padding: 3px 6px; border-radius: 6px; color: var(--neo-muted, var(--muted, #6b7280)); background: var(--neo-surface-2, var(--bg-alt, #f8fafc)); border: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); }
.neo-palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.neo-palette-list li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; cursor: pointer; }
.neo-palette-list li i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--neo-surface-2, var(--bg-alt, #f8fafc)); color: var(--neo-accent, var(--wme-blue, #1463b8)); font-size: 12px; }
.neo-palette-list li small { color: var(--neo-muted, var(--muted, #6b7280)); font-size: 11.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neo-palette-list li.active { background: var(--primary-light, rgba(20, 99, 184, .08)); }
.neo-palette-list li.neo-palette-empty { display: block; text-align: center; color: var(--neo-muted, var(--muted, #6b7280)); padding: 24px; cursor: default; }
.neo-palette-foot { padding: 8px 16px; border-top: 1px solid var(--neo-border, var(--card-border, #dfe3ea)); font-size: 11.5px; color: var(--neo-muted, var(--muted, #6b7280)); }

@media (max-width: 640px) {
  .neo-switch { left: 12px; bottom: 12px; }
  .neo-switch-panel { width: min(268px, calc(100vw - 24px)); }
  .neo-palette-box { margin-top: 6vh; }
}
@media (prefers-reduced-motion: reduce) { .neo-switch-panel, .neo-switch-fab, .neo-palette-box { transition: none; animation: none; } }
.neo-seg button[hidden] { display: none; }
