/* ================================================================
   Tri Slider 8.0  —  Frontend CSS
   Modes: peek · strip · striptabs · catalog · masonry · marquee · bleed · hero
   Presets: minimal · apple · dark · spacex · trikdang
================================================================ */

.trs-wrap *, .trs-wrap *::before, .trs-wrap *::after { box-sizing: border-box; }

/* ── Base tokens ──────────────────────────────────────────── */
.trs-wrap {
  --trs-radius:           4px;
  --trs-arrow-size:       46px;
  --trs-arrow-bg:         #fff;
  --trs-arrow-color:      #111;
  --trs-arrow-shadow:     0 2px 12px rgba(0,0,0,.14);
  --trs-arrow-border:     none;
  --trs-dot-size:         7px;
  --trs-dot-gap:          8px;
  --trs-dot-bg:           rgba(0,0,0,.18);
  --trs-dot-active:       #111;
  --trs-prog-bg:          rgba(0,0,0,.1);
  --trs-prog-fg:          #111;
  --trs-cap-bg:           rgba(0,0,0,.44);
  --trs-cap-fg:           #fff;
  --trs-peek-scale:       .90;
  --trs-peek-opacity:     .48;
  --trs-trans:            500ms;
  --trs-tab-color:        #111;
  --trs-tab-active-color: #111;
  --trs-tab-line-color:   #111;
  --trs-tab-ink-h:        3px;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* ── Stage ────────────────────────────────────────────────── */
.trs-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}
.trs-mode--peek .trs-stage  { overflow: visible; }
.trs-mode--peek.trs-wrap    { overflow: hidden;  }

/* ── Track ────────────────────────────────────────────────── */
.trs-track {
  display: flex;
  align-items: flex-start;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Slide base ───────────────────────────────────────────── */
.trs-slide {
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
  border-radius: var(--trs-radius);
  overflow: hidden;
  transition:
    transform  var(--trs-trans) ease,
    opacity    var(--trs-trans) ease;
}
a.trs-slide {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.trs-slide:focus-visible {
  outline: 3px solid #0078d4;
  outline-offset: 2px;
}
.trs-mode--peek .trs-slide {
  transform: scale(var(--trs-peek-scale, .90));
  opacity:   var(--trs-peek-opacity, .48);
}
.trs-mode--peek .trs-slide.is-active {
  transform: scale(1);
  opacity: 1;
}

/* ── Image wrapper ────────────────────────────────────────── */
.trs-slide__img-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.trs-slide__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: transform var(--trs-trans) ease;
}
.trs-mode--strip .trs-slide.is-active .trs-slide__img { transform: scale(1.04); }

/* Hero */
.trs-mode--hero .trs-slide,
.trs-mode--hero .trs-slide__img-wrap { height: var(--trs-hero-h, 80vh); aspect-ratio: unset !important; }

/* ── Caption ──────────────────────────────────────────────── */
.trs-caption {
  position: absolute;
  bottom:0; left:0; right:0;
  padding: 2.5rem 1.2rem 1rem;
  background: linear-gradient(to top, var(--trs-cap-bg) 0%, transparent 100%);
  color: var(--trs-cap-fg);
  font-size: .875rem;
  line-height: 1.5;
}

/* ── Play button ──────────────────────────────────────────── */
.trs-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .2s;
}
.trs-play-btn:hover { opacity: .82; }

/* ── Arrows ───────────────────────────────────────────────── */
.trs-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 20;
  width:  var(--trs-arrow-size);
  height: var(--trs-arrow-size);
  border-radius: 50%;
  border: var(--trs-arrow-border);
  background: var(--trs-arrow-bg);
  color: var(--trs-arrow-color);
  box-shadow: var(--trs-arrow-shadow);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s, transform .22s, background .22s;
}
.trs-stage:hover .trs-arrow,
.trs-stage:focus-within .trs-arrow { opacity:1; pointer-events:auto; }
.trs-arrow--prev { left:  1rem; }
.trs-arrow--next { right: 1rem; }
.trs-arrow:hover  { transform: translateY(-50%) scale(1.1); }
.trs-arrow:active { transform: translateY(-50%) scale(.94); }
@media (hover:none) { .trs-arrow { opacity:.85; pointer-events:auto; } }

/* ── Controls ─────────────────────────────────────────────── */
.trs-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; padding: .75rem 1rem 0;
}
.trs-dots { display:flex; align-items:center; gap:var(--trs-dot-gap); }
.trs-dot {
  width: var(--trs-dot-size); height: var(--trs-dot-size);
  border-radius: 50%; border: none; padding: 0;
  background: var(--trs-dot-bg); cursor: pointer;
  transition: background .3s, transform .3s;
  position: relative;
}
.trs-dot::after { content:''; position:absolute; inset:-8px; }
.trs-dot.is-active { background:var(--trs-dot-active); transform:scale(1.4); }
.trs-progress {
  flex: 1; max-width:140px; height:2px;
  background:var(--trs-prog-bg); border-radius:99px; overflow:hidden;
}
.trs-progress__bar {
  height:100%; background:var(--trs-prog-fg);
  border-radius:99px; transition:width .5s ease;
}

