# Arrival geofence toast

> A tiny map drops the pin with a bounce and a radar pulse when it detects that you have reached your destination.

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

## Where to use it

Location aware apps often confirm arrival with a plain line of text. This one draws a tiny map with streets, a park and a river from layered CSS gradients, drops a pin that squashes as it lands and sends out radar rings. The map follows the light or dark theme. Useful for time tracking, check-in, delivery drivers and smart home routines.

The main color is the pin and radar, the second the park and the confirmed button. Change the address and time line, and wire Check in to your own clock-in call; the label swaps with a short slide once it succeeds.

## Code

### HTML

```html
<div class="uvq09-geo"><button type="button" class="fire">Show again</button><div class="tt" role="status"><span class="mp" aria-hidden="true"><i class="pk"></i><i class="rv"></i><i class="rd"></i><i class="rd"></i><i class="pn"><svg viewBox="0 0 24 30"><path class="pb" d="M12 29s-9-9.3-9-16a9 9 0 0 1 18 0c0 6.7-9 16-9 16z"/><circle class="pc" cx="12" cy="13" r="3.6"/></svg></i></span><span class="tx"><b>You have arrived at the office</b><small>Calle de Alcalá 120 · 8:57</small><button type="button" class="ci"><span class="a">Check in</span><span class="b" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>Checked in</span></button></span></div></div>
```

### CSS

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

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

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

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

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

