/* picker.css — chrome for the style picker.

   Deliberately barely themed: it reads --bg-raised/--ink/--rule when a theme
   provides them and falls back to system colours when one doesn't, so a
   half-finished theme can still be switched away from. It must never depend
   on a token that only some themes define. */

.hs-picker {
  position: fixed;
  inset-block-start: 0;
  inset-inline-end: 0;
  z-index: 9999;
  display: flex;
  gap: .4rem;
  align-items: center;
  padding: .4rem .55rem;
  background: var(--bg-raised, Canvas);
  color: var(--ink, CanvasText);
  border: 1px solid var(--rule, GrayText);
  border-block-start: 0;
  border-inline-end: 0;
  border-end-start-radius: 4px;
  font: 500 12px/1 ui-sans-serif, system-ui, sans-serif;
  opacity: .55;
  transition: opacity .12s ease;
}
.hs-picker:hover,
.hs-picker:focus-within { opacity: 1; }

.hs-picker select {
  font: inherit;
  flex: none;          /* the blurb gives way first; a clipped theme name is useless */
  inline-size: auto;   /* base.css stretches form controls to 100%; not in here */
  padding: .3rem .4rem;
  background: var(--bg, Canvas);
  color: inherit;
  border: 1px solid var(--rule, GrayText);
  border-radius: 2px;
  max-inline-size: 14rem;
}

.hs-picker .hs-blurb {
  flex: 0 1 auto;
  min-inline-size: 0;
  max-inline-size: 24ch;
  opacity: .7;
  line-height: 1.3;
}

/* The dismiss button is not a toggle: once the page is set the way someone
   wants it, the control should be able to get out of the way for good. */
.hs-picker .hs-close {
  all: unset;
  cursor: pointer;
  padding: .2rem .35rem;
  line-height: 1;
  opacity: .6;
  border-radius: 2px;
}
.hs-picker .hs-close:hover { opacity: 1; }
.hs-picker .hs-close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }

@media (max-width: 48rem) { .hs-picker .hs-blurb { display: none; } }
@media print { .hs-picker { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .hs-picker { transition: none; } }
