/* Translation editor (translate.html only). Uses the theme tokens from site.css. */
.tr-lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.tr-lang { text-align: left; background: var(--card); color: var(--fg); border: 1px solid var(--line);
  border-radius: .5rem; padding: .85rem 1rem; cursor: pointer; }
.tr-lang:hover, .tr-lang:focus-visible { border-color: var(--accent); }
.tr-lang strong { display: block; }
.tr-lang small { color: var(--muted); }
.tr-progress { width: 140px; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; }
.tr-progress > div { height: 100%; width: 0; background: var(--accent); }
.tr-lang .tr-progress { width: 100%; margin-top: .5rem; }

.tr-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.tr-layout { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 1rem; align-items: start; }
.tr-list-pane, .tr-edit-pane { background: var(--card); border: 1px solid var(--line); border-radius: .5rem; }
.tr-edit-pane { padding: 1rem 1.25rem; min-height: 320px; }
.tr-filters { display: flex; gap: .5rem; padding: .6rem; border-bottom: 1px solid var(--line); }
.tr-filters select { max-width: 9.5rem; }
.tr-list { list-style: none; margin: 0; padding: 0; max-height: 65vh; overflow-y: auto; }
.tr-list li { margin: 0; }
.tr-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: var(--fg); padding: .55rem .8rem .55rem 1.6rem; position: relative; cursor: pointer; }
.tr-item:hover, .tr-item[aria-selected="true"] { background: var(--accent-soft, rgba(47, 111, 219, .12)); }
.tr-item .tr-src { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-item .tr-cur { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .85rem; }
.tr-item::before { content: ""; position: absolute; left: .7rem; top: 1.05rem; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--line); }
.tr-item[data-state="review"]::before { background: #e0a100; }
.tr-item[data-state="approved"]::before { background: var(--grass, #3a9d4a); }

.tr-source { background: var(--code-bg, rgba(0, 0, 0, .25)); border-radius: .4rem; padding: .6rem .8rem; font-family: ui-monospace, monospace;
  white-space: pre-wrap; word-break: break-word; }
.tr-hint { color: var(--muted); }
.tr-hint.bad { color: var(--danger-fg, #ff6b6b); }
.ph { background: var(--accent-soft, rgba(47, 111, 219, .25)); border-radius: .2rem; padding: 0 .15rem; }

.tr-suggestions { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.tr-suggestions li { border: 1px solid var(--line); border-radius: .4rem; padding: .55rem .75rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.tr-suggestions li.approved { border-color: var(--grass, #3a9d4a); }
.tr-suggestions .tr-sug-text { flex: 1 1 14rem; word-break: break-word; }
.tr-suggestions .tr-sug-by { color: var(--muted); font-size: .8rem; }

@media (max-width: 768px) {
  .tr-layout { grid-template-columns: 1fr; }
  .tr-list { max-height: 40vh; }
}
