/* WizardOS · text selection menu (core/sel-menu.js) and the selection colour. */
::selection { background: rgba(143, 99, 255, .42); color: #fff; }
.selmenu {
  position: fixed; left: 0; top: 0; z-index: 260; display: flex; align-items: stretch; gap: 2px; padding: 4px;
  border-radius: 16px; background: linear-gradient(rgba(24, 16, 48, .94), rgba(24, 16, 48, .94)), var(--wz-panel, var(--wz-base, var(--bg, #05030c))); border: 1px solid rgba(185, 155, 255, .28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .3), 0 0 22px rgba(143, 99, 255, .18);

  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; /* drag to move */
  opacity: 0; scale: .94; transition: opacity 120ms ease, scale 140ms var(--ease, ease);
}
.selmenu.on { opacity: 1; scale: 1; }
.selmenu.drag { scale: 1.04; cursor: grabbing; box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .3), 0 0 28px rgba(143, 99, 255, .3); }
.selmenu .sm-grip { display: flex; align-items: center; justify-content: center; width: 22px; margin-right: -2px; border-radius: 10px; cursor: grab; }
.selmenu .sm-grip svg { width: 16px; height: 16px; fill: rgba(185, 155, 255, .7); stroke: none; }
.selmenu.drag .sm-grip svg { fill: var(--violet-2, #b99bff); }
.selmenu.off { visibility: hidden; }
.selmenu[hidden] { display: none; }
.selmenu button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 52px; min-height: 48px;
  padding: 6px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink, #efeaff);
  font: 650 11.5px/1.1 system-ui, sans-serif; letter-spacing: .01em; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.selmenu button:active { background: rgba(143, 99, 255, .26); }
.selmenu svg { width: 19px; height: 19px; fill: none; stroke: var(--violet-2, #b99bff); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.selmenu.tight { max-width: calc(100vw - 16px); }
.selmenu.tight button { min-width: 44px; padding: 6px 5px; }
/* Reply shortcuts (wizard-ux issue 2186, switch wizard/reply-shortcuts): two rows in one panel (its opaque fill is the
 * switch's tweak.css, per skin). The top row is the tools that act at once; under a thin divider, pills that write into
 * the reply box scroll sideways. The pills are outlined words, not icon tools, so it is clear which ones act and which
 * ones write. The menu takes its width from the top row (the pills row adds none: contain), never wider than the screen. */
.selmenu.two { flex-direction: column; align-items: stretch; gap: 0; padding: 4px 4px 6px; min-width: min(300px, calc(100vw - 16px)); max-width: calc(100vw - 16px); }
.selmenu.two .sm-top { display: flex; align-items: stretch; gap: 2px; min-width: 0; }
.selmenu.two .sm-div { height: 1px; margin: 4px 8px 6px; background: color-mix(in srgb, var(--wz-accent) 30%, transparent); }
.selmenu.two .sm-chips { display: flex; gap: 6px; padding: 0 4px; overflow-x: auto; overflow-y: hidden; contain: inline-size; touch-action: pan-x;
  overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.selmenu.two .sm-chips::-webkit-scrollbar { display: none; }
.selmenu.two .sm-chips .sm-pill { flex: none; flex-direction: row; min-width: 0; min-height: 34px; padding: 0 13px; gap: 0; border: 1px solid color-mix(in srgb, var(--wz-accent) 50%, transparent);
  border-radius: 999px; background: color-mix(in srgb, var(--wz-accent) 12%, transparent); font-weight: 600; font-size: var(--wz-text-sm); line-height: 1; letter-spacing: 0; }
.selmenu.two .sm-chips .sm-pill:active { background: color-mix(in srgb, var(--wz-accent) 34%, transparent); }
.selmenu.two .sm-chips .sm-add { min-width: 34px; padding: 0; font-weight: 500; font-size: var(--wz-text-lg); border-style: dashed; }
.selmenu.two.tight .sm-top button { min-width: 0; flex: 1 1 auto; padding: 6px 4px; }
/* Settings › Reply shortcuts */
[data-selchips] .sm-chiprow { cursor: default; }
[data-selchips] .sm-chipbtns { display: flex; flex: none; gap: 2px; }
[data-selchips] .sm-chipbtns button { min-width: 34px; min-height: 34px; padding: 0 6px; border: 0; border-radius: 10px; background: none; color: var(--wz-accent); font-weight: 600; font-size: var(--wz-text-sm); cursor: pointer; }
[data-selchips] .sm-chipbtns button:disabled { opacity: .3; cursor: default; }
[data-selchips] .sm-chipform { display: grid; gap: 8px; padding: 10px 12px; }
[data-selchips] .sm-chipform label { display: grid; gap: 4px; font-size: var(--wz-text-sm); color: var(--wz-text-secondary); }
[data-selchips] .sm-chipform :is(input, textarea) { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--wz-border); border-radius: 10px;
  background: var(--wz-surface); color: var(--wz-text); font-size: var(--wz-text-md); line-height: 1.35; resize: vertical; }
[data-selchips] .sm-chipacts { margin-top: 0; }
