/* Блоки ИИ-видеомонтажёра поверх общих base.css и theme.css (копии из демо-вайба,
 * их не править). Цвета — только токенами, поэтому светлая и тёмная темы работают сами. */

/* ── Загрузка: зона перетаскивания и очередь ── */
.iv-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 28px 16px; border: 1.5px dashed hsl(var(--border)); border-radius: 14px; text-align: center;
  background: hsl(var(--card)); cursor: pointer; transition: border-color .15s, background .15s; }
.iv-drop:hover, .iv-drop:focus-visible, .iv-drop.over { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .05); outline: none; }
.iv-drop .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 4px;
  color: hsl(var(--primary)); background: hsl(var(--primary) / var(--kg-ui-fill)); }
.iv-drop b { font-size: 14px; }
.iv-drop > span:not(.ic) { font-size: 12.5px; color: hsl(var(--muted-foreground)); max-width: 520px; }
#queue .rt-row .t .rt-bar { margin: 6px 0 4px; }
#queue .rt-row .st { font-variant-numeric: tabular-nums; }

/* ── Список файлов ── */
.iv-fname { overflow-wrap: anywhere; }
.iv-fnote { font-size: 11.5px; margin-top: 2px; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.iv-acts .btn { text-decoration: none; }
.iv-media { display: block; width: 100%; max-height: 70vh; border-radius: 10px; background: #000; }

/* ── Нагрузка сервера ── */
.iv-meters { display: flex; flex-direction: column; gap: 12px; }

/* ── Всплывающее сообщение ── */
.iv-toast { position: fixed; z-index: 120; right: 16px; top: calc(var(--kg-adminbar-h) + var(--kg-navbar-h) + 10px);
  max-width: calc(100vw - 32px); padding: 8px 12px; border-radius: 9px; font: 600 12.5px var(--font-sans);
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: 0 6px 20px hsl(220 30% 5% / .18); }

/* ── Вход ── */
.dv-auth .pane { position: relative; }
.iv-auth-theme { position: absolute; top: 16px; right: 16px; }
.iv-err { color: hsl(var(--destructive)); min-height: 16px; }
/* На узком экране колонка о сервисе стоит над формой. В theme.css у неё
   overflow: hidden, и сетка сжимает её с обрезкой — держим полную высоту,
   а список возможностей убираем, чтобы форма была видна без прокрутки. */
@media (max-width: 900px) {
  .dv-auth .pitch { min-height: max-content; }
  .dv-auth .pitch ul, .dv-auth .pitch > p:last-child { display: none; }
}

@media (max-width: 640px) {
  .iv-drop { padding: 22px 12px; }
  .iv-fnote { max-width: 220px; }
  /* В списке файлов на телефоне — имя, размер и кнопки-иконки. */
  .iv-files th:nth-child(2), .iv-files td:nth-child(2), .iv-files th:nth-child(4), .iv-files td:nth-child(4) { display: none; }
  .iv-files td:first-child { min-width: 150px; }
  .iv-acts .btn span { display: none; }
}
