/* ATLAS — alive feel (sharp: no blur, no grain) */

/* Nav — underline slide */
.tv-nav__link {
  position: relative;
}

.tv-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--tv-text);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tv-nav__link:hover::after,
.tv-nav__link:focus-visible::after {
  width: 100%;
}

/* Post Ad — subtle premium breathe (filter only — clarity keeps sharp shadows) */
@keyframes tv-post-breathe {
  0%, 100% { filter: brightness(1) saturate(1); }
  50% { filter: brightness(1.07) saturate(1.05); }
}

a.tv-btn--post:not(:hover) {
  animation: tv-post-breathe 4.5s ease-in-out infinite;
}

/* Search — crisp focus ring */
.tv-search:focus-within {
  border-color: var(--tv-text) !important;
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.14) !important;
}

html[data-tavus-theme="dark"] .tv-search:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08) !important;
}

/* Category icon pop */
@keyframes tv-icon-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12) translateY(-2px); }
  100% { transform: scale(1.08); }
}

.tv-cat:hover .tv-cat__icon-wrap {
  animation: tv-icon-pop 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stats — counted pop */
@keyframes tv-stat-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.tv-stat.is-alive {
  animation: tv-stat-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tv-stat.is-alive strong {
  display: inline-block;
}

@keyframes tv-stat-pop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.tv-stat.is-counted strong {
  animation: tv-stat-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Recent list stagger — only when FX module is active */
html.atlas-fx-on .tv-recent__item {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s;
}

html.atlas-fx-on .tv-widget[data-reveal].is-visible .tv-recent__item,
html.atlas-fx-on .tv-recent.is-visible .tv-recent__item {
  opacity: 1;
  transform: none;
}

html.atlas-fx-on .tv-widget[data-reveal].is-visible .tv-recent__item:nth-child(1),
html.atlas-fx-on .tv-recent.is-visible .tv-recent__item:nth-child(1) { transition-delay: 0.05s; }
html.atlas-fx-on .tv-widget[data-reveal].is-visible .tv-recent__item:nth-child(2),
html.atlas-fx-on .tv-recent.is-visible .tv-recent__item:nth-child(2) { transition-delay: 0.12s; }
html.atlas-fx-on .tv-widget[data-reveal].is-visible .tv-recent__item:nth-child(3),
html.atlas-fx-on .tv-recent.is-visible .tv-recent__item:nth-child(3) { transition-delay: 0.19s; }
html.atlas-fx-on .tv-widget[data-reveal].is-visible .tv-recent__item:nth-child(4),
html.atlas-fx-on .tv-recent.is-visible .tv-recent__item:nth-child(4) { transition-delay: 0.26s; }

/* Premium crown float */
@keyframes tv-crown-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.tv-widget--premium .tv-widget__crown {
  display: inline-block;
  animation: tv-crown-float 3.2s ease-in-out infinite;
}

/* Cart badge bump */
@keyframes tv-badge-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.tv-cart-badge.is-bump {
  animation: tv-badge-bump 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Announce bar — gentle pulse */
@keyframes tv-announce-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

.tv-announce {
  animation: tv-announce-pulse 6s ease-in-out infinite;
}

/* Link arrow nudge */
.tv-link-arrow::after {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hero photo wrapper parallax (img stays sharp) */
.tv-hero__photo {
  transition: transform 0.15s linear;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  a.tv-btn--post,
  .tv-widget--premium .tv-widget__crown,
  .tv-announce,
  .tv-stat.is-alive,
  .tv-stat.is-counted strong,
  .tv-cart-badge.is-bump {
    animation: none !important;
  }

  .tv-recent__item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tv-cat:hover .tv-cat__icon-wrap {
    animation: none;
  }

  .tv-hero__photo {
    transition: none;
  }
}

@media (max-width: 768px) {
  .tv-nav__link::after { display: none; }
  a.tv-btn--post { animation: none; }
}

/* ── Short vertical dividers in top menus (not full height) ── */
.tv-catnav__item,
.tv-nav > *,
.tv-bottom-nav__item {
  position: relative;
}

.tv-catnav__item + .tv-catnav__item::before,
.tv-nav > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 48%;
  min-height: 18px;
  max-height: 34px;
  background: var(--tv-line-soft);
  opacity: 0.9;
  pointer-events: none;
}

.tv-nav > * + *::before {
  left: -8px;
  height: 44%;
  max-height: 26px;
}

html[data-tavus-theme="dark"] .tv-catnav__item + .tv-catnav__item::before,
html[data-tavus-theme="dark"] .tv-nav > * + *::before {
  background: rgba(255, 255, 255, 0.14);
}

html[data-tavus-theme="light"] .tv-catnav__item + .tv-catnav__item::before,
html[data-tavus-theme="light"] .tv-nav > * + *::before,
html[data-tavus-theme="beige"] .tv-catnav__item + .tv-catnav__item::before,
html[data-tavus-theme="beige"] .tv-nav > * + *::before,
html[data-tavus-theme="gray"] .tv-catnav__item + .tv-catnav__item::before,
html[data-tavus-theme="gray"] .tv-nav > * + *::before,
html[data-tavus-theme="sky"] .tv-catnav__item + .tv-catnav__item::before,
html[data-tavus-theme="sky"] .tv-nav > * + *::before {
  background: rgba(15, 23, 42, 0.1);
}

@media (max-width: 768px) {
  .tv-bottom-nav__item + .tv-bottom-nav__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36%;
    min-height: 14px;
    max-height: 22px;
    background: var(--tv-line-soft);
    pointer-events: none;
  }

  html[data-tavus-theme="dark"] .tv-bottom-nav__item + .tv-bottom-nav__item::before {
    background: rgba(255, 255, 255, 0.12);
  }

  /* No dividers touching the floating Post button */
  .tv-bottom-nav__post::before,
  .tv-bottom-nav__item + .tv-bottom-nav__post::before,
  .tv-bottom-nav__post + .tv-bottom-nav__item::before {
    display: none;
  }

  .tv-nav.tv-nav--drawer-open > * + *::before {
    display: none;
  }
}
