/* modal-files.css — поля «Комментарий» и «Файлы к задаче» в модалке «Обсудить проект».
   Подключать после main.css. */

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 20px 24px;
  border: 1px dashed #3F424D;
  background: #11151B;
  color: #9397AB;
  text-align: center;
  cursor: pointer;
  transition: border-color 200ms, background 200ms, color 200ms;
}
.dropzone:hover,
.dropzone.is-over {
  border-color: var(--accent, #E30613);
  background: rgba(var(--accent-rgb, 227, 6, 19), .06);
  color: #E9E9ED;
}
.dropzone:focus-within { outline: 2px solid var(--accent, #E30613); outline-offset: 2px; }

/* сам input скрыт визуально, но доступен клавиатуре и экранным дикторам */
.dropzone__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.dropzone__icon { color: var(--accent, #E30613); margin-bottom: 4px; }
.dropzone__title { font-size: 14.5px; color: #E9E9ED; }
.dropzone__title u { text-decoration-color: rgba(var(--accent-rgb, 227, 6, 19), .7); text-underline-offset: 3px; }
.dropzone__hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .04em;
  color: #75798C;
}

/* список выбранных файлов */
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.file-list:empty { display: none; }
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  border: 1px solid #292B31;
  background: #141922;
}
.file-item__badge {
  flex: none;
  min-width: 38px;
  padding: 3px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-align: center;
  color: #fff;
  background: var(--accent, #E30613);
}
.file-item__badge[data-kind="img"] { background: var(--cool, #0066FF); }
.file-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  color: #E9E9ED;
}
.file-item__size { flex: none; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: #75798C; }
.file-item__remove {
  flex: none;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  background: transparent;
  color: #9397AB;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.file-item__remove:hover { color: #fff; }
.file-item__remove:focus-visible { outline: 2px solid var(--accent, #E30613); }

.field-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--accent-text, #FF4D57);
}

/* ---------- Комментарий ---------- */
.field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid #292B31;
  background: #11151B;
  color: #E9E9ED;
  font: 14.5px/1.55 'Inter', sans-serif;
}
.field textarea::placeholder { color: #595D6C; }
.field textarea:focus { outline: none; border-color: var(--accent, #E30613); }
.field-counter {
  justify-self: end;
  margin-top: -2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #595D6C;
}
.field-counter.is-near { color: var(--accent-text, #FF4D57); }
/* поле файлов идёт сразу под комментарием */
.field textarea + .field-counter + * { margin-top: 0; }
