# Controller paired toast

> A two-tone controller rumbles as it pairs and its lights sweep across the four players before settling on the first.

- Category: [Toasts](https://library.aimran.es/components/toasts)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-toast-controller-paired
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Game consoles confirm a paired controller with a rumble and a row of player lights, and this toast borrows both. The controller is two colored halves and a dark middle drawn with gradients; it shakes for a fraction of a second, and four LEDs sweep along before only the first stays lit. The Rumble button replays it and calls the vibration API on phones.

The main color paints the right half and the second the left one, so you can match any controller. Change the player number and battery line, and light another LED by moving the first-child rule. Made for game launchers and companion apps.

## Code

### HTML

```html
<div class="uvq09-pad"><button type="button" class="fire">Pair again</button><div class="tt" role="status"><span class="gp" aria-hidden="true"><span class="hl"><i class="stk"></i><i class="dp"></i></span><span class="md"><i></i></span><span class="hr"><i class="bt"></i><i class="stk"></i></span></span><span class="tx"><b>Controller connected</b><small>Player 1 · battery 80%</small><span class="leds" aria-hidden="true"><i style="--i:0"></i><i style="--i:1"></i><i style="--i:2"></i><i style="--i:3"></i></span></span><button type="button" class="rb">Rumble</button></div></div>
```

### CSS

```css
.uvq09-pad {
  --c1: #ef4444;
  --c2: #06b6d4;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq09-pad {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  width: 21em;
  height: 15em;
}

.uvq09-pad .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  top: 1.2em;
  translate: -50% 0;
  padding: .6em 1.1em;
  border-radius: 2em;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-pad .fire:active {
  scale: .96;
}

.uvq09-pad .fire:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq09-pad .tt {
  position: absolute;
  left: 50%;
  bottom: 1em;
  width: 19em;
  translate: -50% 0;
  border-radius: 1.1em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.2em 2.4em -1em rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .85em;
  padding: .8em .85em;
  transform: translateY(130%) scale(.92);
  opacity: 0;
  transition: transform calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-pad .gp {
  display: flex;
  flex: none;
  width: 6em;
  height: 3.3em;
  filter: drop-shadow(0 .3em .35em rgba(0,0,0,.3));
}

.uvq09-pad .tt.in .gp {
  animation: uvq09-pad-r calc(0.07s / var(--k)) linear calc(0.45s / var(--k)) 8 alternate;
}

.uvq09-pad .hl,.uvq09-pad .hr {
  position: relative;
  flex: 1;
}

.uvq09-pad .hl {
  border-radius: 1.65em 0 0 1.65em;
  background: linear-gradient(160deg,color-mix(in srgb,var(--c2) 60%,#fff),var(--c2) 55%);
}

.uvq09-pad .hr {
  border-radius: 0 1.65em 1.65em 0;
  background: linear-gradient(200deg,color-mix(in srgb,var(--c1) 60%,#fff),var(--c1) 55%);
}

.uvq09-pad .md {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.3em;
  background: linear-gradient(#3a3a3e,#232326);
}

.uvq09-pad .md i {
  width: .35em;
  height: .35em;
  border-radius: 50%;
  background: #71717a;
}

.uvq09-pad .stk {
  position: absolute;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#5a5a5e,#18181b 70%);
  box-shadow: 0 0 0 .13em rgba(0,0,0,.3);
}

.uvq09-pad .hl .stk {
  left: .65em;
  top: .42em;
}

.uvq09-pad .hr .stk {
  right: .65em;
  bottom: .42em;
}

.uvq09-pad .dp,.uvq09-pad .bt {
  position: absolute;
  width: 1em;
  height: 1em;
  background: radial-gradient(circle,#1f1f22 62%,transparent 66%) 50% 0/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 50% 100%/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 0 50%/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 100% 50%/.34em .34em no-repeat;
}

.uvq09-pad .dp {
  left: .9em;
  bottom: .3em;
}

.uvq09-pad .bt {
  right: .85em;
  top: .3em;
}

.uvq09-pad .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  min-width: 0;
}

.uvq09-pad .tx b {
  font-size: .92em;
}

.uvq09-pad small {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq09-pad .leds {
  display: flex;
  gap: .25em;
  margin-top: .3em;
}

.uvq09-pad .leds i {
  width: .8em;
  height: .28em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 15%,transparent);
}

.uvq09-pad .tt.in .leds i:first-child {
  background: #4ade80;
  box-shadow: 0 0 .4em #4ade80;
}

.uvq09-pad .tt.in .leds i {
  animation: uvq09-pad-l calc(0.6s / var(--k)) steps(1,end) calc((.4s + var(--i) * .15s) / var(--k)) 2 backwards;
}

.uvq09-pad .rb {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .85em;
  border-radius: 2em;
  font-size: .76em;
  font-weight: 750;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .rb:hover {
  background: color-mix(in srgb,var(--fg) 11%,transparent);
}

.uvq09-pad .rb:active {
  scale: .94;
}

.uvq09-pad .rb:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq09-pad-r {
  from {
    translate: -1.5px .5px;
  }
  to {
    translate: 1.5px -.5px;
  }
}

@keyframes uvq09-pad-l {
  0%,40%,100% {
    background: color-mix(in srgb,var(--fg) 15%,transparent);
    box-shadow: none;
  }
  10% {
    background: #4ade80;
    box-shadow: 0 0 .4em #4ade80;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-pad,.uvq09-pad *,.uvq09-pad *::before,.uvq09-pad *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
```

### JavaScript

```js
document.querySelectorAll(".uvq09-pad").forEach(el => {
  const t=el.querySelector(".tt"),f=el.querySelector(".fire");let tm=[];const clr=()=>{tm.forEach(clearTimeout);tm=[]};const later=(fn,ms)=>tm.push(setTimeout(fn,ms));
const show=()=>{clr();t.classList.remove("in","out");void t.offsetWidth;later(()=>{t.classList.add("in");},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const g=t.querySelector(".gp");t.querySelector(".rb").addEventListener("click",()=>{g.style.animation="none";void g.offsetWidth;g.style.animation="";try{navigator.vibrate&&navigator.vibrate(180)}catch(e){}});return clr
});
```

### React

```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq09-pad {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  width: 21em;
  height: 15em;
}

.uvq09-pad .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  top: 1.2em;
  translate: -50% 0;
  padding: .6em 1.1em;
  border-radius: 2em;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-pad .fire:active {
  scale: .96;
}

.uvq09-pad .fire:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq09-pad .tt {
  position: absolute;
  left: 50%;
  bottom: 1em;
  width: 19em;
  translate: -50% 0;
  border-radius: 1.1em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.2em 2.4em -1em rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .85em;
  padding: .8em .85em;
  transform: translateY(130%) scale(.92);
  opacity: 0;
  transition: transform calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-pad .gp {
  display: flex;
  flex: none;
  width: 6em;
  height: 3.3em;
  filter: drop-shadow(0 .3em .35em rgba(0,0,0,.3));
}

.uvq09-pad .tt.in .gp {
  animation: uvq09-pad-r calc(0.07s / var(--k)) linear calc(0.45s / var(--k)) 8 alternate;
}

.uvq09-pad .hl,.uvq09-pad .hr {
  position: relative;
  flex: 1;
}

.uvq09-pad .hl {
  border-radius: 1.65em 0 0 1.65em;
  background: linear-gradient(160deg,color-mix(in srgb,var(--c2) 60%,#fff),var(--c2) 55%);
}

.uvq09-pad .hr {
  border-radius: 0 1.65em 1.65em 0;
  background: linear-gradient(200deg,color-mix(in srgb,var(--c1) 60%,#fff),var(--c1) 55%);
}

.uvq09-pad .md {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.3em;
  background: linear-gradient(#3a3a3e,#232326);
}

.uvq09-pad .md i {
  width: .35em;
  height: .35em;
  border-radius: 50%;
  background: #71717a;
}

.uvq09-pad .stk {
  position: absolute;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#5a5a5e,#18181b 70%);
  box-shadow: 0 0 0 .13em rgba(0,0,0,.3);
}

.uvq09-pad .hl .stk {
  left: .65em;
  top: .42em;
}

.uvq09-pad .hr .stk {
  right: .65em;
  bottom: .42em;
}

.uvq09-pad .dp,.uvq09-pad .bt {
  position: absolute;
  width: 1em;
  height: 1em;
  background: radial-gradient(circle,#1f1f22 62%,transparent 66%) 50% 0/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 50% 100%/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 0 50%/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 100% 50%/.34em .34em no-repeat;
}

.uvq09-pad .dp {
  left: .9em;
  bottom: .3em;
}

.uvq09-pad .bt {
  right: .85em;
  top: .3em;
}

.uvq09-pad .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  min-width: 0;
}

.uvq09-pad .tx b {
  font-size: .92em;
}

.uvq09-pad small {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq09-pad .leds {
  display: flex;
  gap: .25em;
  margin-top: .3em;
}

.uvq09-pad .leds i {
  width: .8em;
  height: .28em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 15%,transparent);
}

.uvq09-pad .tt.in .leds i:first-child {
  background: #4ade80;
  box-shadow: 0 0 .4em #4ade80;
}

.uvq09-pad .tt.in .leds i {
  animation: uvq09-pad-l calc(0.6s / var(--k)) steps(1,end) calc((.4s + var(--i) * .15s) / var(--k)) 2 backwards;
}

.uvq09-pad .rb {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .85em;
  border-radius: 2em;
  font-size: .76em;
  font-weight: 750;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .rb:hover {
  background: color-mix(in srgb,var(--fg) 11%,transparent);
}

.uvq09-pad .rb:active {
  scale: .94;
}

.uvq09-pad .rb:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq09-pad-r {
  from {
    translate: -1.5px .5px;
  }
  to {
    translate: 1.5px -.5px;
  }
}

@keyframes uvq09-pad-l {
  0%,40%,100% {
    background: color-mix(in srgb,var(--fg) 15%,transparent);
    box-shadow: none;
  }
  10% {
    background: #4ade80;
    box-shadow: 0 0 .4em #4ade80;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-pad,.uvq09-pad *,.uvq09-pad *::before,.uvq09-pad *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const t=el.querySelector(".tt"),f=el.querySelector(".fire");let tm=[];const clr=()=>{tm.forEach(clearTimeout);tm=[]};const later=(fn,ms)=>tm.push(setTimeout(fn,ms));
const show=()=>{clr();t.classList.remove("in","out");void t.offsetWidth;later(()=>{t.classList.add("in");},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const g=t.querySelector(".gp");t.querySelector(".rb").addEventListener("click",()=>{g.style.animation="none";void g.offsetWidth;g.style.animation="";try{navigator.vibrate&&navigator.vibrate(180)}catch(e){}});return clr
}

export default function ToastControllerPaired() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#ef4444",
          "--c2": "#06b6d4",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-pad"><button type="button" className="fire">Pair again</button><div className="tt" role="status"><span className="gp" aria-hidden="true"><span className="hl"><i className="stk"></i><i className="dp"></i></span><span className="md"><i></i></span><span className="hr"><i className="bt"></i><i className="stk"></i></span></span><span className="tx"><b>Controller connected</b><small>Player 1 · battery 80%</small><span className="leds" aria-hidden="true"><i style={{ "--i": "0" } as CSSProperties}></i><i style={{ "--i": "1" } as CSSProperties}></i><i style={{ "--i": "2" } as CSSProperties}></i><i style={{ "--i": "3" } as CSSProperties}></i></span></span><button type="button" className="rb">Rumble</button></div></div>
      </div>
    </>
  );
}
```

## Prompt for AI assistants

Paste this into ChatGPT, Claude, Cursor, v0 or Lovable to adapt the block to your stack (Tailwind, Vue, Svelte…):

````text
I want to add the “Controller paired toast” block (Toasts) from AIMRAN Library to my project.

## What it is
A two-tone controller rumbles as it pairs and its lights sweep across the four players before settling on the first.

## Chosen settings
- Main color: #ef4444
- Secondary color: #06b6d4
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Mando conectado"

## What I need
1. Add it to my project with the same look and animation as the reference code: same sizes, colours, radii, shadows, timings and easing.
2. It is built with plain HTML and CSS (the reference wraps it in a React component with its CSS). If my project uses something else (Vue, Svelte, Astro, plain HTML…), translate it without losing any behaviour. If I use Tailwind, turn the styles into classes; if not, keep the CSS in its own file.
3. Expose the settings above as props (or CSS variables) with those values as defaults.
4. Make it work well on phones: nothing that depends only on hover, touch targets of at least 44 px and no overflow on 320 px screens.
5. Make it look right in light and dark mode.
6. Keep it accessible: semantic HTML, roles and aria-* where needed, visible focus and keyboard support.
7. Respect prefers-reduced-motion: with reduced motion, no big animations but the same end result.

## Reference code
```tsx
// @ts-nocheck: setup() es JavaScript del DOM sin tipos, el mismo de la pestaña JS.
import { useEffect, useRef, type CSSProperties } from "react";

const css = `
.uvq09-pad {
  font-family: -apple-system,BlinkMacSystemFont,"SF Pro Text","Inter",system-ui,sans-serif;
  font-size: var(--s);
  color: var(--fg);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  width: 21em;
  height: 15em;
}

.uvq09-pad .fire {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: absolute;
  left: 50%;
  top: 1.2em;
  translate: -50% 0;
  padding: .6em 1.1em;
  border-radius: 2em;
  font-size: .82em;
  font-weight: 650;
  white-space: nowrap;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: color calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-pad .fire:active {
  scale: .96;
}

.uvq09-pad .fire:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

.uvq09-pad .tt {
  position: absolute;
  left: 50%;
  bottom: 1em;
  width: 19em;
  translate: -50% 0;
  border-radius: 1.1em;
  background: color-mix(in srgb,var(--fg) 3%,var(--bg));
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent),0 1.2em 2.4em -1em rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  gap: .85em;
  padding: .8em .85em;
  transform: translateY(130%) scale(.92);
  opacity: 0;
  transition: transform calc(0.55s / var(--k)) cubic-bezier(.22,1,.36,1),opacity calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-pad .gp {
  display: flex;
  flex: none;
  width: 6em;
  height: 3.3em;
  filter: drop-shadow(0 .3em .35em rgba(0,0,0,.3));
}

.uvq09-pad .tt.in .gp {
  animation: uvq09-pad-r calc(0.07s / var(--k)) linear calc(0.45s / var(--k)) 8 alternate;
}

.uvq09-pad .hl,.uvq09-pad .hr {
  position: relative;
  flex: 1;
}

.uvq09-pad .hl {
  border-radius: 1.65em 0 0 1.65em;
  background: linear-gradient(160deg,color-mix(in srgb,var(--c2) 60%,#fff),var(--c2) 55%);
}

.uvq09-pad .hr {
  border-radius: 0 1.65em 1.65em 0;
  background: linear-gradient(200deg,color-mix(in srgb,var(--c1) 60%,#fff),var(--c1) 55%);
}

.uvq09-pad .md {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.3em;
  background: linear-gradient(#3a3a3e,#232326);
}

.uvq09-pad .md i {
  width: .35em;
  height: .35em;
  border-radius: 50%;
  background: #71717a;
}

.uvq09-pad .stk {
  position: absolute;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%,#5a5a5e,#18181b 70%);
  box-shadow: 0 0 0 .13em rgba(0,0,0,.3);
}

.uvq09-pad .hl .stk {
  left: .65em;
  top: .42em;
}

.uvq09-pad .hr .stk {
  right: .65em;
  bottom: .42em;
}

.uvq09-pad .dp,.uvq09-pad .bt {
  position: absolute;
  width: 1em;
  height: 1em;
  background: radial-gradient(circle,#1f1f22 62%,transparent 66%) 50% 0/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 50% 100%/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 0 50%/.34em .34em no-repeat,radial-gradient(circle,#1f1f22 62%,transparent 66%) 100% 50%/.34em .34em no-repeat;
}

.uvq09-pad .dp {
  left: .9em;
  bottom: .3em;
}

.uvq09-pad .bt {
  right: .85em;
  top: .3em;
}

.uvq09-pad .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  min-width: 0;
}

.uvq09-pad .tx b {
  font-size: .92em;
}

.uvq09-pad small {
  font-size: .72em;
  color: color-mix(in srgb,var(--fg) 55%,transparent);
}

.uvq09-pad .leds {
  display: flex;
  gap: .25em;
  margin-top: .3em;
}

.uvq09-pad .leds i {
  width: .8em;
  height: .28em;
  border-radius: 1em;
  background: color-mix(in srgb,var(--fg) 15%,transparent);
}

.uvq09-pad .tt.in .leds i:first-child {
  background: #4ade80;
  box-shadow: 0 0 .4em #4ade80;
}

.uvq09-pad .tt.in .leds i {
  animation: uvq09-pad-l calc(0.6s / var(--k)) steps(1,end) calc((.4s + var(--i) * .15s) / var(--k)) 2 backwards;
}

.uvq09-pad .rb {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .85em;
  border-radius: 2em;
  font-size: .76em;
  font-weight: 750;
  background: color-mix(in srgb,var(--fg) 6%,transparent);
  transition: background calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-pad .rb:hover {
  background: color-mix(in srgb,var(--fg) 11%,transparent);
}

.uvq09-pad .rb:active {
  scale: .94;
}

.uvq09-pad .rb:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 3px;
}

@keyframes uvq09-pad-r {
  from {
    translate: -1.5px .5px;
  }
  to {
    translate: 1.5px -.5px;
  }
}

@keyframes uvq09-pad-l {
  0%,40%,100% {
    background: color-mix(in srgb,var(--fg) 15%,transparent);
    box-shadow: none;
  }
  10% {
    background: #4ade80;
    box-shadow: 0 0 .4em #4ade80;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-pad,.uvq09-pad *,.uvq09-pad *::before,.uvq09-pad *::after {
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
`;

// Interacción en JavaScript del DOM: la misma que en la pestaña JS.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function setup(el: any) {
  const t=el.querySelector(".tt"),f=el.querySelector(".fire");let tm=[];const clr=()=>{tm.forEach(clearTimeout);tm=[]};const later=(fn,ms)=>tm.push(setTimeout(fn,ms));
const show=()=>{clr();t.classList.remove("in","out");void t.offsetWidth;later(()=>{t.classList.add("in");},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const g=t.querySelector(".gp");t.querySelector(".rb").addEventListener("click",()=>{g.style.animation="none";void g.offsetWidth;g.style.animation="";try{navigator.vibrate&&navigator.vibrate(180)}catch(e){}});return clr
}

export default function ToastControllerPaired() {
  const ref = useRef<HTMLDivElement>(null);

  useEffect(() => {
    const el = ref.current?.firstElementChild;
    return el ? setup(el) : undefined;
  }, []);

  return (
    <>
      <style>{css}</style>
      <div
        ref={ref} style={{
          "--c1": "#ef4444",
          "--c2": "#06b6d4",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-pad"><button type="button" className="fire">Pair again</button><div className="tt" role="status"><span className="gp" aria-hidden="true"><span className="hl"><i className="stk"></i><i className="dp"></i></span><span className="md"><i></i></span><span className="hr"><i className="bt"></i><i className="stk"></i></span></span><span className="tx"><b>Controller connected</b><small>Player 1 · battery 80%</small><span className="leds" aria-hidden="true"><i style={{ "--i": "0" } as CSSProperties}></i><i style={{ "--i": "1" } as CSSProperties}></i><i style={{ "--i": "2" } as CSSProperties}></i><i style={{ "--i": "3" } as CSSProperties}></i></span></span><button type="button" className="rb">Rumble</button></div></div>
      </div>
    </>
  );
}
```

Give me the complete final code, ready to paste, and tell me in one line where to put it in my project.
````
