/* Looks, frames and info filters: the grouped filter strip (camera + preview) and the graded
   canvas laid over the camera / a memory. Loaded by js/looks.js if the page doesn't link it. */

/* the graded picture sits exactly over the <video>/<img> it grades */
.grade-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.grade-canvas.mirror { transform: scaleX(-1); }
.grade-canvas[hidden] { display: none; }

/* frames, info filters and place filters shown live over the camera (the photo's own framing) */
.cam-overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 1; }
.cam-overlay[hidden] { display: none; }

/* the strip, Snapchat's carousel: (intensity slider) · one scrolling row of round thumbnails ·
   small text tabs under it. On the camera it sits in the shutter row (camera.css); in the preview,
   above Save / Send. */
.filter-strip.fs {
  display: flex; flex-direction: column; overflow: visible; padding: 0; gap: 0;
  bottom: calc(var(--safe-b, 0px) + 86px);
}
.fs-amount {
  order: 0; display: flex; align-items: center; gap: 10px; margin: 0 auto 10px; width: min(320px, calc(100% - 48px));
  padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.42); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font: 700 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.fs-amount[hidden] { display: none; }
.fs-amount input { flex: 1; min-width: 0; accent-color: #fff; height: 28px; }
.fs-amount output { width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

.fs-tabs {
  order: 2; display: flex; justify-content: safe center; gap: 0; margin: 2px 0 0; padding: 0 10px; overflow-x: auto; scrollbar-width: none;
}
.fs-tabs::-webkit-scrollbar { display: none; }
.fs-tab {
  position: relative; flex: none; border: 0; background: transparent; color: rgba(255,255,255,.66); padding: 6px 9px 8px; border-radius: 8px;
  font: 800 12.5px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .01em; text-shadow: 0 1px 5px rgba(0,0,0,.6);
  display: inline-flex; align-items: center; gap: 4px; min-height: 30px;
}
.fs-tab svg { width: 14px; height: 14px; color: var(--accent, #ffcf24); filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.fs-tab[aria-selected="true"] { background: transparent; color: #fff; }
.fs-tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: var(--accent, #ffcf24);
}
.fs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.fs-row {
  order: 1; display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding: 4px 16px 2px; scrollbar-width: none;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.fs-row::-webkit-scrollbar { display: none; }
/* between groups: a hairline (the tabs name them) */
.fs-divider {
  flex: none; align-self: flex-start; width: 0; height: 40px; margin: 6px 1px 0; padding: 0; overflow: hidden;
  border-left: 1px solid rgba(255,255,255,.4); font-size: 0; color: transparent; scroll-snap-align: start;
}
.fs-chip { position: relative; scroll-snap-align: start; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }

/* looks: a live round thumbnail, the name under it */
.fs-chip.fs-look {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; background: transparent; border-radius: 12px;
  -webkit-backdrop-filter: none; backdrop-filter: none; width: 58px;
}
.fs-thumb {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.18); display: block;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 2px 8px rgba(0,0,0,.35);
}
.fs-chip.fs-look span {
  font-size: 10.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 5px rgba(0,0,0,.75); max-width: 60px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fs-chip.fs-look[aria-pressed="true"] { background: transparent; color: #fff; }
.fs-chip.fs-look[aria-pressed="true"] .fs-thumb { box-shadow: 0 0 0 3px var(--accent, #ffcf24), 0 2px 10px rgba(0,0,0,.4); }

/* places, info, frames, lenses: the same round button, its name inside */
.filter-strip.fs .fs-chip:not(.fs-look), .filter-strip.fs .filter-chip.make {
  flex: none; width: 52px; height: 52px; padding: 5px; border: 0; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: rgba(0,0,0,.34); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), 0 2px 8px rgba(0,0,0,.3);
  -webkit-backdrop-filter: none; backdrop-filter: none; font: 800 9.5px/11px system-ui, -apple-system, "Segoe UI", sans-serif;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.filter-strip.fs .fs-chip:not(.fs-look) span { display: block; max-height: 33px; overflow: hidden; overflow-wrap: anywhere; }
.filter-strip.fs .fs-chip.geo:not(.fs-look) { background: rgba(255,207,36,.32); }
.filter-strip.fs .fs-chip:not(.fs-look)[aria-pressed="true"] {
  background: #fff; color: #111; text-shadow: none; box-shadow: 0 0 0 3px var(--accent, #ffcf24), 0 2px 10px rgba(0,0,0,.4);
}
/* a lens: its emoji big, the name under it (each word on its own line, the emoji's line bigger) */
.filter-strip.fs .fs-chip[data-group="lenses"]:not([data-id="lens:none"]) span { word-spacing: 60px; line-height: 10px; max-height: 42px; }
.filter-strip.fs .fs-chip[data-group="lenses"]:not([data-id="lens:none"]) span::first-line { font-size: 19px; line-height: 22px; }
.filter-strip.fs .filter-chip.make { border: 0; box-shadow: none; outline: 2px dashed rgba(255,255,255,.75); outline-offset: -2px; }

.fs-star {
  position: absolute; top: -5px; right: -4px; width: 16px; height: 16px; color: var(--accent, #ffcf24); font-style: normal;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); pointer-events: none;
}
.fs-star svg { width: 100%; height: 100%; display: block; }
.fs-chip.fs-look .fs-star { top: -4px; right: 0; }
.filter-strip.fs .fs-chip:not(.fs-look) .fs-star { top: -2px; right: -2px; }

.fs-toast {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap;
  background: rgba(0,0,0,.72); color: #fff; padding: 7px 12px; border-radius: 999px; font: 700 13px/1 system-ui, sans-serif;
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.fs-toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) { .fs-row { scroll-behavior: auto; } .fs-toast { transition: none; } }