/* ══════════════════════════════════════════════════════════
   BACKGROUND LAYER
══════════════════════════════════════════════════════════ */
.trs-bg-layer {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
}
.trs-bg-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  opacity: 0.18;
}
.trs-bg-layer .trs-bg-img:nth-child(2) { opacity:.10; transform:translateX(40%) scale(1.1); }
.trs-bg-layer .trs-bg-img:nth-child(3) { opacity:.07; transform:translateX(-30%) scale(1.2); }
.trs-stage, .trs-marquee-wrap, .trs-masonry, .trs-catalog,
.trs-striptabs-wrap, .trs-plane-layer { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════════════════
   CATALOG MODE  (Fourthwall 3-column product grid)
══════════════════════════════════════════════════════════ */
.trs-catalog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--trs-catalog-gap, 8px);
  width: 100%;
}
@media (max-width: 767px) { .trs-catalog { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .trs-catalog { grid-template-columns: 1fr; } }

.trs-catalog__item {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: var(--trs-radius);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.25,.46,.45,.94), box-shadow .3s ease;
}
.trs-catalog__item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.trs-catalog__img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: rgba(0,0,0,.06);
}
.trs-catalog__img-wrap img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--trs-masonry-hover-speed, 400ms) cubic-bezier(.25,.46,.45,.94);
  -webkit-user-drag: none; pointer-events: none;
}
.trs-catalog__item:hover .trs-catalog__img-wrap img { transform: scale(1.05); }
.trs-catalog__info {
  padding: .6rem .5rem .5rem;
  display: flex; flex-direction: column; gap: .2rem;
}
.trs-catalog__name {
  font-size: .875rem; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trs-catalog__price {
  font-size: .8rem; opacity: .65; font-weight: 500;
}

/* ══════════════════════════════════════════════════════════
   STRIP + TABS MODE  (Squarespace tab-switcher)
══════════════════════════════════════════════════════════ */
.trs-striptabs-wrap { width: 100%; }

/* ── Tabs bar ─────────────────────────────────────────────── */
.trs-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.25rem;
  border-bottom: 1.5px solid rgba(0,0,0,.1);
  position: relative; /* anchor for sliding ink-bar */
}
.trs-tabs::-webkit-scrollbar { display:none; }