.uvq09-geo .mp {
  position: relative;
  flex: none;
  width: 5.3em;
  height: 5.3em;
  border-radius: .8em;
  overflow: hidden;
  background: linear-gradient(28deg,transparent 45%,var(--bg) 45% 55%,transparent 55%),repeating-linear-gradient(0deg,transparent 0 1.1em,var(--bg) 1.1em 1.32em),repeating-linear-gradient(90deg,transparent 0 1.3em,var(--bg) 1.3em 1.5em),color-mix(in srgb,var(--fg) 10%,var(--bg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-geo .pk {
  position: absolute;
  left: .3em;
  top: .3em;
  width: 2.1em;
  height: 1.6em;
  border-radius: 40% 60% 50% 45%;
  background: color-mix(in srgb,var(--c2) 45%,var(--bg));
}

.uvq09-geo .rv {
  position: absolute;
  left: -1em;
  right: -1em;
  bottom: .8em;
  height: .55em;
  border-radius: 1em;
  background: color-mix(in srgb,#38bdf8 55%,var(--bg));
  rotate: -14deg;
}

.uvq09-geo .rd {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1.2em;
  height: 1.2em;
  margin: -.6em;
  border-radius: 50%;
  border: 2px solid var(--c1);
  background: color-mix(in srgb,var(--c1) 20%,transparent);
  opacity: 0;
}

.uvq09-geo .tt.in .rd {
  animation: uvq09-geo-r calc(1.6s / var(--k)) ease-out calc(0.95s / var(--k)) 3;
}

.uvq09-geo .tt.in .rd+.rd {
  animation-delay: calc(1.5s / var(--k));
}

.uvq09-geo .pn {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1.6em;
  height: 2em;
  translate: -50% -100%;
  transform-origin: 50% 100%;
}

.uvq09-geo .pn svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 .15em .12em rgba(0,0,0,.35));
}

.uvq09-geo .pb {
  fill: var(--c1);
}

.uvq09-geo .pc {
  fill: #fff;
}

.uvq09-geo .tt.in .pn {
  animation: uvq09-geo-p calc(0.75s / var(--k)) cubic-bezier(.25,.1,.25,1) calc(0.35s / var(--k)) both;
}

.uvq09-geo .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  justify-items: start;
  min-width: 0;
}

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

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

.uvq09-geo .ci {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  margin-top: .4em;
  padding: .45em .8em;
  border-radius: 2em;
  font-size: .74em;
  font-weight: 750;
  color: var(--bg);
  background: var(--fg);
  overflow: hidden;
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-geo .ci:hover {
  background: color-mix(in srgb,var(--fg) 85%,transparent);
}

.uvq09-geo .ci:active {
  scale: .95;
}

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

.uvq09-geo .ci span {
  grid-area: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  white-space: nowrap;
  transition: opacity calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq09-geo .ci svg {
  width: 1.05em;
  height: 1.05em;
}

.uvq09-geo .ci .b {
  opacity: 0;
  transform: translateY(.8em);
}

.uvq09-geo .ci.ok {
  color: #fff;
  background: var(--c2);
}

.uvq09-geo .ci.ok .a {
  opacity: 0;
  transform: translateY(-.8em);
}

.uvq09-geo .ci.ok .b {
  opacity: 1;
  transform: none;
}

@keyframes uvq09-geo-p {
  0% {
    opacity: 0;
    transform: translateY(-3.5em);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.1,.82);
  }
  75% {
    transform: translateY(-.3em) scale(.95,1.06);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes uvq09-geo-r {
  0% {
    opacity: .9;
    transform: scale(.3);
  }
  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq09-geo").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");c.classList.remove('ok');a.removeAttribute('aria-hidden');d.setAttribute('aria-hidden','true')},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const c=t.querySelector(".ci"),a=c.querySelector(".a"),d=c.querySelector(".b");c.addEventListener("click",()=>{c.classList.add("ok");a.setAttribute("aria-hidden","true");d.removeAttribute("aria-hidden")});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-geo {
  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-geo .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-geo .fire:hover {
  color: var(--fg);
  background: color-mix(in srgb,var(--fg) 10%,transparent);
}

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

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

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

.uvq09-geo .mp {
  position: relative;
  flex: none;
  width: 5.3em;
  height: 5.3em;
  border-radius: .8em;
  overflow: hidden;
  background: linear-gradient(28deg,transparent 45%,var(--bg) 45% 55%,transparent 55%),repeating-linear-gradient(0deg,transparent 0 1.1em,var(--bg) 1.1em 1.32em),repeating-linear-gradient(90deg,transparent 0 1.3em,var(--bg) 1.3em 1.5em),color-mix(in srgb,var(--fg) 10%,var(--bg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-geo .pk {
  position: absolute;
  left: .3em;
  top: .3em;
  width: 2.1em;
  height: 1.6em;
  border-radius: 40% 60% 50% 45%;
  background: color-mix(in srgb,var(--c2) 45%,var(--bg));
}

.uvq09-geo .rv {
  position: absolute;
  left: -1em;
  right: -1em;
  bottom: .8em;
  height: .55em;
  border-radius: 1em;
  background: color-mix(in srgb,#38bdf8 55%,var(--bg));
  rotate: -14deg;
}

.uvq09-geo .rd {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1.2em;
  height: 1.2em;
  margin: -.6em;
  border-radius: 50%;
  border: 2px solid var(--c1);
  background: color-mix(in srgb,var(--c1) 20%,transparent);
  opacity: 0;
}

.uvq09-geo .tt.in .rd {
  animation: uvq09-geo-r calc(1.6s / var(--k)) ease-out calc(0.95s / var(--k)) 3;
}

.uvq09-geo .tt.in .rd+.rd {
  animation-delay: calc(1.5s / var(--k));
}

.uvq09-geo .pn {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1.6em;
  height: 2em;
  translate: -50% -100%;
  transform-origin: 50% 100%;
}

.uvq09-geo .pn svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 .15em .12em rgba(0,0,0,.35));
}

.uvq09-geo .pb {
  fill: var(--c1);
}

.uvq09-geo .pc {
  fill: #fff;
}

.uvq09-geo .tt.in .pn {
  animation: uvq09-geo-p calc(0.75s / var(--k)) cubic-bezier(.25,.1,.25,1) calc(0.35s / var(--k)) both;
}

.uvq09-geo .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  justify-items: start;
  min-width: 0;
}

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

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

.uvq09-geo .ci {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  margin-top: .4em;
  padding: .45em .8em;
  border-radius: 2em;
  font-size: .74em;
  font-weight: 750;
  color: var(--bg);
  background: var(--fg);
  overflow: hidden;
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-geo .ci:hover {
  background: color-mix(in srgb,var(--fg) 85%,transparent);
}

.uvq09-geo .ci:active {
  scale: .95;
}

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

.uvq09-geo .ci span {
  grid-area: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  white-space: nowrap;
  transition: opacity calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq09-geo .ci svg {
  width: 1.05em;
  height: 1.05em;
}

.uvq09-geo .ci .b {
  opacity: 0;
  transform: translateY(.8em);
}

.uvq09-geo .ci.ok {
  color: #fff;
  background: var(--c2);
}

.uvq09-geo .ci.ok .a {
  opacity: 0;
  transform: translateY(-.8em);
}

.uvq09-geo .ci.ok .b {
  opacity: 1;
  transform: none;
}

@keyframes uvq09-geo-p {
  0% {
    opacity: 0;
    transform: translateY(-3.5em);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.1,.82);
  }
  75% {
    transform: translateY(-.3em) scale(.95,1.06);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes uvq09-geo-r {
  0% {
    opacity: .9;
    transform: scale(.3);
  }
  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-geo,.uvq09-geo *,.uvq09-geo *::before,.uvq09-geo *::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");c.classList.remove('ok');a.removeAttribute('aria-hidden');d.setAttribute('aria-hidden','true')},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const c=t.querySelector(".ci"),a=c.querySelector(".a"),d=c.querySelector(".b");c.addEventListener("click",()=>{c.classList.add("ok");a.setAttribute("aria-hidden","true");d.removeAttribute("aria-hidden")});return clr
}

export default function ToastGeofenceArrival() {
  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": "#e11d48",
          "--c2": "#16a34a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-geo"><button type="button" className="fire">Show again</button><div className="tt" role="status"><span className="mp" aria-hidden="true"><i className="pk"></i><i className="rv"></i><i className="rd"></i><i className="rd"></i><i className="pn"><svg viewBox="0 0 24 30"><path className="pb" d="M12 29s-9-9.3-9-16a9 9 0 0 1 18 0c0 6.7-9 16-9 16z" /><circle className="pc" cx="12" cy="13" r="3.6" /></svg></i></span><span className="tx"><b>You have arrived at the office</b><small>Calle de Alcalá 120 · 8:57</small><button type="button" className="ci"><span className="a">Check in</span><span className="b" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>Checked in</span></button></span></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 “Arrival geofence toast” block (Toasts) from AIMRAN Library to my project.

## What it is
A tiny map drops the pin with a bounce and a radar pulse when it detects that you have reached your destination.

## Chosen settings
- Main color: #e11d48
- Secondary color: #16a34a
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Has llegado a la oficina"

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

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

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

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

.uvq09-geo .mp {
  position: relative;
  flex: none;
  width: 5.3em;
  height: 5.3em;
  border-radius: .8em;
  overflow: hidden;
  background: linear-gradient(28deg,transparent 45%,var(--bg) 45% 55%,transparent 55%),repeating-linear-gradient(0deg,transparent 0 1.1em,var(--bg) 1.1em 1.32em),repeating-linear-gradient(90deg,transparent 0 1.3em,var(--bg) 1.3em 1.5em),color-mix(in srgb,var(--fg) 10%,var(--bg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb,var(--fg) 10%,transparent);
}

.uvq09-geo .pk {
  position: absolute;
  left: .3em;
  top: .3em;
  width: 2.1em;
  height: 1.6em;
  border-radius: 40% 60% 50% 45%;
  background: color-mix(in srgb,var(--c2) 45%,var(--bg));
}

.uvq09-geo .rv {
  position: absolute;
  left: -1em;
  right: -1em;
  bottom: .8em;
  height: .55em;
  border-radius: 1em;
  background: color-mix(in srgb,#38bdf8 55%,var(--bg));
  rotate: -14deg;
}

.uvq09-geo .rd {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1.2em;
  height: 1.2em;
  margin: -.6em;
  border-radius: 50%;
  border: 2px solid var(--c1);
  background: color-mix(in srgb,var(--c1) 20%,transparent);
  opacity: 0;
}

.uvq09-geo .tt.in .rd {
  animation: uvq09-geo-r calc(1.6s / var(--k)) ease-out calc(0.95s / var(--k)) 3;
}

.uvq09-geo .tt.in .rd+.rd {
  animation-delay: calc(1.5s / var(--k));
}

.uvq09-geo .pn {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 1.6em;
  height: 2em;
  translate: -50% -100%;
  transform-origin: 50% 100%;
}

.uvq09-geo .pn svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 .15em .12em rgba(0,0,0,.35));
}

.uvq09-geo .pb {
  fill: var(--c1);
}

.uvq09-geo .pc {
  fill: #fff;
}

.uvq09-geo .tt.in .pn {
  animation: uvq09-geo-p calc(0.75s / var(--k)) cubic-bezier(.25,.1,.25,1) calc(0.35s / var(--k)) both;
}

.uvq09-geo .tx {
  display: grid;
  flex: 1;
  gap: .15em;
  justify-items: start;
  min-width: 0;
}

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

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

.uvq09-geo .ci {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  margin-top: .4em;
  padding: .45em .8em;
  border-radius: 2em;
  font-size: .74em;
  font-weight: 750;
  color: var(--bg);
  background: var(--fg);
  overflow: hidden;
  transition: background calc(0.3s / var(--k)) cubic-bezier(.25,.1,.25,1),scale calc(0.15s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq09-geo .ci:hover {
  background: color-mix(in srgb,var(--fg) 85%,transparent);
}

.uvq09-geo .ci:active {
  scale: .95;
}

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

.uvq09-geo .ci span {
  grid-area: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  white-space: nowrap;
  transition: opacity calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1),transform calc(0.35s / var(--k)) cubic-bezier(.34,1.56,.64,1);
}

.uvq09-geo .ci svg {
  width: 1.05em;
  height: 1.05em;
}

.uvq09-geo .ci .b {
  opacity: 0;
  transform: translateY(.8em);
}

.uvq09-geo .ci.ok {
  color: #fff;
  background: var(--c2);
}

.uvq09-geo .ci.ok .a {
  opacity: 0;
  transform: translateY(-.8em);
}

.uvq09-geo .ci.ok .b {
  opacity: 1;
  transform: none;
}

@keyframes uvq09-geo-p {
  0% {
    opacity: 0;
    transform: translateY(-3.5em);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1.1,.82);
  }
  75% {
    transform: translateY(-.3em) scale(.95,1.06);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes uvq09-geo-r {
  0% {
    opacity: .9;
    transform: scale(.3);
  }
  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq09-geo,.uvq09-geo *,.uvq09-geo *::before,.uvq09-geo *::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");c.classList.remove('ok');a.removeAttribute('aria-hidden');d.setAttribute('aria-hidden','true')},60)};
const hide=()=>{t.classList.remove("in");t.classList.add("out")};f.addEventListener("click",show);show();const c=t.querySelector(".ci"),a=c.querySelector(".a"),d=c.querySelector(".b");c.addEventListener("click",()=>{c.classList.add("ok");a.setAttribute("aria-hidden","true");d.removeAttribute("aria-hidden")});return clr
}

export default function ToastGeofenceArrival() {
  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": "#e11d48",
          "--c2": "#16a34a",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq09-geo"><button type="button" className="fire">Show again</button><div className="tt" role="status"><span className="mp" aria-hidden="true"><i className="pk"></i><i className="rv"></i><i className="rd"></i><i className="rd"></i><i className="pn"><svg viewBox="0 0 24 30"><path className="pb" d="M12 29s-9-9.3-9-16a9 9 0 0 1 18 0c0 6.7-9 16-9 16z" /><circle className="pc" cx="12" cy="13" r="3.6" /></svg></i></span><span className="tx"><b>You have arrived at the office</b><small>Calle de Alcalá 120 · 8:57</small><button type="button" className="ci"><span className="a">Check in</span><span className="b" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5" /></svg>Checked in</span></button></span></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.
````
