/* Папки задач и архив в списке веб-клиента (28.10.2026; разметка — js/ui/folders_view.js).
   Цвета — только переменные agent.css (у каждой есть тёмная пара). У кнопок цвет задан явно:
   кнопке без своего цвета Safari на iPhone даёт системный синий. */

.tasks__folder {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  min-height: var(--h-ctl-lg);
  white-space: nowrap;
}
.tasks__folder:hover { border-color: var(--gold); background: var(--chip-hover); }
/* Рядом с «Новой папкой» текст «Новой задачи» сжимался до двух строк — держим в одну. */
.tasks__head .tasks__new { white-space: nowrap; min-width: 0; }
.tasks__folder[hidden] { display: none; }

/* Строка задачи с меню: кнопка задачи и «⋯» рядом. */
.trow {
  display: flex;
  align-items: flex-start;
  padding-left: calc(var(--depth, 0) * 14px);
  border-radius: var(--r-sm);
}
.trow > .task { flex: 1 1 auto; min-width: 0; }
.task__path {
  display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px;
  color: var(--text-dim);
}

/* Строка папки. */
.frow {
  display: flex;
  align-items: center;
  padding-left: calc(var(--depth, 0) * 14px);
  border-radius: var(--r-sm);
}
.frow:hover { background: var(--chip-bg); }
.frow__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.frow__caret { flex: none; display: inline-flex; color: var(--text-dim); transition: transform .12s; }
.frow--open .frow__caret { transform: rotate(90deg); }
.frow__ico { flex: none; display: inline-flex; color: var(--ico-accent); }
.frow__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow--unread .frow__name { font-weight: 600; }
.frow__count { flex: none; font-size: 11px; color: var(--text-dim); }
.frow__marks { flex: none; display: inline-flex; gap: 3px; }
.frow__mark { width: 7px; height: 7px; border-radius: 50%; }
.frow__mark--unread { background: var(--text); }
.frow__mark--running { background: var(--gold-strong); animation: evpulse 1.3s ease-in-out infinite; }
.frow--archive { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0; }
.frow__note {
  margin: 2px 0 4px;
  padding-left: calc(var(--depth, 0) * 14px + 26px);
  font-size: 12px;
  color: var(--text-dim);
}

/* «⋯» и стрелки закреплённых: на компьютере — при наведении, на сенсорном экране — всегда. */
.frow__arrows { flex: none; display: inline-flex; }
.frow__more, .frow__arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 26px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}
.frow .frow__more, .frow .frow__arrow { margin-top: 0; }
.frow__more:hover, .frow__arrow:hover { background: var(--hover-tint); color: var(--text); }
.frow:hover .frow__more, .frow:hover .frow__arrow, .trow:hover .frow__more,
.frow__more:focus-visible, .frow__arrow:focus-visible, .frow:focus-within .frow__arrow { opacity: 1; }
@media (hover: none) {
  .frow__more, .frow__arrow { opacity: 1; }
}

/* Перетаскивание (только мышь). */
.dragging { opacity: .5; }
.drop-target { background: var(--soft-bg); box-shadow: inset 0 0 0 1px var(--gold); }
.tasks__list.drop-target { box-shadow: inset 0 0 0 1px var(--gold); background: none; }

/* Меню строки. */
.fmenu {
  position: fixed;
  z-index: 60;
  min-width: 180px;
  max-width: calc(100vw - 8px);
  display: flex;
  flex-direction: column;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.fmenu__item {
  padding: 8px 10px;
  border: 0;
  border-radius: var(--r-xs);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fmenu__item:hover, .fmenu__item:focus-visible { background: var(--chip-bg); outline: none; }
.fmenu__item--danger { color: var(--err-text); }

/* Окна папок: название, подтверждение, выбор папки. */
.fdlg__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fdlg__text { margin: 0; line-height: 1.45; }
.fdlg__input {
  width: 100%;
  box-sizing: border-box;
  min-height: var(--h-ctl);
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  outline: none;
}
.fdlg__input:focus { border-color: var(--gold); }
.fdlg__tree {
  max-height: 50vh;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.fdlg__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px calc(8px + var(--depth, 0) * 16px);
  border-radius: var(--r-xs);
  cursor: pointer;
}
.fdlg__opt:hover { background: var(--chip-bg); }
.fdlg__opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Телефон: поле 16px, иначе iOS увеличивает страницу при вводе (как у полей agent.css). */
@media (max-width: 860px) {
  .fdlg__input { font-size: 16px; }
}