.trs-tab {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  padding: .6rem 1.1rem;
  font-size: .9rem; font-weight: 500;
  color: rgba(0,0,0,.45);
  letter-spacing: .01em;
  position: relative;
  transition: color .22s ease, transform .22s cubic-bezier(.34,1.56,.64,1), opacity .22s ease;
  z-index: 1; /* sit above ink-bar */
  transform-origin: center bottom;
}
.trs-tab:hover {
  color: var(--trs-tab-color, #111);
  transform: translateY(-2px) scale(1.06);
  opacity: 1;
}
.trs-tab:active {
  transform: translateY(0px) scale(0.97);
  transition-duration: .1s;
}
.trs-tab.is-active {
  color: var(--trs-tab-active-color, #111);
  transform: translateY(0) scale(1);
}
/* kill old per-tab ::after — ink-bar replaces it */
.trs-tab::after { display: none !important; }

/* ── Sliding ink-bar (shared across all tab styles) ──────── */
/* JS creates <span class="trs-tab-ink"> inside .trs-tabs and
   moves it with translateX. Starts hidden until JS positions it. */
.trs-tab-ink {
  position: absolute;
  bottom: 0;
  left: 0;
  height: var(--trs-tab-ink-h, 3px);
  pointer-events: none;
  /* invisible until JS calls positionInk() and adds is-ready */
  opacity: 0;
}
.trs-tab-ink.is-ready { opacity: 1; }

/* ── Underline style ────────────────────────────────────── */
.trs-tabs--underline .trs-tab-ink {
  bottom: -1.5px;
  height: var(--trs-tab-ink-h, 3px);
  border-radius: 2px;
  background: var(--trs-tab-line-color, #111);
}

/* ── Pill style ─────────────────────────────────────────── */
.trs-tabs--pill {
  border-bottom: none;
  gap: .5rem;
  padding: .35rem 0;
  align-items: center;
}
/* Pill tab: generous 10px/22px padding, text perfectly centred.
   Inactive tabs are NAKED TEXT — completely transparent.
   The sliding ink-bar is the ONE absolute-positioned indicator. */
.trs-tabs--pill .trs-tab {
  border-radius: 99px;
  padding: 10px 22px;           /* 10px vertical, 22px horizontal */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  line-height: 1;               /* tight line-height keeps vertical centring exact */
  min-height: 0;
  background: transparent !important; /* naked: ink-bar is the only background */
}
/* Smart Color: active pill text — controlled by CSS variable set from JS luminance calc */
.trs-tabs--pill .trs-tab.is-active {
  color: var(--tk-pill-text-color, #fff);
}
/* Fallback for non-TK presets (dark/spacex) */
.trs-preset--dark .trs-tabs--pill .trs-tab.is-active,
.trs-preset--spacex .trs-tabs--pill .trs-tab.is-active { color: #000; }
/* Sliding pill ink-bar — the ONE absolute-positioned indicator behind active text */
.trs-tabs--pill .trs-tab-ink {
  bottom: 0.35rem;
  height: calc(100% - 0.7rem);
  border-radius: 99px;
  background: #111;                /* default for non-TK presets */
  z-index: 0;                      /* behind tab text */
  /* Premium fluid horizontal slide */
  transition: transform 380ms cubic-bezier(0.25, 1, 0.5, 1),
              width    380ms cubic-bezier(0.25, 1, 0.5, 1) !important;
  will-change: transform, width;
}

/* ── Box style ──────────────────────────────────────────── */
.trs-tabs--box {
  border-bottom: none;
  gap: .3rem;
}
.trs-tabs--box .trs-tab {
  border-radius: var(--trs-radius);
}
.trs-tabs--box .trs-tab.is-active { color: var(--trs-tab-active-color, #111); }
.trs-tabs--box .trs-tab-ink {
  bottom: 0;
  height: 100%;
  border-radius: var(--trs-radius);
  border: 1.5px solid currentColor;
  background: transparent;
  z-index: 0;
  color: var(--trs-tab-active-color, #111);
}

/* ── Minimal style ──────────────────────────────────────── */
.trs-tabs--minimal { border-bottom: none; }
.trs-tabs--minimal .trs-tab { font-weight: 400; }
.trs-tabs--minimal .trs-tab.is-active { font-weight: 700; }
.trs-tabs--minimal .trs-tab-ink { display: none; }

/* ── Panels ───────────────────────────────────────────────── */
/* All panel sliders are initialized upfront (see initStripTabs in view.js),
   so display:none is safe — no more offsetWidth=0 race condition. */
.trs-striptabs-panels { position: relative; overflow: hidden; }
.trs-striptabs-panel {
  display: none;
}
.trs-striptabs-panel.is-active {
  display: block;
}

/* Strip inside panel */
.trs-striptabs-panel .trs-stage { overflow: hidden; width: 100%; }
.trs-striptabs-panel .trs-track {
  display: flex;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}
/* Default flex-basis so slides are visible before JS sets pixel widths.
   JS overrides this with an inline style (highest specificity). */
.trs-striptabs-panel .trs-slide {
  flex: 0 0 auto;
  width: calc((100% - var(--trs-strip-vis, 3) * 8px) / var(--trs-strip-vis, 3));
  min-width: 0;
  border-radius: var(--trs-radius);
  overflow: hidden;
}
.trs-striptabs-panel .trs-slide.is-active .trs-slide__img { transform: scale(1.04); }

/* The striptabs save() wraps each image in a plain <div style="aspect-ratio:X;overflow:hidden">
   with no class. These rules make it behave like trs-slide__img-wrap so the image
   fills the aspect-ratio box correctly across all browsers and themes. */
.trs-striptabs-panel .trs-slide > div {
  position: relative;
  display: block;
  width: 100%;
}
.trs-striptabs-panel .trs-slide > div > .trs-slide__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trs-striptabs-item-info {
  padding: .5rem .4rem .3rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.trs-striptabs-item-name {
  font-size: .8rem; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trs-striptabs-item-price {
  font-size: .75rem; opacity: .6; font-weight: 500;
}

/* ── Dark preset overrides for tabs ──────────────────────── */
.trs-preset--dark .trs-tabs,
.trs-preset--spacex .trs-tabs { border-bottom-color: rgba(255,255,255,.12); }
.trs-preset--dark .trs-tab,
.trs-preset--spacex .trs-tab { color: rgba(255,255,255,.45); }
.trs-preset--dark .trs-tab.is-active,
.trs-preset--spacex .trs-tab.is-active { color: #fff; }
.trs-preset--dark .trs-tabs--underline .trs-tab-ink,
.trs-preset--spacex .trs-tabs--underline .trs-tab-ink { background: #fff; }
.trs-preset--dark .trs-tabs--pill .trs-tab.is-active,
.trs-preset--spacex .trs-tabs--pill .trs-tab.is-active { color: #000; }
.trs-preset--dark .trs-tabs--pill .trs-tab-ink,
.trs-preset--spacex .trs-tabs--pill .trs-tab-ink { background: #fff; }
.trs-preset--trikdang .trs-tabs { border-bottom-color: color-mix(in srgb, var(--tk-accent) 22%, transparent); }
.trs-preset--trikdang .trs-tab { color: color-mix(in srgb, var(--tk-accent) 48%, transparent); }
.trs-preset--trikdang .trs-tab.is-active { color: var(--tk-accent); }
.trs-preset--trikdang .trs-tabs--underline .trs-tab-ink { background: var(--tk-accent); }
.trs-preset--trikdang .trs-tabs--pill .trs-tab.is-active { color: var(--tk-pill-text-color, var(--tk-bg, #0a0a0a)); }
.trs-preset--trikdang .trs-tabs--pill .trs-tab-ink { background: var(--tk-pill-btn-color, #ffffff); }

/* ══════════════════════════════════════════════════════════
   MASONRY MODE  (Fourthwall mixed portrait + landscape)
══════════════════════════════════════════════════════════ */
.trs-mode--masonry .trs-stage { overflow:visible; }
.trs-mode--masonry.trs-wrap   { overflow:hidden; position:relative; }

.trs-masonry {
  display: flex;
  gap: var(--trs-masonry-gap, 8px);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  min-height: 100px;
  align-items: stretch;
}
.trs-masonry:active { cursor: grabbing; }
.trs-masonry::-webkit-scrollbar { display:none; }

.trs-masonry__group {
  display: flex; flex-direction: column;
  gap: var(--trs-masonry-gap, 8px);
  flex-shrink: 0; scroll-snap-align: start;
}

.trs-masonry__item {
  overflow: hidden;
  border-radius: var(--trs-radius);
  position: relative;
  flex-shrink: 0;
  min-height: 80px;
  background: rgba(0,0,0,.08);
  transition:
    transform var(--trs-masonry-hover-speed, 400ms) cubic-bezier(.25,.46,.45,.94),
    box-shadow var(--trs-masonry-hover-speed, 400ms) ease,
    opacity    .4s ease;
  will-change: transform;
  opacity: 0;
  transform: translateY(16px);
}
.trs-masonry__item.is-visible { opacity: 1; transform: translateY(0); }
.trs-masonry__item:hover { transform: scale(1.025) translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.18); z-index: 2; }

.trs-masonry__group:nth-child(1) .trs-masonry__item { transition-delay: 0ms; }
.trs-masonry__group:nth-child(2) .trs-masonry__item { transition-delay: 60ms; }
.trs-masonry__group:nth-child(3) .trs-masonry__item { transition-delay: 120ms; }
.trs-masonry__group:nth-child(4) .trs-masonry__item { transition-delay: 180ms; }
.trs-masonry__group:nth-child(5) .trs-masonry__item { transition-delay: 240ms; }
.trs-masonry__group:nth-child(6) .trs-masonry__item { transition-delay: 300ms; }
.trs-masonry__group:nth-child(7) .trs-masonry__item { transition-delay: 360ms; }
.trs-masonry__group:nth-child(8) .trs-masonry__item { transition-delay: 420ms; }

.trs-masonry__item img {
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  pointer-events: none; -webkit-user-drag: none;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}
.trs-masonry__item:hover img { transform: scale(1.06); }

/* JS now sets explicit px heights for all ratio types — CSS aspect-ratio is
   only a fallback for when JS hasn't run yet (e.g. no-JS or first paint) */
.trs-masonry__item[data-ratio="portrait"]  { aspect-ratio: 3/4;  }
.trs-masonry__item[data-ratio="landscape"] { aspect-ratio: 4/3;  }
.trs-masonry__item[data-ratio="square"]    { aspect-ratio: 1/1;  }
.trs-masonry__item[data-ratio="wide"]      { aspect-ratio: 16/9; }

.trs-masonry__label {
  position: absolute; top:0; left:0; right:0;
  padding: .5rem .75rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.58) 0%, transparent 100%);
  color:#fff; font-size:.8rem; font-weight:600;
  letter-spacing:.02em; line-height:1.3;
  display:flex; align-items:center; gap:.35rem;
  pointer-events:none;
  transition: opacity .3s;
}
.trs-masonry__item:hover .trs-masonry__label { opacity:.85; }
.trs-masonry__label::after { content: '↗'; font-size:.72rem; opacity:.75; margin-left: auto; }

/* ══════════════════════════════════════════════════════════
   MARQUEE  (Webflow infinite scroll)
══════════════════════════════════════════════════════════ */
.trs-mode--marquee .trs-stage { overflow:hidden; -webkit-transform:translateZ(0); }
.trs-marquee-wrap { display:flex; flex-direction:column; gap:var(--trs-marquee-gap,8px); overflow:hidden; }
.trs-marquee-row {
  display: flex; gap: var(--trs-marquee-gap,8px);
  width: max-content;
  animation: trs-marquee var(--trs-marquee-dur,40s) linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.trs-marquee-row--reverse { animation-direction: reverse; }
@keyframes trs-marquee { 0% { transform:translate3d(0,0,0); } 100% { transform:translate3d(-50%,0,0); } }
.trs-marquee-wrap:hover .trs-marquee-row,
.trs-marquee-wrap:focus-within .trs-marquee-row { animation-play-state:paused; }
.trs-marquee__item { flex-shrink:0; overflow:hidden; border-radius:var(--trs-radius); position:relative; -webkit-transform:translateZ(0); }
/* iOS/macOS Safari cannot reliably derive an <img>'s auto width from
   height:100% while it sits inside a flex row (the item ends up stretched,
   cropped, or zoomed). Sizing the item to an explicit pixel width in JS
   (view.js: initMarquee) and filling it with a 100%/100% + object-fit:cover
   image sidesteps that bug — this is the same width:100%/height:100%
   pattern already used safely elsewhere in this plugin. */
.trs-marquee__item img { display:block !important; height:100% !important; width:100% !important; max-width:none !important; object-fit:cover !important; pointer-events:none; -webkit-user-drag:none; }

/* ══════════════════════════════════════════════════════════
   VIDEO LIGHTBOX
══════════════════════════════════════════════════════════ */
.trs-video-overlay {
  display: none; position: fixed; inset:0; z-index:99999;
  background: rgba(0,0,0,.85);
  flex-direction:column;
  align-items:center; justify-content:center; padding:1rem;
  overflow-y:auto;
}
.trs-video-overlay.is-open { display:flex; }
.trs-video-overlay__card {
  /* Unified frame: video + outside bar + description all clipped to one radius */
  display:flex; flex-direction:column;
  width:100%; max-width:960px; margin:0 auto;
  border-radius:4px; /* default; overridden per-preset via JS */
  overflow:hidden;
  background:#000;
  flex-shrink:0;
}
.trs-video-overlay__inner {
  position:relative; width:100%; flex-shrink:0;
  background:#000;
  /* no border-radius here — the card clips all children */
}
/* ── Bar: default bottom overlay ── */
.trs-video-overlay__bar {
  position:absolute; bottom:0; left:0; right:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:.4rem .5rem;
  background:linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
  opacity:0; transition:opacity .22s ease;
  pointer-events:none;
}
/* Show bar on hover — for all inside positions (top/bottom/left/right) */
.trs-video-overlay__inner:hover .trs-video-overlay__bar,
.trs-video-overlay__inner:focus-within .trs-video-overlay__bar {
  opacity:1; pointer-events:auto;
}
/* Above/below: bar is outside __inner so always visible, no hover needed */
.trs-video-overlay__bar[style*="position: static"],
.trs-video-overlay__bar[style*="position:static"] {
  opacity:1 !important; pointer-events:auto !important;
}
.trs-video-overlay__bar-left,
.trs-video-overlay__bar-right {
  display:flex; align-items:center; gap:.25rem;
}
/* ── All toolbar buttons — kill every browser/WP default ── */
.trs-video-overlay__btn {
  -webkit-appearance:none; appearance:none;
  display:inline-flex; align-items:center; justify-content:center; gap:.35rem;
  height:1.8rem; min-width:1.8rem; padding:0 .4rem;
  border-radius:4px; border:none; outline:none; box-shadow:none;
  background:transparent !important;
  color:#fff !important; font-size:.72rem; font-weight:600; letter-spacing:.02em;
  cursor:pointer; white-space:nowrap; flex-shrink:0;
  transition:background .15s, transform .12s;
}
.trs-video-overlay__btn:hover {
  background:rgba(255,255,255,.18) !important; transform:scale(1.08);
}
.trs-video-overlay__btn:disabled { opacity:.35; cursor:default; transform:none; }
.trs-video-overlay__btn svg { display:block; pointer-events:none; flex-shrink:0; }
/* Play/Pause — hidden by default, shown for native video */
.trs-video-overlay__playpause { display:none; }
/* Auto-hide controls while playing */
.trs-video-overlay.trs-controls-hidden .trs-video-overlay__bar {
  opacity:0 !important; pointer-events:none !important;
  transition:opacity .35s ease;
}
.trs-video-overlay__bar { transition:opacity .25s ease; }
/* Subscribe — red tint on hover */
.trs-video-overlay__subscribe:hover { background:rgba(200,0,0,.7) !important; }
/* ── Icon description labels ── */
/* All icon labels (subscribe + generic) hidden by default */
.trs-video-overlay__icon-label,
.trs-video-overlay__subscribe-label {
  display: none;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  color: #fff;
  margin-left: .15rem;
}
/* When icon-descriptions mode is on: reveal labels on hover */
.trs-bar--icon-descriptions .trs-video-overlay__btn .trs-video-overlay__icon-label,
.trs-bar--icon-descriptions .trs-video-overlay__btn .trs-video-overlay__subscribe-label {
  display: inline;
}

/* ── Info / description panel (note icon dropdown) ── */
/* ── Info / description panel — sits OUTSIDE __inner so overflow:hidden doesn't clip it ── */
.trs-video-overlay__description {
  /* Always in the DOM; hidden via max-height so CSS transition works */
  display: block;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  width: 100%;
  max-width: 960px;
  flex-shrink: 0;
  margin: 0 auto;
  padding: 0 1rem;
  background: rgba(10,10,10,.88);
  color: #e8e8e8;
  font-size: .9rem;
  line-height: 1.65;
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0;
  transition: max-height .32s ease, opacity .25s ease, padding .25s ease;
  pointer-events: none;
}
.trs-video-overlay__description.is-open {
  max-height: 50vh;
  opacity: 1;
  padding: .85rem 1.1rem;
  overflow-y: auto;
  pointer-events: auto;
}
/* Links inside the info panel */
.trs-video-overlay__description a {
  color: #60b4ff;
  text-decoration: underline;
}
.trs-video-overlay__description a:hover { color: #93cbff; }
/* Info button active state */
.trs-video-overlay__info.is-active {
  color: #60b4ff;
  background: rgba(96,180,255,.18);
  border-radius: 6px;
}
/* "Link copied" toast */
.trs-video-overlay__copied {
  position:absolute; bottom:3rem; right:.5rem;
  background:rgba(0,0,0,.8); color:#fff;
  font-size:.7rem; padding:.2rem .5rem; border-radius:4px;
  pointer-events:none; white-space:nowrap; z-index:30;
}
.trs-video-overlay__frame { overflow:hidden; }
.trs-video-overlay__frame iframe,
.trs-video-overlay__frame video { display:block; width:100%; aspect-ratio:16/9; border:none; }

/* ── Inner no longer needs hover-based bar visibility when bar is outside */
.trs-video-overlay__inner.trs-bar-outside .trs-video-overlay__bar {
  opacity:1; pointer-events:auto;
}

/* ══════════════════════════════════════════════════════════
   PAPER AIRPLANE LAYER  (TriKdanG draggable overlay)
══════════════════════════════════════════════════════════ */
.trs-plane-layer { position:absolute; inset:0; pointer-events:none; z-index:30; overflow:hidden; }
.trs-plane {
  position:absolute; pointer-events:auto; cursor:grab;
  user-select:none; -webkit-user-select:none;
  width:80px; height:auto;
  filter:drop-shadow(0 4px 16px rgba(0,0,0,.45));
  transition:filter .2s;
  top:20%; left:10%;
  will-change:transform;
}
.trs-plane.is-dragging { cursor:grabbing; filter:drop-shadow(0 8px 24px rgba(168,240,255,.5)); transition:none; }
.trs-plane-trail {
  position:absolute; pointer-events:none;
  width:120px; height:2px;
  background:linear-gradient(to right, rgba(168,240,255,.0), rgba(168,240,255,.55));
  transform-origin:right center; opacity:0; transition:opacity .3s;
}
.trs-plane.is-dragging ~ .trs-plane-trail { opacity:1; }

/* ══════════════════════════════════════════════════════════
   PRESET: Minimal
══════════════════════════════════════════════════════════ */
.trs-preset--minimal { --trs-radius:4px; }

/* ══════════════════════════════════════════════════════════
   PRESET: Apple
══════════════════════════════════════════════════════════ */
.trs-preset--apple {
  --trs-radius:16px;
  --trs-arrow-bg:rgba(255,255,255,.74);
  --trs-arrow-color:#1d1d1f;
  --trs-arrow-shadow:0 2px 16px rgba(0,0,0,.10);
  --trs-dot-bg:rgba(29,29,31,.16);
  --trs-dot-active:#1d1d1f;
  --trs-prog-fg:#1d1d1f;
  --trs-peek-scale:.92;
}
.trs-preset--apple .trs-arrow {
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  border:1px solid rgba(255,255,255,.35);
}

/* ══════════════════════════════════════════════════════════
   PRESET: Dark
══════════════════════════════════════════════════════════ */
.trs-preset--dark {
  --trs-radius:0px;
  --trs-arrow-bg:rgba(255,255,255,.07);
  --trs-arrow-color:#e8e8e8;
  --trs-arrow-border:1px solid rgba(255,255,255,.14);
  --trs-arrow-shadow:none;
  --trs-dot-bg:rgba(255,255,255,.22);
  --trs-dot-active:#fff;
  --trs-prog-bg:rgba(255,255,255,.12);
  --trs-prog-fg:#fff;
}
.trs-preset--dark.trs-wrap { background:#000; }
.trs-preset--dark .trs-arrow { backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }

/* ══════════════════════════════════════════════════════════
   PRESET: SpaceX
══════════════════════════════════════════════════════════ */
.trs-preset--spacex {
  --trs-radius:0px;
  --trs-arrow-bg:rgba(0,0,0,.65);
  --trs-arrow-color:#ccc;
  --trs-arrow-border:1px solid rgba(255,255,255,.16);
  --trs-arrow-shadow:none;
  --trs-arrow-size:42px;
  --trs-dot-bg:rgba(255,255,255,.18);
  --trs-dot-active:#fff;
  --trs-dot-size:18px;
  --trs-prog-bg:rgba(255,255,255,.08);
  --trs-prog-fg:#e0e0e0;
}
.trs-preset--spacex.trs-wrap { background:#0a0a0a; }
.trs-preset--spacex .trs-arrow { border-radius:0; }
.trs-preset--spacex .trs-dot { border-radius:1px; height:2px; width:18px; }
.trs-preset--spacex .trs-dot.is-active { transform:scaleX(1.6); }

/* ══════════════════════════════════════════════════════════
   PRESET: TriKdanG
══════════════════════════════════════════════════════════ */
.trs-preset--trikdang {
  --tk-accent:     #ffffff;
  --tk-bg:         #05070f;
  --tk-bg2:        #0c1a45;
  --tk-border:     #ffffff;
  --tk-radius:     0px;

  --trs-radius:         var(--tk-radius);
  --trs-arrow-bg:       rgba(0,0,0,.55);
  --trs-arrow-color:    var(--tk-accent);
  --trs-arrow-border:   1px solid color-mix(in srgb, var(--tk-border) 30%, transparent);
  --trs-arrow-shadow:   0 4px 20px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07);
  --trs-dot-bg:         color-mix(in srgb, var(--tk-accent) 25%, transparent);
  --trs-dot-active:     var(--tk-accent);
  --trs-prog-bg:        color-mix(in srgb, var(--tk-accent) 12%, transparent);
  --trs-prog-fg:        var(--tk-accent);
  --trs-peek-scale:     .91;
  --trs-peek-opacity:   .42;
  --trs-tab-color:      var(--tk-accent);
  --trs-tab-active-color: var(--tk-accent);
  --trs-tab-line-color: var(--tk-accent);
}
.trs-preset--trikdang.trs-wrap {
  background: radial-gradient(ellipse at 18% 55%, var(--tk-bg2) 0%, var(--tk-bg) 70%);
  padding: 2px;
}
.trs-preset--trikdang.trs-wrap::before {
  content:''; position:absolute; inset:0; padding:1.5px;
  background:linear-gradient(130deg, color-mix(in srgb, var(--tk-border) 65%, transparent) 0%, color-mix(in srgb, var(--tk-border) 30%, transparent) 55%, transparent 100%);
  -webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  pointer-events:none; z-index:0; border-radius:inherit;
}
.trs-preset--trikdang .trs-arrow {
  backdrop-filter:blur(14px) saturate(160%);
  -webkit-backdrop-filter:blur(14px) saturate(160%);
}
.trs-preset--trikdang .trs-arrow:hover {
  background:color-mix(in srgb, var(--tk-accent) 15%, transparent);
  box-shadow:0 4px 28px color-mix(in srgb, var(--tk-accent) 28%, transparent);
}
.trs-preset--trikdang .trs-dot.is-active {
  box-shadow:0 0 8px color-mix(in srgb, var(--tk-accent) 80%, transparent);
}

/* ══════════════════════════════════════════════════════════
   DOT STYLE VARIANTS
══════════════════════════════════════════════════════════ */
.trs-dots[data-dot-style="pill"] .trs-dot { width:18px; height:5px; border-radius:99px; }
.trs-dots[data-dot-style="pill"] .trs-dot.is-active { width:28px; transform:none; }
.trs-dots[data-dot-style="square"] .trs-dot { border-radius:2px; }
.trs-dots[data-dot-style="dash"] .trs-dot { width:22px; height:3px; border-radius:1px; }
.trs-dots[data-dot-style="dash"] .trs-dot.is-active { transform:scaleX(1.5); }
.trs-dots[data-dot-style="ring"] .trs-dot { background:transparent !important; border:2px solid var(--trs-dot-bg); }
.trs-dots[data-dot-style="ring"] .trs-dot.is-active { border-color:var(--trs-dot-active); transform:scale(1.35); }
.trs-dots[data-dot-style="number"] .trs-dot {
  width:22px; height:22px; border-radius:50%;
  font-size:10px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
  color:var(--trs-dot-active); background:transparent;
  border:1.5px solid var(--trs-dot-bg);
}
.trs-dots[data-dot-style="number"] .trs-dot.is-active {
  background:var(--trs-dot-active); color:#000; border-color:var(--trs-dot-active); transform:none;
}

/* ══════════════════════════════════════════════════════════
   ARROW STYLE VARIANTS
══════════════════════════════════════════════════════════ */
.trs-stage[data-arrow-style="rounded"] .trs-arrow { border-radius:10px; }
.trs-stage[data-arrow-style="sharp"]   .trs-arrow { border-radius:0; }
.trs-stage[data-arrow-style="minimal"] .trs-arrow { background:transparent !important; box-shadow:none !important; border:none !important; width:32px; height:32px; }
.trs-stage[data-arrow-style="large"]   .trs-arrow { width:56px; height:56px; border-radius:50%; }
.trs-stage[data-arrow-style="edge"]    .trs-arrow { border-radius:0; top:0; transform:none; height:100%; width:44px; opacity:0; align-items:center; }
.trs-stage[data-arrow-style="edge"]:hover .trs-arrow { opacity:1; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width:767px) {
  .trs-wrap { --trs-arrow-size:38px; }
  .trs-arrow--prev { left:.5rem; }
  .trs-arrow--next { right:.5rem; }
  .trs-controls { padding:.5rem .75rem 0; gap:.625rem; }
  .trs-progress  { max-width:80px; }
  .trs-tabs { margin-bottom:.85rem; }
  .trs-tab  { padding:.5rem .75rem; font-size:.82rem; }
}
@media (max-width:480px) {
  .trs-masonry { --trs-masonry-gap:4px; }
}

/* ================================================================
   Tri Slider 9.0  — Enhancement additions
================================================================ */

/* ── Hero slide overlay (heading + subtext on slides) ─────── */
.trs-slide__img-wrap { position: relative; }

.trs-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.22) 55%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.trs-hero-overlay__heading {
  margin: 0 0 .4em;
  color: #fff;
  font-size: clamp(1.4rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  letter-spacing: -.01em;
}
.trs-hero-overlay__text {
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: clamp(.85rem, 1.8vw, 1.15rem);
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  max-width: 55ch;
}

/* ── Tab alignment data attribute support ─────────────────── */
.trs-tabs[data-tab-align="center"] { justify-content: center; }
.trs-tabs[data-tab-align="right"]  { justify-content: flex-end; }
.trs-tabs[data-tab-align="left"]   { justify-content: flex-start; }

/* ── Masonry motion (entrance animation) ──────────────────── */
/* items start invisible — is-visible triggers the animation */
/* Already defined in base CSS; adding stagger for more items */
.trs-masonry__group:nth-child(7)  .trs-masonry__item { transition-delay: 360ms; }
.trs-masonry__group:nth-child(8)  .trs-masonry__item { transition-delay: 420ms; }
.trs-masonry__group:nth-child(9)  .trs-masonry__item { transition-delay: 480ms; }
.trs-masonry__group:nth-child(10) .trs-masonry__item { transition-delay: 540ms; }
.trs-masonry__group:nth-child(11) .trs-masonry__item { transition-delay: 600ms; }
.trs-masonry__group:nth-child(12) .trs-masonry__item { transition-delay: 660ms; }

/* Reduced-motion: skip entrance animation, always show */
@media (prefers-reduced-motion: reduce) {
  .trs-masonry__item { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Masonry editor: always show items (no IntersectionObserver in editor) */
.trs-editor .trs-masonry__item { opacity: 1; transform: none; }


/* ================================================================
   Tri Slider 10.0 — Additions
================================================================ */

/* ── Hero: CSS var height (inline style / JS sets --trs-hero-h) ── */
/* Fallback already in base rule above via var(--trs-hero-h,80vh)  */

/* ── Masonry mobile: ensure images fill their container correctly ── */
@media (max-width: 599px) {
  .trs-masonry__item {
    border-radius: 6px;
    /* Safety net: ensure items always have height before JS fires.
       JS will override with an exact px value once it measures the wrapper. */
    min-height: 140px;
  }
  .trs-masonry__item img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block;
  }
}

/* ── Hero overlay — base resets (inline styles from JS override)  */
.trs-hero-overlay {
  /* position/inset/flex already set inline; these are fallback-only */
  text-align: left;
}
.trs-hero-overlay[data-pos*="center"] { text-align: center; }
.trs-hero-overlay[data-pos*="right"]  { text-align: right; }

/* ================================================================
   TriKdanG Slide 10.3 — Text & Button Styling
================================================================ */

/* ── TriKdanG preset: text color via CSS variable ──────────────── */
.trs-preset--trikdang .trs-masonry__label,
.trs-preset--trikdang .trs-catalog__name,
.trs-preset--trikdang .trs-catalog__price,
.trs-preset--trikdang .trs-striptabs-item-name,
.trs-preset--trikdang .trs-striptabs-item-price,
.trs-preset--trikdang .trs-caption {
  color: var(--tk-text-color, #ffffff);
}

/* ── TriKdanG preset: font-style driven by data attribute ──────── */
[data-tk-text-font-style="bold"]   .trs-masonry__label,
[data-tk-text-font-style="bold"]   .trs-catalog__name,
[data-tk-text-font-style="bold"]   .trs-catalog__price,
[data-tk-text-font-style="bold"]   .trs-striptabs-item-name,
[data-tk-text-font-style="bold"]   .trs-striptabs-item-price,
[data-tk-text-font-style="bold"]   .trs-caption { font-weight: bold; font-style: normal; }

[data-tk-text-font-style="italic"] .trs-masonry__label,
[data-tk-text-font-style="italic"] .trs-catalog__name,
[data-tk-text-font-style="italic"] .trs-catalog__price,
[data-tk-text-font-style="italic"] .trs-striptabs-item-name,
[data-tk-text-font-style="italic"] .trs-striptabs-item-price,
[data-tk-text-font-style="italic"] .trs-caption { font-style: italic; font-weight: normal; }

[data-tk-text-font-style="normal"] .trs-masonry__label,
[data-tk-text-font-style="normal"] .trs-catalog__name,
[data-tk-text-font-style="normal"] .trs-catalog__price,
[data-tk-text-font-style="normal"] .trs-striptabs-item-name,
[data-tk-text-font-style="normal"] .trs-striptabs-item-price,
[data-tk-text-font-style="normal"] .trs-caption { font-style: normal; font-weight: normal; }

/* ── TriKdanG preset: pill button — Smart Color active text ────── */
/* Inactive tabs are NAKED TEXT — completely transparent, no background bubble.
   Active tab uses --tk-pill-text-color (auto-set by JS luminance calc:
   dark pill → white text, light pill → black text). */
.trs-preset--trikdang .trs-tabs--pill .trs-tab {
  background: transparent;
  color: color-mix(in srgb, var(--tk-accent) 55%, transparent);
  border-color: transparent;
}
.trs-preset--trikdang .trs-tabs--pill .trs-tab.is-active {
  background: transparent; /* ink-bar provides the pill background */
  /* Smart Color: JS writes #000000 for light pills, #ffffff for dark pills */
  color: var(--tk-pill-text-color, #000000);
  border-color: transparent;
  filter: none;
}

/* ── Strip+Tabs: ink thickness, text, and line color vars ──────── */
.trs-preset--trikdang .trs-tabs--underline .trs-tab.is-active::after,
.trs-preset--trikdang .trs-tabs--underline .trs-tab::after {
  height: var(--tk-tab-ink-thickness, 2px);
}
.trs-preset--trikdang .trs-tabs--underline .trs-tab.is-active::after {
  background: var(--tk-tab-line-color, var(--tk-accent, #ffffff));
}
.trs-tabs .trs-tab {
  color: var(--tk-tab-text-color, inherit);
}
.trs-tabs .trs-tab.is-active {
  color: var(--tk-tab-active-color, var(--tk-accent, currentColor));
}
