/* Atelier — кастомные стили поверх Tailwind.
   Спокойная, нейтральная палитра. Никаких ярких градиентов, никакого glow.
   Спроектировано под долгие рабочие сессии. */

:root {
  --accent: #7B95A8;
  --accent-soft: rgba(123, 149, 168, 0.18);
  --accent-edge: rgba(123, 149, 168, 0.32);
}

html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

/* Тонкий, почти неброский scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #2A2E38 transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #2A2E38;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: #3A3F4D; background-clip: padding-box; }

/* Сдержанный focus — никаких ярких outlin'ов */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

/* Hover на карточках эпизодов — едва заметный lift, без glow */
.episode-card {
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
.episode-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent-edge);
  background-color: rgba(28, 31, 38, 1);
}

/* Прогресс-бар для активных генераций — пульсация без вспышки */
@keyframes progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
.progress-pulse {
  animation: progress-pulse 1.8s ease-in-out infinite;
}

@keyframes progress-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.progress-shimmer {
  background: linear-gradient(90deg,
    rgba(123, 149, 168, 0.25) 0%,
    rgba(123, 149, 168, 0.65) 50%,
    rgba(123, 149, 168, 0.25) 100%);
  background-size: 200% 100%;
  animation: progress-shimmer 2s linear infinite;
}

/* Placeholder для отсутствующих превью — без диагональных полос,
   просто очень мягкая текстура */
.thumb-placeholder {
  background:
    radial-gradient(circle at 30% 30%,
      rgba(123, 149, 168, 0.08) 0%,
      rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #1C1F26 0%, #15171C 100%);
}

/* Утилиты для бейджей статусов pipeline */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .125rem .5rem;
  border-radius: 9999px;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.status-badge::before {
  content: '';
  width: .375rem;
  height: .375rem;
  border-radius: 9999px;
  background: currentColor;
}

/* HTMX progress states */
.htmx-request .htmx-loader { display: inline-flex; }
.htmx-loader { display: none; }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  .progress-shimmer, .progress-pulse, .episode-card {
    animation: none;
    transition: none;
  }
}
