# Aircraft window tabs

> Each section is a cabin window with its shade down; choose it and the shade slides up to show that section's sky.

- Category: [Navigation](https://library.aimran.es/components/navigation)
- Built with: HTML + CSS
- Live editor: https://library.aimran.es/blocks/uv-nav-cabin-windows
- Library: AIMRAN Library (https://library.aimran.es), free, no sign-up, by Aimran Oukham

## Where to use it

Tabs set into the cream wall of an aircraft cabin: each section is an oval window with a plastic shade pulled down. Choosing one raises its shade with a soft spring and reveals a different sky, from clear blue to sunset, night and sea, while clouds drift past. A reading light sits next to the text below. It suits airlines, travel agencies and booking flows.

The main color marks the active label and the secondary color tints the cabin wall. Keep three to five windows with short names, and swap the gradients in the CSS to show your own views.

## Code

### HTML

```html
<div class="uvq12-cw"><div class="wl" role="tablist" aria-label="Sections"><button type="button" role="tab" id="uvq12-cw-t0" aria-selected="true" aria-controls="uvq12-cw-p0" tabindex="0"><span class="wn" aria-hidden="true"><span class="vw v0"></span><span class="sh"></span></span><span class="lb">Flights</span></button><button type="button" role="tab" id="uvq12-cw-t1" aria-selected="false" aria-controls="uvq12-cw-p1" tabindex="-1"><span class="wn" aria-hidden="true"><span class="vw v1"></span><span class="sh"></span></span><span class="lb">Hotels</span></button><button type="button" role="tab" id="uvq12-cw-t2" aria-selected="false" aria-controls="uvq12-cw-p2" tabindex="-1"><span class="wn" aria-hidden="true"><span class="vw v2"></span><span class="sh"></span></span><span class="lb">Cars</span></button><button type="button" role="tab" id="uvq12-cw-t3" aria-selected="false" aria-controls="uvq12-cw-p3" tabindex="-1"><span class="wn" aria-hidden="true"><span class="vw v3"></span><span class="sh"></span></span><span class="lb">Deals</span></button></div><div class="bd"><span class="lt" aria-hidden="true"></span><div class="pn" role="tabpanel" id="uvq12-cw-p0" aria-labelledby="uvq12-cw-t0">Over 120 destinations from Madrid.</div><div class="pn" role="tabpanel" id="uvq12-cw-p1" aria-labelledby="uvq12-cw-t1" hidden>Rooms with breakfast included.</div><div class="pn" role="tabpanel" id="uvq12-cw-p2" aria-labelledby="uvq12-cw-t2" hidden>Pick-up at the same terminal.</div><div class="pn" role="tabpanel" id="uvq12-cw-p3" aria-labelledby="uvq12-cw-t3" hidden>Up to 30% off this month.</div></div></div>
```

### CSS

```css
.uvq12-cw {
  --c1: #2563eb;
  --c2: #ecebe5;
  --s: 16px;
  /* tamaño */
  --k: 1;
  /* velocidad */
  --fg: #1d1d1f;
  /* texto */
  --bg: #f5f5f7;
  /* fondo */
}

.uvq12-cw {
  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;
  width: 21em;
  padding: 1.1em 1em .8em;
  border-radius: 1.6em;
  color: #44403c;
  background: linear-gradient(180deg,color-mix(in srgb,var(--c2) 70%,#fff),var(--c2) 60%,color-mix(in srgb,var(--c2) 88%,#78716c));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8),inset 0 -.3em .6em rgba(0,0,0,.06),0 1.2em 2.4em -1.2em rgba(0,0,0,.45);
}

.uvq12-cw .wl {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .4em;
}

.uvq12-cw [role="tab"] {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6em;
  padding: .3em 0;
  border-radius: 1em;
}

.uvq12-cw .wn {
  position: relative;
  display: block;
  width: 3.5em;
  height: 4.6em;
  border-radius: 1.75em;
  overflow: hidden;
  box-shadow: 0 0 0 .32em color-mix(in srgb,var(--c2) 60%,#fff),0 0 0 .42em color-mix(in srgb,var(--c2) 80%,#57534e),inset 0 .25em .6em rgba(0,0,0,.4);
}

.uvq12-cw .vw {
  position: absolute;
  inset: 0;
  background-size: 200% 100%,100% 100%;
  animation: uvq12-cw-d 14s linear infinite;
}

.uvq12-cw .v0 {
  background-image: radial-gradient(ellipse 30% 9% at 30% 62%,#fff 60%,transparent 62%),linear-gradient(180deg,#3b82f6,#93c5fd 60%,#e0f2fe);
}

.uvq12-cw .v1 {
  background-image: radial-gradient(ellipse 34% 7% at 40% 70%,#fde68a 55%,transparent 60%),linear-gradient(180deg,#7c2d12,#f97316 45%,#fcd34d 75%,#fef3c7);
}

.uvq12-cw .v2 {
  background-image: radial-gradient(circle at 20% 30%,#fff .06em,transparent .1em),radial-gradient(circle at 70% 18%,#fff .05em,transparent .09em),radial-gradient(circle at 55% 52%,#fff .04em,transparent .08em),linear-gradient(180deg,#020617,#1e1b4b 70%,#312e81);
}

.uvq12-cw .v3 {
  background-image: radial-gradient(ellipse 18% 4% at 60% 60%,#fff 40%,transparent 60%),linear-gradient(180deg,#7dd3fc 0 52%,#0284c7 52%,#075985);
}

.uvq12-cw .sh {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,transparent 0 .45em,rgba(0,0,0,.035) .45em calc(.45em + 1px)),linear-gradient(180deg,#f7f6f2,#dedbd3);
  box-shadow: inset 0 -.4em 0 -.1em #cbc7bd,0 .2em .4em rgba(0,0,0,.25);
  transition: transform calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq12-cw .sh::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .45em;
  width: 1.2em;
  height: .28em;
  margin-left: -.6em;
  border-radius: 1em;
  background: #b9b4a9;
}

.uvq12-cw [role="tab"]:not([aria-selected="true"]):hover .sh {
  transform: translateY(-16%);
}

.uvq12-cw [aria-selected="true"] .sh {
  transform: translateY(-86%);
}

.uvq12-cw [role="tab"]:active .wn {
  transform: scale(.97);
}

.uvq12-cw .lb {
  font-size: .72em;
  font-weight: 700;
  letter-spacing: .04em;
  color: #57534e;
  transition: color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-cw [aria-selected="true"] .lb {
  color: var(--c1);
}

.uvq12-cw [role="tab"]:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq12-cw .bd {
  display: flex;
  align-items: center;
  gap: .6em;
  margin-top: .8em;
  padding: .6em .8em;
  border-radius: .8em;
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 .1em .2em rgba(0,0,0,.08);
}

.uvq12-cw .lt {
  flex: none;
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #fef9c3;
  box-shadow: 0 0 .6em #fde047,0 0 0 .15em #d6d3d1;
}

.uvq12-cw .pn {
  font-size: .8em;
  line-height: 1.4;
  animation: uvq12-cw calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-cw .pn[hidden] {
  display: none;
}

@keyframes uvq12-cw {
  from {
    opacity: 0;
    transform: translateY(.3em);
  }
}

@keyframes uvq12-cw-d {
  to {
    background-position: -200% 0,0 0;
  }
}

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

### JavaScript

```js
document.querySelectorAll(".uvq12-cw").forEach(el => {
  const ps=[...el.querySelectorAll('[role="tabpanel"]')];const tb=[...el.querySelectorAll('[role="tab"]')];const sel=(t,f)=>{const i=tb.indexOf(t);tb.forEach((x,j)=>{x.setAttribute("aria-selected",String(j===i));x.tabIndex=j===i?0:-1});ps.forEach((p,j)=>{p.hidden=j!==i});if(f)t.focus()};tb.forEach(t=>t.addEventListener("click",()=>sel(t)));el.addEventListener("keydown",e=>{const i=tb.indexOf(document.activeElement);if(i<0)return;const n={ArrowRight:i+1,ArrowDown:i+1,ArrowLeft:i-1,ArrowUp:i-1,Home:0,End:tb.length-1}[e.key];if(n===undefined)return;e.preventDefault();sel(tb[(n+tb.length)%tb.length],1)});
});
```

### 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 = `
.uvq12-cw {
  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;
  width: 21em;
  padding: 1.1em 1em .8em;
  border-radius: 1.6em;
  color: #44403c;
  background: linear-gradient(180deg,color-mix(in srgb,var(--c2) 70%,#fff),var(--c2) 60%,color-mix(in srgb,var(--c2) 88%,#78716c));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8),inset 0 -.3em .6em rgba(0,0,0,.06),0 1.2em 2.4em -1.2em rgba(0,0,0,.45);
}

.uvq12-cw .wl {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .4em;
}

.uvq12-cw [role="tab"] {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6em;
  padding: .3em 0;
  border-radius: 1em;
}

.uvq12-cw .wn {
  position: relative;
  display: block;
  width: 3.5em;
  height: 4.6em;
  border-radius: 1.75em;
  overflow: hidden;
  box-shadow: 0 0 0 .32em color-mix(in srgb,var(--c2) 60%,#fff),0 0 0 .42em color-mix(in srgb,var(--c2) 80%,#57534e),inset 0 .25em .6em rgba(0,0,0,.4);
}

.uvq12-cw .vw {
  position: absolute;
  inset: 0;
  background-size: 200% 100%,100% 100%;
  animation: uvq12-cw-d 14s linear infinite;
}

.uvq12-cw .v0 {
  background-image: radial-gradient(ellipse 30% 9% at 30% 62%,#fff 60%,transparent 62%),linear-gradient(180deg,#3b82f6,#93c5fd 60%,#e0f2fe);
}

.uvq12-cw .v1 {
  background-image: radial-gradient(ellipse 34% 7% at 40% 70%,#fde68a 55%,transparent 60%),linear-gradient(180deg,#7c2d12,#f97316 45%,#fcd34d 75%,#fef3c7);
}

.uvq12-cw .v2 {
  background-image: radial-gradient(circle at 20% 30%,#fff .06em,transparent .1em),radial-gradient(circle at 70% 18%,#fff .05em,transparent .09em),radial-gradient(circle at 55% 52%,#fff .04em,transparent .08em),linear-gradient(180deg,#020617,#1e1b4b 70%,#312e81);
}

.uvq12-cw .v3 {
  background-image: radial-gradient(ellipse 18% 4% at 60% 60%,#fff 40%,transparent 60%),linear-gradient(180deg,#7dd3fc 0 52%,#0284c7 52%,#075985);
}

.uvq12-cw .sh {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,transparent 0 .45em,rgba(0,0,0,.035) .45em calc(.45em + 1px)),linear-gradient(180deg,#f7f6f2,#dedbd3);
  box-shadow: inset 0 -.4em 0 -.1em #cbc7bd,0 .2em .4em rgba(0,0,0,.25);
  transition: transform calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq12-cw .sh::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .45em;
  width: 1.2em;
  height: .28em;
  margin-left: -.6em;
  border-radius: 1em;
  background: #b9b4a9;
}

.uvq12-cw [role="tab"]:not([aria-selected="true"]):hover .sh {
  transform: translateY(-16%);
}

.uvq12-cw [aria-selected="true"] .sh {
  transform: translateY(-86%);
}

.uvq12-cw [role="tab"]:active .wn {
  transform: scale(.97);
}

.uvq12-cw .lb {
  font-size: .72em;
  font-weight: 700;
  letter-spacing: .04em;
  color: #57534e;
  transition: color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-cw [aria-selected="true"] .lb {
  color: var(--c1);
}

.uvq12-cw [role="tab"]:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq12-cw .bd {
  display: flex;
  align-items: center;
  gap: .6em;
  margin-top: .8em;
  padding: .6em .8em;
  border-radius: .8em;
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 .1em .2em rgba(0,0,0,.08);
}

.uvq12-cw .lt {
  flex: none;
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #fef9c3;
  box-shadow: 0 0 .6em #fde047,0 0 0 .15em #d6d3d1;
}

.uvq12-cw .pn {
  font-size: .8em;
  line-height: 1.4;
  animation: uvq12-cw calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-cw .pn[hidden] {
  display: none;
}

@keyframes uvq12-cw {
  from {
    opacity: 0;
    transform: translateY(.3em);
  }
}

@keyframes uvq12-cw-d {
  to {
    background-position: -200% 0,0 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-cw,.uvq12-cw *,.uvq12-cw *::before,.uvq12-cw *::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 ps=[...el.querySelectorAll('[role="tabpanel"]')];const tb=[...el.querySelectorAll('[role="tab"]')];const sel=(t,f)=>{const i=tb.indexOf(t);tb.forEach((x,j)=>{x.setAttribute("aria-selected",String(j===i));x.tabIndex=j===i?0:-1});ps.forEach((p,j)=>{p.hidden=j!==i});if(f)t.focus()};tb.forEach(t=>t.addEventListener("click",()=>sel(t)));el.addEventListener("keydown",e=>{const i=tb.indexOf(document.activeElement);if(i<0)return;const n={ArrowRight:i+1,ArrowDown:i+1,ArrowLeft:i-1,ArrowUp:i-1,Home:0,End:tb.length-1}[e.key];if(n===undefined)return;e.preventDefault();sel(tb[(n+tb.length)%tb.length],1)});
}

export default function NavCabinWindows() {
  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": "#2563eb",
          "--c2": "#ecebe5",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq12-cw"><div className="wl" role="tablist" aria-label="Sections"><button type="button" role="tab" id="uvq12-cw-t0" aria-selected="true" aria-controls="uvq12-cw-p0" tabIndex={0}><span className="wn" aria-hidden="true"><span className="vw v0"></span><span className="sh"></span></span><span className="lb">Flights</span></button><button type="button" role="tab" id="uvq12-cw-t1" aria-selected="false" aria-controls="uvq12-cw-p1" tabIndex={-1}><span className="wn" aria-hidden="true"><span className="vw v1"></span><span className="sh"></span></span><span className="lb">Hotels</span></button><button type="button" role="tab" id="uvq12-cw-t2" aria-selected="false" aria-controls="uvq12-cw-p2" tabIndex={-1}><span className="wn" aria-hidden="true"><span className="vw v2"></span><span className="sh"></span></span><span className="lb">Cars</span></button><button type="button" role="tab" id="uvq12-cw-t3" aria-selected="false" aria-controls="uvq12-cw-p3" tabIndex={-1}><span className="wn" aria-hidden="true"><span className="vw v3"></span><span className="sh"></span></span><span className="lb">Deals</span></button></div><div className="bd"><span className="lt" aria-hidden="true"></span><div className="pn" role="tabpanel" id="uvq12-cw-p0" aria-labelledby="uvq12-cw-t0">Over 120 destinations from Madrid.</div><div className="pn" role="tabpanel" id="uvq12-cw-p1" aria-labelledby="uvq12-cw-t1" hidden={true}>Rooms with breakfast included.</div><div className="pn" role="tabpanel" id="uvq12-cw-p2" aria-labelledby="uvq12-cw-t2" hidden={true}>Pick-up at the same terminal.</div><div className="pn" role="tabpanel" id="uvq12-cw-p3" aria-labelledby="uvq12-cw-t3" hidden={true}>Up to 30% off this month.</div></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 “Aircraft window tabs” block (Navigation) from AIMRAN Library to my project.

## What it is
Each section is a cabin window with its shade down; choose it and the shade slides up to show that section's sky.

## Chosen settings
- Main color: #2563eb
- Secondary color: #ecebe5
- Size: 16px (from 12 to 24px)
- Speed: 1x (from 0.5 to 2x)
- Text: "Secciones"

## 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 = `
.uvq12-cw {
  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;
  width: 21em;
  padding: 1.1em 1em .8em;
  border-radius: 1.6em;
  color: #44403c;
  background: linear-gradient(180deg,color-mix(in srgb,var(--c2) 70%,#fff),var(--c2) 60%,color-mix(in srgb,var(--c2) 88%,#78716c));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8),inset 0 -.3em .6em rgba(0,0,0,.06),0 1.2em 2.4em -1.2em rgba(0,0,0,.45);
}

.uvq12-cw .wl {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .4em;
}

.uvq12-cw [role="tab"] {
  font: inherit;
  color: inherit;
  border: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6em;
  padding: .3em 0;
  border-radius: 1em;
}

.uvq12-cw .wn {
  position: relative;
  display: block;
  width: 3.5em;
  height: 4.6em;
  border-radius: 1.75em;
  overflow: hidden;
  box-shadow: 0 0 0 .32em color-mix(in srgb,var(--c2) 60%,#fff),0 0 0 .42em color-mix(in srgb,var(--c2) 80%,#57534e),inset 0 .25em .6em rgba(0,0,0,.4);
}

.uvq12-cw .vw {
  position: absolute;
  inset: 0;
  background-size: 200% 100%,100% 100%;
  animation: uvq12-cw-d 14s linear infinite;
}

.uvq12-cw .v0 {
  background-image: radial-gradient(ellipse 30% 9% at 30% 62%,#fff 60%,transparent 62%),linear-gradient(180deg,#3b82f6,#93c5fd 60%,#e0f2fe);
}

.uvq12-cw .v1 {
  background-image: radial-gradient(ellipse 34% 7% at 40% 70%,#fde68a 55%,transparent 60%),linear-gradient(180deg,#7c2d12,#f97316 45%,#fcd34d 75%,#fef3c7);
}

.uvq12-cw .v2 {
  background-image: radial-gradient(circle at 20% 30%,#fff .06em,transparent .1em),radial-gradient(circle at 70% 18%,#fff .05em,transparent .09em),radial-gradient(circle at 55% 52%,#fff .04em,transparent .08em),linear-gradient(180deg,#020617,#1e1b4b 70%,#312e81);
}

.uvq12-cw .v3 {
  background-image: radial-gradient(ellipse 18% 4% at 60% 60%,#fff 40%,transparent 60%),linear-gradient(180deg,#7dd3fc 0 52%,#0284c7 52%,#075985);
}

.uvq12-cw .sh {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,transparent 0 .45em,rgba(0,0,0,.035) .45em calc(.45em + 1px)),linear-gradient(180deg,#f7f6f2,#dedbd3);
  box-shadow: inset 0 -.4em 0 -.1em #cbc7bd,0 .2em .4em rgba(0,0,0,.25);
  transition: transform calc(0.7s / var(--k)) cubic-bezier(.22,1,.36,1);
}

.uvq12-cw .sh::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .45em;
  width: 1.2em;
  height: .28em;
  margin-left: -.6em;
  border-radius: 1em;
  background: #b9b4a9;
}

.uvq12-cw [role="tab"]:not([aria-selected="true"]):hover .sh {
  transform: translateY(-16%);
}

.uvq12-cw [aria-selected="true"] .sh {
  transform: translateY(-86%);
}

.uvq12-cw [role="tab"]:active .wn {
  transform: scale(.97);
}

.uvq12-cw .lb {
  font-size: .72em;
  font-weight: 700;
  letter-spacing: .04em;
  color: #57534e;
  transition: color calc(0.25s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-cw [aria-selected="true"] .lb {
  color: var(--c1);
}

.uvq12-cw [role="tab"]:focus-visible {
  outline: 2px solid var(--c1);
  outline-offset: 2px;
}

.uvq12-cw .bd {
  display: flex;
  align-items: center;
  gap: .6em;
  margin-top: .8em;
  padding: .6em .8em;
  border-radius: .8em;
  background: rgba(0,0,0,.05);
  box-shadow: inset 0 .1em .2em rgba(0,0,0,.08);
}

.uvq12-cw .lt {
  flex: none;
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #fef9c3;
  box-shadow: 0 0 .6em #fde047,0 0 0 .15em #d6d3d1;
}

.uvq12-cw .pn {
  font-size: .8em;
  line-height: 1.4;
  animation: uvq12-cw calc(0.4s / var(--k)) cubic-bezier(.25,.1,.25,1);
}

.uvq12-cw .pn[hidden] {
  display: none;
}

@keyframes uvq12-cw {
  from {
    opacity: 0;
    transform: translateY(.3em);
  }
}

@keyframes uvq12-cw-d {
  to {
    background-position: -200% 0,0 0;
  }
}

@media (prefers-reduced-motion:reduce) {
  .uvq12-cw,.uvq12-cw *,.uvq12-cw *::before,.uvq12-cw *::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 ps=[...el.querySelectorAll('[role="tabpanel"]')];const tb=[...el.querySelectorAll('[role="tab"]')];const sel=(t,f)=>{const i=tb.indexOf(t);tb.forEach((x,j)=>{x.setAttribute("aria-selected",String(j===i));x.tabIndex=j===i?0:-1});ps.forEach((p,j)=>{p.hidden=j!==i});if(f)t.focus()};tb.forEach(t=>t.addEventListener("click",()=>sel(t)));el.addEventListener("keydown",e=>{const i=tb.indexOf(document.activeElement);if(i<0)return;const n={ArrowRight:i+1,ArrowDown:i+1,ArrowLeft:i-1,ArrowUp:i-1,Home:0,End:tb.length-1}[e.key];if(n===undefined)return;e.preventDefault();sel(tb[(n+tb.length)%tb.length],1)});
}

export default function NavCabinWindows() {
  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": "#2563eb",
          "--c2": "#ecebe5",
          "--s": "16px",
          "--k": "1",
          "--fg": "#1d1d1f",
          "--bg": "#f5f5f7",
        } as CSSProperties}
      >
        <div className="uvq12-cw"><div className="wl" role="tablist" aria-label="Sections"><button type="button" role="tab" id="uvq12-cw-t0" aria-selected="true" aria-controls="uvq12-cw-p0" tabIndex={0}><span className="wn" aria-hidden="true"><span className="vw v0"></span><span className="sh"></span></span><span className="lb">Flights</span></button><button type="button" role="tab" id="uvq12-cw-t1" aria-selected="false" aria-controls="uvq12-cw-p1" tabIndex={-1}><span className="wn" aria-hidden="true"><span className="vw v1"></span><span className="sh"></span></span><span className="lb">Hotels</span></button><button type="button" role="tab" id="uvq12-cw-t2" aria-selected="false" aria-controls="uvq12-cw-p2" tabIndex={-1}><span className="wn" aria-hidden="true"><span className="vw v2"></span><span className="sh"></span></span><span className="lb">Cars</span></button><button type="button" role="tab" id="uvq12-cw-t3" aria-selected="false" aria-controls="uvq12-cw-p3" tabIndex={-1}><span className="wn" aria-hidden="true"><span className="vw v3"></span><span className="sh"></span></span><span className="lb">Deals</span></button></div><div className="bd"><span className="lt" aria-hidden="true"></span><div className="pn" role="tabpanel" id="uvq12-cw-p0" aria-labelledby="uvq12-cw-t0">Over 120 destinations from Madrid.</div><div className="pn" role="tabpanel" id="uvq12-cw-p1" aria-labelledby="uvq12-cw-t1" hidden={true}>Rooms with breakfast included.</div><div className="pn" role="tabpanel" id="uvq12-cw-p2" aria-labelledby="uvq12-cw-t2" hidden={true}>Pick-up at the same terminal.</div><div className="pn" role="tabpanel" id="uvq12-cw-p3" aria-labelledby="uvq12-cw-t3" hidden={true}>Up to 30% off this month.</div></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.
````
