/* ombelle Input OTP */
[data-preview-family="ombelle"] [data-slot='pv-input-otp'] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* input-otp's own container, inside the Radix edition's wrapper. */
[data-preview-family="ombelle"] [data-slot='pv-input-otp'] > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp'][data-disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp-group'] {
  display: flex;
  align-items: center;
  gap: 8px;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'] {
  box-sizing: border-box;
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 46px;
  block-size: 54px;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--input);
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 2px 0
    color-mix(in oklab, var(--foreground) 7%, transparent);
  color: var(--foreground);
  font:
    700 22px/1 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  text-align: center;
}
/* Radix marks the slot under the caret; Base UI slots are inputs that take focus. */
[data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'][data-active],[data-preview-family="ombelle"] 
[data-slot='pv-input-otp-slot']:focus {
  border-color: var(--primary);
  /* Inside the slot, so neighbouring slots never meet it, and 2px wider than the 1.5px border it
     covers: over the border alone the ring can fall under 3:1 (dark mode), and a 46px slot's rounded
     corners leave too little of a thinner inner edge. */
  outline: 3.5px solid var(--ring);
  outline-offset: -3.5px;
}
/* Radix draws a caret in the active empty slot; Base UI inputs show their own. */
[data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'][data-caret]::after {
  content: '';
  position: absolute;
  inline-size: 1.5px;
  block-size: 24px;
  background: var(--foreground);
  animation: ombelle-otp-caret-ombelle 1s steps(1) infinite;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp-separator'] {
  inline-size: 12px;
  border-block-start: 2px solid var(--input);
}
@keyframes ombelle-otp-caret-ombelle {
  50% {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  [data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'][data-caret]::after {
    animation: none;
  }
}
@media (forced-colors: active) {
  [data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'] {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
  [data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'][data-active],[data-preview-family="ombelle"] 
  [data-slot='pv-input-otp-slot']:focus {
    outline: 2px solid Highlight;
  }
  [data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'][data-caret]::after {
    background: CanvasText;
  }
  [data-preview-family="ombelle"] [data-slot='pv-input-otp-separator'] {
    border-color: CanvasText;
  }
}

/* Narrow containers: each slot keeps 46px when there is room and shrinks to 1.5rem
   before the code overflows. The grid tracks also keep the code's minimum width small
   inside grid and flex layouts. */
[data-preview-family="ombelle"] [data-slot='pv-input-otp'] {
  inline-size: fit-content;
  max-inline-size: 100%;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp'] > div {
  min-inline-size: 0;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp-group'] {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(1.5rem, 46px);
  min-inline-size: 0;
}
[data-preview-family="ombelle"] [data-slot='pv-input-otp-slot'] {
  /* Capped, so a slot outside an input-otp-group (a Base UI <input>) is not the browser's default width. */
  inline-size: min(46px, 100%);
  min-inline-size: 0;
}

/* Invalid: a field given aria-invalid marks every slot (DES-15). */
[data-preview-family="ombelle"] [data-slot='pv-input-otp'][data-invalid] [data-slot='pv-input-otp-slot'] {
  border-color: var(--destructive);
  background: color-mix(in oklab, var(--destructive) 10%, var(--card));
}
@media (forced-colors: active) {
  [data-preview-family="ombelle"] [data-slot='pv-input-otp'][data-invalid] [data-slot='pv-input-otp-slot'] {
    border: 3px double CanvasText;
  }
}

