/* builtlit copy of built.lt src/components/home/client-ads.css (site/ads/client-ads.css), with builtlit additions at the end. */
/* Client ad stories (2026-10-30): a thin row of rings under the home hero and
   an Instagram-style full-screen player. Row: .ca-*, player: .cav-*.
   Picked by Robertas from four mockups (option 4, "stories row"). */

@property --ca-ra { syntax: "<angle>"; inherits: true; initial-value: 200deg; }
@property --cav-l { syntax: "<color>"; inherits: true; initial-value: #121212; }
@property --cav-r { syntax: "<color>"; inherits: true; initial-value: #121212; }

/* ---------- row ---------- */
.ca { background: #fff; padding: 22px 0 4px; }
.ca-in { max-width: 1240px; margin: 0 auto; }
/* .ca .ca-h: the home page sizes every h2 (24 px on phones); this one is a quiet label. */
.ca .ca-h { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 0 16px 12px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--ink); }
.ca-n { color: var(--dim); font-size: 13px; font-weight: 400; }
.ca-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 16px; padding: 4px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ca-row::-webkit-scrollbar { display: none; }
.ca-it { flex: none; width: 70px; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; scroll-snap-align: start; font: inherit; font-size: 11.5px; color: #3b3b38; -webkit-tap-highlight-color: transparent; }
/* --ca-grad, not --ring: globals.css registers --ring as an <angle>, which would void the gradient. */
.ca-ring { --ca-grad: conic-gradient(from var(--ca-ra), #f29bc0, #f8b98a, #b9a4f5, #8cc4ef, #8fdcae, #f29bc0);
  position: relative; width: 70px; height: 70px; border-radius: 50%; padding: 2.5px; box-sizing: border-box; background: var(--ca-grad);
  transition: transform .2s cubic-bezier(.22, .8, .2, 1); }
.ca-ring > span { display: block; width: 100%; height: 100%; border-radius: 50%; padding: 2.5px; box-sizing: border-box; background: #fff; }
.ca-ring img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ca-it:not(.seen) .ca-ring { animation: ca-turn 7s linear infinite; }
@keyframes ca-turn { to { --ca-ra: 560deg; } }
.ca-it:active .ca-ring { transform: scale(.94); }
.ca-it.seen .ca-ring { background: #d6d6db; }
.ca-it.seen { color: var(--dim); }
.ca-it:focus-visible { outline: none; }
.ca-it:focus-visible .ca-ring { outline: 2px solid var(--blue); outline-offset: 3px; }
.ca-nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; text-align: center; line-height: 1.25; }
@media (hover: hover) { .ca-it:hover .ca-ring { transform: scale(1.04); } }
@media (min-width: 768px) {
  .ca { padding: 44px 0 6px; }
  .ca .ca-h { justify-content: center; font-size: 17px; padding-bottom: 18px; }
  .ca-row { justify-content: center; flex-wrap: wrap; gap: 26px; overflow: visible; }
  .ca-it { width: 92px; font-size: 13px; }
  .ca-ring { width: 92px; height: 92px; padding: 3px; }
  .ca-ring > span { padding: 3px; }
}

/* ---------- player ---------- */
/* Above everything, the cookie banner included (public/consent.js uses 2147483000): it would cover the message box. */
.cav { position: fixed; inset: 0; z-index: 2147483001; overflow: hidden; touch-action: none; color: #fff;
  --cav-l: #121212; --cav-r: #121212; --cav-f: #fff; transition: --cav-l .5s linear, --cav-r .5s linear;
  font-family: var(--font-familjen), system-ui, sans-serif; }
.cav:focus { outline: none; }
.cav-bg { position: absolute; inset: 0; background: linear-gradient(90deg, var(--cav-l), var(--cav-r)); }
.cav-col { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); height: 100dvh; box-sizing: border-box; }
.cav-top { position: relative; z-index: 3; flex: none; width: min(100%, 520px); box-sizing: border-box; padding: 10px 12px 8px; color: var(--cav-f); }
.cav-bars { display: flex; gap: 3px; }
.cav-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: color-mix(in srgb, currentColor 32%, transparent); overflow: hidden; }
.cav-bars i b { display: block; height: 100%; width: 0; background: currentColor; }
.cav-hd { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.cav-av { flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: #121212; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6); }
.cav-av img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cav-who { font-weight: 600; white-space: nowrap; }
.cav-sub { min-width: 0; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cav-ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; padding: 0; }
.cav-ic:first-of-type { margin-left: auto; }
.cav-ic svg { width: 21px; height: 21px; }

.cav-stage { position: relative; flex: 1 1 auto; min-height: 0; aspect-ratio: 9 / 16; max-width: 100%; overflow: hidden;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* The video never sits inside the 3D box: Safari paints a <video> black inside
   preserve-3d / backface-visibility (seen on built.lt preview, 2026-10-30). It plays
   flat in the stage; only during a turn the cube appears on top, its front face a
   canvas copying the video frame by frame, its side face the next client's poster. */
.cav-vid, .cav-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent); }
.cav-vid { background: #000; }
/* The ad's first frame as a still over a loading video (Safari shows black there). */
.cav-cover { pointer-events: none; opacity: 0; transition: opacity .12s linear; }
.cav-cover.on { opacity: 1; transition: none; }
.cav-3d { position: absolute; inset: 0; z-index: 1; visibility: hidden; background: #000; }
.cav-3d.on { visibility: visible; }
.cav-cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.cav-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #000; }
.cav-face canvas, .cav-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cav-face::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--sh, 0); pointer-events: none; }
/* Shown only when the browser will not start a video without a tap (iPhone Low Power Mode). */
.cav-play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 68px; height: 68px; margin: -34px 0 0 -34px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(18, 18, 18, .45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; pointer-events: none; opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s; }
.cav-play.on { opacity: 1; transform: none; }
.cav-play svg { width: 30px; height: 30px; margin-left: 3px; }
.cav-tap { position: absolute; top: 0; bottom: 0; z-index: 2; width: 34%; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cav-l { left: 0; }
.cav-r { right: 0; width: 66%; }

/* footer: message box, heart, share */
.cav-bar { position: relative; z-index: 3; flex: none; width: min(100%, 520px); box-sizing: border-box; display: flex; align-items: center; gap: 4px;
  margin: 0; padding: 10px 8px 14px 12px; color: var(--cav-f); }
.cav-msgw { position: relative; flex: 1 1 auto; min-width: 0; margin: 0; }
.cav-msg { display: block; width: 100%; box-sizing: border-box; height: 44px; margin: 0; border-radius: 22px; border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  background: transparent; color: inherit; font: inherit; font-size: 16px; padding: 0 70px 0 16px; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .2s; }
.cav-msg::placeholder { color: inherit; opacity: .8; }
.cav-msg:focus { border-color: currentColor; }
.cav-send { position: absolute; right: 4px; top: 4px; height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: none; font: inherit; font-weight: 600; font-size: 15px;
  color: inherit; opacity: 0; pointer-events: none; transition: opacity .15s; cursor: pointer; }
.cav-msgw.has .cav-send { opacity: 1; pointer-events: auto; }
.cav-msgw.err .cav-msg { border-color: #ff6b6b; animation: cav-shake .32s; }
@keyframes cav-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.cav-act { flex: none; position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; padding: 0; }
.cav-act svg { width: 26px; height: 26px; overflow: visible; }
.cav-like.on { color: #ff3040; }
.cav-like.on svg path { fill: currentColor; }
.cav-like.pop svg { animation: cav-pop .42s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes cav-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 70% { transform: scale(.94); } 100% { transform: scale(1); } }
.cav-float { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; color: #ff3040; pointer-events: none; opacity: 0;
  animation: cav-float .95s cubic-bezier(.2, .7, .3, 1) both; }
.cav-float svg { width: 100%; height: 100%; }
@keyframes cav-float { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--fx, 0px), -120px) scale(1.15); } }
.cav-chat { position: absolute; left: 0; right: 0; bottom: 100%; padding: 0 12px 8px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.cav-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; pointer-events: auto; touch-action: pan-x; padding-bottom: 2px; }
.cav-chips::-webkit-scrollbar { display: none; }
.cav-chip { flex: none; min-height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: rgba(18, 18, 18, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font: inherit; font-size: 14px; cursor: pointer; animation: cav-in .28s cubic-bezier(.2, .8, .2, 1) both; }
.cav-chip:nth-child(2) { animation-delay: 40ms; }
.cav-chip:nth-child(3) { animation-delay: 80ms; }
.cav-bub { max-width: 80%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.35; animation: cav-in .28s cubic-bezier(.2, .8, .2, 1) both; }
.cav-bub.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.cav-bub.them { align-self: flex-start; background: rgba(255, 255, 255, .95); color: var(--ink); border-bottom-left-radius: 6px; }
@keyframes cav-in { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
.cav-toast { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 5; margin: 0; padding: 10px 16px; border-radius: 12px;
  background: rgba(18, 18, 18, .88); color: #fff; font-size: 14px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 10px); transition: opacity .25s, transform .25s; }
.cav-toast.show { opacity: 1; transform: translate(-50%, 0); }
.cav-top { transition: opacity .2s; }
/* transform: the bar riding the phone keyboard (ClientAdsViewer, "the phone keyboard") */
.cav-bar { transition: opacity .2s, transform .3s cubic-bezier(.32, .72, 0, 1); }
.cav.held .cav-top, .cav.held .cav-bar { opacity: 0; }
/* Writing a message: the ad dims, as under an Instagram reply, so the suggestions read. */
.cav-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(0, 0, 0, .4); opacity: 0; transition: opacity .25s; pointer-events: none; }
.cav:has(.cav-msg:focus) .cav-stage::after { opacity: 1; }
.cav-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.cav-on, html.cav-on body { overflow: hidden; }
/* Keyboard up: nothing of the page under the player is painted (Safari shows it under its
   bars and the keyboard's glass). Opacity, not visibility: a child with visibility: visible
   (the reviews' .rvs-slide.on) would show through. The html takes the player's colours in JS. */
html.cav-kb body { background: transparent !important; }
html.cav-kb body > :not(.cav) { opacity: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .ca-it:not(.seen) .ca-ring { animation: none; }
  .cav { transition: none; }
  .cav-like.pop svg, .cav-bub, .cav-chip, .cav-msgw.err .cav-msg { animation: none; }
}

/* ---------- builtlit ---------- */
/* the home hero above is full height: give the row the same white start as built.lt */
.ca { position: relative; z-index: 1; }
