# Parking meter toast

> The needle of a chrome parking meter drops into the red zone; adding half an hour swings it back toward green with a bounce.

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

## Where to use it

Parking apps warn about expiring time with plain text, yet everyone knows what a meter needle in the red means. This toast draws a chrome meter head with a domed window, a green, amber and red arc made with a conic gradient, and a needle that rotates with a springy curve. Each tap on the add button moves it back and updates the minutes.

The main color is the P badge and button, the second the red zone and low time warning. Map minutes to angles in the small set function, cap the maximum stay, and the button disables itself when the meter is full.

## Code

### HTML

```html
<div class="uvq09-prk"><button type="button" class="fire">Show again</button><div class="tt" role="status"><span class="mt" aria-hidden="true"><span class="dl"><i class="nd"></i></span><b>P</b></span><span class="tx"><b>Your parking is about to run out</b><small><span class="n">10</span> min left · Blue zone</small></span><button type="button" class="ad">+30 min</button></div></div>
```

### CSS

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

.uvq09-prk {
  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-prk .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-prk .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

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

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

.uvq09-prk .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: .8em;
  padding: .75em .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-prk .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-prk .mt {
  display: grid;
  justify-items: center;
  flex: none;
  width: 3.9em;
  height: 4.4em;
  padding-top: .45em;
  border-radius: 1.95em 1.95em .6em .6em;
  background: linear-gradient(90deg,#63636b,#e4e4e7 35%,#a1a1aa 70%,#4b4b52);
  box-shadow: inset 0 -.3em .4em rgba(0,0,0,.25),0 .35em .6em -.2em rgba(0,0,0,.4);
}

.uvq09-prk .dl {
  position: relative;
  width: 3em;
  height: 1.6em;
  border-radius: 1.5em 1.5em .2em .2em;
  overflow: hidden;
  background: conic-gradient(from -90deg at 50% 100%,#22c55e 0 110deg,#f59e0b 110deg 150deg,var(--c2) 150deg 180deg,transparent 180deg);
  box-shadow: inset 0 0 0 .12em #27272a;
}

.uvq09-prk .dl::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 32%;
  bottom: -40%;
  border-radius: 50%;
  background: #fafafa;
}

.uvq09-prk .dl::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,rgba(255,255,255,.55),transparent 45%);
}

