/* Translation review page. Colours from docs/assets/css/site.css. */
:root {
  --primary: #853953;
  --primary-dark: #612d53;
  --primary-faint: #f9f0f4;
  --neutral: #2c2c2c;
  --muted: #5f6368;
  --surface: #f3f4f4;
  --line: #dcdedf;
  --ok: #15803d;
  --warn-text: #8c6708;
  --warn-bg: #fef8e8;
  --warn-border: #f0dfa0;
  --error: #b42318;
  font:
    16px/1.5 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--neutral);
  background: var(--surface);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding-bottom: 5rem;
}
header,
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
header {
  padding-top: 1.5rem;
}
h1 {
  color: var(--primary-dark);
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}
header > p {
  max-width: 70ch;
  margin: 0 0 0.5rem;
}
.rules {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}
code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.5rem;
}
.controls label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--muted);
}
.controls .todo-only {
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-end;
  padding-bottom: 0.4rem;
  font-size: 1rem;
  color: var(--neutral);
  cursor: pointer;
}
.todo-only input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
}
select,
input,
textarea,
button {
  font: inherit;
}
select,
input[type="search"] {
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--neutral);
  min-width: 12rem;
}
.progress {
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.9rem;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.key {
  color: var(--muted);
  font-size: 0.8rem;
  word-break: break-all;
}
.status {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--warn-text);
}
.status[data-state="ok"] {
  color: var(--ok);
}
.status[data-state="pending"] a {
  color: var(--primary);
}
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (max-width: 720px) {
  .cols {
    grid-template-columns: 1fr;
  }
}
.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.english,
.translation {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  flex: 1;
}
.english {
  background: var(--surface);
}
/* English under another comparison language: smaller, still readable. */
.source-label {
  margin-top: 0.5rem;
}
.english.source {
  flex: 0 0 auto;
  font-size: 0.875rem;
  color: var(--muted);
}
.translation,
.note {
  width: 100%;
  border: 1px solid var(--line);
  resize: vertical;
  /* Grow with wrapped text so no part of a message is hidden (Chromium; others scroll). */
  field-sizing: content;
  background: #fff;
  color: inherit;
}
.translation:focus,
.note:focus,
select:focus,
input:focus,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.problems {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.problems li {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  margin-top: 0.3rem;
  font-size: 0.9rem;
}
.card-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-top: 0.6rem;
}
.ok {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.ok input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--ok);
}
.note {
  margin-top: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
.empty {
  color: var(--muted);
  padding: 2rem 0;
}

.bar {
  position: fixed;
  inset: auto 0 0 0;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.7rem 1.25rem;
  background: #fff;
  border-top: 1px solid var(--line);
}
.bar #pending {
  margin-right: auto;
  color: var(--muted);
}
button {
  padding: 0.45rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}
button:hover:not(:disabled) {
  background: var(--primary-dark);
}
button.ghost {
  background: #fff;
  color: var(--primary);
}
button.ghost:hover:not(:disabled) {
  background: var(--primary-faint);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.linkish,
button.linkish:hover {
  background: none;
  border: 0;
  padding: 0;
  color: var(--primary);
  text-decoration: underline;
}

dialog {
  border: 0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 32rem;
  width: calc(100% - 2rem);
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.4);
}
dialog h2 {
  margin-top: 0;
  color: var(--primary-dark);
}
dialog label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.8rem;
}
dialog input,
dialog textarea {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1rem;
}
.error {
  color: var(--error);
}
.hp {
  position: absolute;
  left: -9999px;
}
[hidden] {
  display: none !important;
}
