/* Форми: зведення помилок, стани полів з помилкою, список вибраних файлів, підказки.
   Лише токени app.css (світла і темна теми), без градієнтів і свічення. Підключається після checks.css. */

/* Зведення помилок над формою: рамка + фон + іконка + слова (не лише колір) */
.err-summary { max-width: 680px; margin: 16px 0 0; padding: 14px 18px; border: 1.5px solid var(--hi-tx); border-radius: 10px; background: var(--hi-bg); color: var(--hi-tx); }
.err-summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.err-title { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.err-title .ic { width: 20px; height: 20px; vertical-align: 0; }
.err-summary ul { margin: 0; padding-left: 28px; display: grid; gap: 4px; }
.err-summary li { color: var(--ink); }
.err-summary a { color: var(--hi-tx); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.err-summary a:hover { color: var(--ink); }
.err-summary a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Поле з помилкою: товща рамка, червоний текст помилки і підказка під полем */
.field.has-error input:not([type="file"]), .field.has-error textarea, .field.has-error select { border-color: var(--hi-tx); box-shadow: inset 0 0 0 1px var(--hi-tx); }
.field.has-error > label, .field.has-error > .pane-title { color: var(--hi-tx); }
.field.has-error .frow select, .field.has-error .frow input { border-color: var(--ctl); box-shadow: none; }
.field.has-error .drop { border-color: var(--hi-tx); border-style: solid; background: var(--hi-bg); }
.field .error { display: flex; gap: 6px; align-items: flex-start; }
.field .error::before { content: "!"; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--hi-tx); color: var(--hi-bg); font-size: .8rem; line-height: 18px; text-align: center; font-weight: 800; }
.field .hint { max-width: 62ch; }

/* Лічильник і список вибраних файлів */
.fcount { margin: 12px 0 0; font-weight: 600; color: var(--ink2); }
.fcount.is-over { color: var(--hi-tx); }
.flist:empty { display: none; }
.frow { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.frow .frm { min-height: 36px; white-space: nowrap; }
.frow .frm:hover { color: var(--hi-tx); background: var(--hi-bg); }
.frow .frm:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.frow .fnote { grid-column: 1 / -1; margin: 0; display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.frow .fnote .ic { margin-top: 2px; }
.frow.is-bad .ferr { color: var(--hi-tx); }
.frow.is-bad .fm { color: var(--hi-tx); }
.fadd { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) {
  .frow { grid-template-columns: auto minmax(0, 1fr); }
  .frow .fm { grid-column: 1; grid-row: 2; }
  .frow .frm { grid-column: 2; grid-row: 2; justify-self: end; }
  .err-summary { padding: 12px 14px; }
}

/* Режим «Відгуки учасників»: підказка над списком файлів і підсвітка рядків, коли жодну пропозицію не позначено
   (рамка + фон + текст у рядку + повідомлення aria-live, не лише колір) */
.bid-hint { margin: 12px 0 0; font-weight: 500; color: var(--ink2); }
.bid-live { margin: 8px 0 0; display: flex; gap: 6px; align-items: flex-start; font-weight: 600; color: var(--hi-tx); }
.bid-live:empty { display: none; }
.bid-live::before { content: "!"; flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--hi-tx); color: var(--hi-bg); font-size: .8rem; line-height: 18px; text-align: center; font-weight: 800; }
.frow.is-noprop { border-color: var(--hi-tx); box-shadow: inset 0 0 0 1px var(--hi-tx); background: var(--hi-bg); }
.frow.is-noprop .fopts label { color: var(--hi-tx); font-weight: 600; }
.frow .fnoprop { color: var(--hi-tx); font-weight: 600; }