.uvq09-prk .nd {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: .13em;
  height: 1.35em;
  margin-left: -.065em;
  border-radius: 1em;
  background: #18181b;
  transform-origin: 50% 100%;
  rotate: var(--a,-90deg);
  transition: rotate calc(0.9s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq09-prk .mt>b {
  display: grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  margin-top: .45em;
  border-radius: .25em;
  font-size: .95em;
  color: #fff;
  background: var(--c1);
}

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

.uvq09-prk .tx b {
  font-size: .9em;
  line-height: 1.25;
}

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

.uvq09-prk .n {
  font-weight: 800;
  color: var(--fg);
  transition: color calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-prk .tt.low .n {
  color: var(--c2);
}

.uvq09-prk .ad {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .8em;
  border-radius: 2em;
  font-size: .76em;
  font-weight: 750;
  white-space: nowrap;
  color: #fff;
  background: var(--c1);
  transition: filter calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-prk .ad:hover {
  filter: brightness(1.12);
}

.uvq09-prk .ad:active {
  scale: .94;
}

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

.uvq09-prk .ad:disabled {
  opacity: .45;
  cursor: default;
  filter: none;
  scale: 1;
}

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

### JavaScript

```js
document.querySelectorAll(".uvq09-prk").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");m=10;set(-90);later(()=>set(m),300)},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const nd=t.querySelector(".nd"),nn=t.querySelector(".n"),ad=t.querySelector(".ad");let m=10;
const set=v=>{const deg=v===-90?-90:90-v/120*180;nd.style.setProperty("--a",deg+"deg");if(v!==-90){nn.textContent=v;t.classList.toggle("low",v<=15);ad.disabled=v>=120}};
ad.addEventListener("click",()=>{m=Math.min(120,m+30);set(m)});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-prk {
  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-prk .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-prk .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

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

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

.uvq09-prk .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: .8em;
  padding: .75em .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-prk .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-prk .mt {
  display: grid;
  justify-items: center;
  flex: none;
  width: 3.9em;
  height: 4.4em;
  padding-top: .45em;
  border-radius: 1.95em 1.95em .6em .6em;
  background: linear-gradient(90deg,#63636b,#e4e4e7 35%,#a1a1aa 70%,#4b4b52);
  box-shadow: inset 0 -.3em .4em rgba(0,0,0,.25),0 .35em .6em -.2em rgba(0,0,0,.4);
}

.uvq09-prk .dl {
  position: relative;
  width: 3em;
  height: 1.6em;
  border-radius: 1.5em 1.5em .2em .2em;
  overflow: hidden;
  background: conic-gradient(from -90deg at 50% 100%,#22c55e 0 110deg,#f59e0b 110deg 150deg,var(--c2) 150deg 180deg,transparent 180deg);
  box-shadow: inset 0 0 0 .12em #27272a;
}

.uvq09-prk .dl::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 32%;
  bottom: -40%;
  border-radius: 50%;
  background: #fafafa;
}

.uvq09-prk .dl::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,rgba(255,255,255,.55),transparent 45%);
}

.uvq09-prk .nd {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: .13em;
  height: 1.35em;
  margin-left: -.065em;
  border-radius: 1em;
  background: #18181b;
  transform-origin: 50% 100%;
  rotate: var(--a,-90deg);
  transition: rotate calc(0.9s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq09-prk .mt>b {
  display: grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  margin-top: .45em;
  border-radius: .25em;
  font-size: .95em;
  color: #fff;
  background: var(--c1);
}

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

.uvq09-prk .tx b {
  font-size: .9em;
  line-height: 1.25;
}

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

.uvq09-prk .n {
  font-weight: 800;
  color: var(--fg);
  transition: color calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-prk .tt.low .n {
  color: var(--c2);
}

.uvq09-prk .ad {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .8em;
  border-radius: 2em;
  font-size: .76em;
  font-weight: 750;
  white-space: nowrap;
  color: #fff;
  background: var(--c1);
  transition: filter calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-prk .ad:hover {
  filter: brightness(1.12);
}

.uvq09-prk .ad:active {
  scale: .94;
}

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

.uvq09-prk .ad:disabled {
  opacity: .45;
  cursor: default;
  filter: none;
  scale: 1;
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-prk,.uvq09-prk *,.uvq09-prk *::before,.uvq09-prk *::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");m=10;set(-90);later(()=>set(m),300)},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const nd=t.querySelector(".nd"),nn=t.querySelector(".n"),ad=t.querySelector(".ad");let m=10;
const set=v=>{const deg=v===-90?-90:90-v/120*180;nd.style.setProperty("--a",deg+"deg");if(v!==-90){nn.textContent=v;t.classList.toggle("low",v<=15);ad.disabled=v>=120}};
ad.addEventListener("click",()=>{m=Math.min(120,m+30);set(m)});return clr
}

export default function ToastParkingMeter() {
  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": "#1d4ed8",
          "--c2": "#dc2626",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-prk"><button type="button" className="fire">Show again</button><div className="tt" role="status"><span className="mt" aria-hidden="true"><span className="dl"><i className="nd"></i></span><b>P</b></span><span className="tx"><b>Your parking is about to run out</b><small><span className="n">10</span> min left · Blue zone</small></span><button type="button" className="ad">+30 min</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 “Parking meter toast” block (Toasts) from AIMRAN Library to my project.

## What it is
The needle of a chrome parking meter drops into the red zone; adding half an hour swings it back toward green with a bounce.

## Chosen settings
- Main color: #1d4ed8
- Secondary color: #dc2626
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Tu aparcamiento está a punto de acabar"

## 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-prk {
  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-prk .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-prk .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

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

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

.uvq09-prk .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: .8em;
  padding: .75em .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-prk .tt.in {
  transform: none;
  opacity: 1;
}

.uvq09-prk .mt {
  display: grid;
  justify-items: center;
  flex: none;
  width: 3.9em;
  height: 4.4em;
  padding-top: .45em;
  border-radius: 1.95em 1.95em .6em .6em;
  background: linear-gradient(90deg,#63636b,#e4e4e7 35%,#a1a1aa 70%,#4b4b52);
  box-shadow: inset 0 -.3em .4em rgba(0,0,0,.25),0 .35em .6em -.2em rgba(0,0,0,.4);
}

.uvq09-prk .dl {
  position: relative;
  width: 3em;
  height: 1.6em;
  border-radius: 1.5em 1.5em .2em .2em;
  overflow: hidden;
  background: conic-gradient(from -90deg at 50% 100%,#22c55e 0 110deg,#f59e0b 110deg 150deg,var(--c2) 150deg 180deg,transparent 180deg);
  box-shadow: inset 0 0 0 .12em #27272a;
}

.uvq09-prk .dl::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 32%;
  bottom: -40%;
  border-radius: 50%;
  background: #fafafa;
}

.uvq09-prk .dl::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,rgba(255,255,255,.55),transparent 45%);
}

.uvq09-prk .nd {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 0;
  width: .13em;
  height: 1.35em;
  margin-left: -.065em;
  border-radius: 1em;
  background: #18181b;
  transform-origin: 50% 100%;
  rotate: var(--a,-90deg);
  transition: rotate calc(0.9s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq09-prk .mt>b {
  display: grid;
  place-items: center;
  width: 1.3em;
  height: 1.3em;
  margin-top: .45em;
  border-radius: .25em;
  font-size: .95em;
  color: #fff;
  background: var(--c1);
}

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

.uvq09-prk .tx b {
  font-size: .9em;
  line-height: 1.25;
}

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

.uvq09-prk .n {
  font-weight: 800;
  color: var(--fg);
  transition: color calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-prk .tt.low .n {
  color: var(--c2);
}

.uvq09-prk .ad {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex: none;
  padding: .5em .8em;
  border-radius: 2em;
  font-size: .76em;
  font-weight: 750;
  white-space: nowrap;
  color: #fff;
  background: var(--c1);
  transition: filter calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1),opacity calc(0.2s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-prk .ad:hover {
  filter: brightness(1.12);
}

.uvq09-prk .ad:active {
  scale: .94;
}

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

.uvq09-prk .ad:disabled {
  opacity: .45;
  cursor: default;
  filter: none;
  scale: 1;
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-prk,.uvq09-prk *,.uvq09-prk *::before,.uvq09-prk *::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");m=10;set(-90);later(()=>set(m),300)},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const nd=t.querySelector(".nd"),nn=t.querySelector(".n"),ad=t.querySelector(".ad");let m=10;
const set=v=>{const deg=v===-90?-90:90-v/120*180;nd.style.setProperty("--a",deg+"deg");if(v!==-90){nn.textContent=v;t.classList.toggle("low",v<=15);ad.disabled=v>=120}};
ad.addEventListener("click",()=>{m=Math.min(120,m+30);set(m)});return clr
}

export default function ToastParkingMeter() {
  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": "#1d4ed8",
          "--c2": "#dc2626",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-prk"><button type="button" className="fire">Show again</button><div className="tt" role="status"><span className="mt" aria-hidden="true"><span className="dl"><i className="nd"></i></span><b>P</b></span><span className="tx"><b>Your parking is about to run out</b><small><span className="n">10</span> min left · Blue zone</small></span><button type="button" className="ad">+30 min</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.
````
