/* The one switch on the plain-JS pages: OpenAI Apps SDK UI's Switch (MIT, @openai/apps-sdk-ui 0.2.2,
   components/Switch/Switch.module.css), copied verbatim. public/cui-choice.js turns every <input type="checkbox"
   role="switch"> into the markup their Switch.tsx renders (Radix Switch: button.Track > span.Thumb, the input kept as
   Radix's hidden bubble input) and ports its behaviour. Never hand-build another switch.
   CamOS: only the CSS-module class names are mapped (.Container → .cui-switch, .Track → .cui-switch-track,
   .Thumb → .cui-switch-thumb, .Label → .cui-switch-label), and the rules sit outside their `@layer components` wrapper:
   plain pages are unlayered, so a layered copy would lose to every page rule. */
@layer theme,camos;
@layer camos{
/* CamOS: what the kit's stylesheet expects from Tailwind's preflight (the dashboard has it; plain pages don't). */
:where(.cui-switch),:where(.cui-switch) *,:where(.cui-switch) ::before,:where(.cui-switch) ::after{box-sizing:border-box}
:where(.cui-switch) button{margin:0;padding:0;font:inherit;color:inherit;-webkit-appearance:button;appearance:button}

/* ---- Their stylesheet, verbatim ---- */
.cui-switch {
  display: flex;
  font-size: var(--font-text-sm-size);
  line-height: var(--font-text-sm-line-height);
     -moz-user-select: none;
          user-select: none;
}

  .cui-switch[data-has-label] {
    align-items: flex-start;
  }

  .cui-switch[data-label-position="start"] {
    flex-direction: row-reverse;
  }.cui-switch-track {
  position: relative;
  flex-shrink: 0;
  width: var(--switch-track-width);
  max-width: var(--switch-track-width);
  height: var(--switch-track-height);
  border: 0;
  border-radius: var(--radius-full);
  background: var(--switch-track-color);
  cursor: pointer;
  transition: background-color 250ms var(--cubic-move);
}
    @media (hover: hover) and (pointer: fine) {.cui-switch-track:where(:not([data-disabled], [data-state="checked"])):hover {
      background: var(--switch-track-color-hover);
}
}

  [data-has-label] .cui-switch-track {
    /*
     * Vertical alignment adjusting when necessary. Avoid using align-items: center; for long wrapping labels.
     */
    top: var(--switch-track-top-offset, 1px);
  }

  .cui-switch-track:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
  }

  .cui-switch-track[data-state="checked"] {
    background: var(--switch-track-color-checked);
  }

  .cui-switch-track[data-disabled] {
    background: var(--switch-track-color-disabled);
    cursor: not-allowed;
  }

    .cui-switch-track[data-disabled][data-state="checked"] {
      background: var(--switch-track-color-checked-disabled);
    }.cui-switch-thumb {
  position: absolute;
  top: var(--switch-thumb-offset);
  left: var(--switch-thumb-offset);
  display: block;
  width: var(--switch-thumb-size);
  height: var(--switch-thumb-size);
  border-radius: var(--radius-full);
  background: var(--switch-thumb-color);
  box-shadow: var(--switch-thumb-shadow);
  transition: transform 250ms var(--cubic-move);
}

  [data-state="checked"] .cui-switch-thumb {
    transform: translateX(
      calc(var(--switch-track-width) - var(--switch-thumb-size) - var(--switch-thumb-offset) * 2)
    );
  }

  .cui-switch-thumb[data-disabled] {
    background: var(--switch-thumb-color-disabled);
    box-shadow: none;
  }.cui-switch-label {
  cursor: pointer;
}

  /* Use padding so that the spacing is intrinsic to the label, remaining clickable. */
  [data-label-position="end"] .cui-switch-label {
    padding-left: var(--switch-label-gap);
  }

  [data-label-position="start"] .cui-switch-label {
    padding-right: var(--switch-label-gap);
  }

  [data-disabled] .cui-switch-label {
    cursor: not-allowed;
  }
}
