/* Store listing: tabs, the language × field table, the editor with its
   reference text and counters, the review sheet, the change bar. */

.store-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0 0 var(--s4); }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--select); color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.chip.is-draft { background: var(--accent-soft); color: var(--accent-text); }
.chip.is-bad { background: var(--bad-bg); color: var(--bad); }
.tag.is-warn { background: var(--warn-bg); color: var(--warn); }
.warning.is-bad { background: var(--bad-bg); color: var(--bad); }
.linkish { border: 0; padding: 0; background: none; color: var(--accent-text); font: inherit; font-size: 12px; cursor: pointer; }
.linkish:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- status marks */

.st {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  font-size: 11px; font-weight: 700; line-height: 1; flex: none;
}
.st-same { color: var(--ok); background: color-mix(in srgb, var(--ok-dot) 16%, transparent); }
.st-edited { color: var(--accent-text); background: var(--accent-soft); }
.st-stale { color: var(--warn); background: var(--warn-bg); }
.st-empty { color: var(--ink-2); background: var(--select); }
.st-problem { color: #fff; background: var(--bad-dot); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- tables */

.matrix-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 7px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
.matrix thead th { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); }
.matrix tbody th { text-align: start; font-weight: 500; }
.matrix tbody tr:last-child > * { border-bottom: 0; }
.matrix.is-wide td, .matrix.is-wide th { text-align: start; }
.matrix th .tag { margin-inline-start: 6px; }
.matrix .cell { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; }
.matrix .cell:hover .st { box-shadow: 0 0 0 2px var(--accent); }
.history td:last-child { white-space: normal; }

/* ---------------------------------------------------------------- listing */

.listing-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: var(--s5); align-items: start; }
.locale-list { position: sticky; top: 140px; display: grid; gap: 1px; max-height: calc(100vh - 220px); overflow-y: auto; }
.locale-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 34px; padding: 4px 8px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; font-size: 13px; text-align: start; cursor: pointer;
}
.locale-item:hover { background: var(--hover); }
.locale-item.is-current { background: var(--select); font-weight: 600; }
.locale-name { display: grid; line-height: 1.25; }
.locale-name .small { font-weight: 400; }
.locale-editor { min-width: 0; }
.editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.editor-head h2 { margin: 0; }
.editor-head h2 .tag { margin-inline-start: 8px; vertical-align: middle; }
.lfield { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.lfield:last-child { border-bottom: 0; }
.lfield-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lfield-head label { font-size: 12.5px; font-weight: 600; }
.lfield-tools { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 10px; }
.counter { font: 12px var(--mono); color: var(--ink-2); }
.counter.is-bad { color: var(--bad); font-weight: 600; }
.reference { margin: 0; font-size: 12.5px; color: var(--ink-2); max-width: none; white-space: pre-wrap; }
.reference summary { font-size: 12.5px; }
.kws { display: flex; flex-wrap: wrap; gap: 4px; }
.kw { padding: 1px 7px; border-radius: 5px; background: var(--select); font-size: 12px; }
.kw.is-dup { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
.kw.is-taken { background: var(--warn-bg); color: var(--warn); }
.listing-preview { position: sticky; top: 140px; display: grid; justify-items: center; gap: 6px; }
.listing-preview .small { margin: 0; }
.whats-new .lfield.is-primary { padding-top: 4px; }

.version-input { width: 8rem; }
.two { display: grid; grid-template-columns: 1fr 1.6fr; gap: 0 var(--s4); }

/* ---------------------------------------------------------------- stepper */

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.tl-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding-bottom: 18px; }
.tl-step::before { content: ''; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--line); }
.tl-step:last-child { padding-bottom: 0; }
.tl-step:last-child::before { display: none; }
.tl-step.is-done::before { background: var(--ok-dot); }
.tl-marker {
  position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: 12.5px; font-weight: 700;
  transition: background-color var(--t-fast, 140ms) ease, color var(--t-fast, 140ms) ease;
}
.tl-step.is-current .tl-marker { background: var(--accent); color: #fff; box-shadow: none; }
.tl-step.is-done .tl-marker { background: var(--ok-dot); color: #fff; box-shadow: none; }
.tl-title { padding: 0; border: 0; background: none; color: var(--ink); font: 600 14.5px/28px var(--font-display); text-align: start; cursor: pointer; }
.tl-title:disabled { color: var(--ink-2); cursor: default; }
.tl-content { padding: 2px 0 4px; animation: page-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.tl-content p { margin: 6px 0; }
.tl-content code, .tl-content dd { overflow-wrap: anywhere; }
.tl-content code { white-space: normal; }
.tl-summary { margin: 0; }
.keydrop { margin: 10px 0; padding: 18px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); text-align: center; font-size: 13.5px; }
.keydrop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.keydrop.is-ready { border-style: solid; border-color: var(--ok-dot); }
.keydrop .linkish { font-size: 13.5px; }

/* ---------------------------------------------------------------- languages */

.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin: var(--s3) 0; }
.pick { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.pick .small { margin-inline-start: auto; }
.confirm { max-width: 32rem; }
.confirm h2 { margin-top: 0; }

.thumbs { display: flex; gap: 4px; }
.thumbs img { height: 64px; width: auto; border-radius: 4px; box-shadow: var(--shadow-1); }
ul.plain { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.matrix td { vertical-align: middle; }

/* ---------------------------------------------------------------- review */

.review { min-width: min(80vw, 760px); }
.review-title { margin: 0 0 var(--s2); }
.diff-locale { margin: var(--s4) 0; }
.diff-locale h3 { margin-bottom: var(--s2); }
.diff-row { padding: 10px 12px; margin: 6px 0; background: var(--surface-2); border-radius: var(--r-md); }
.diff-head { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.diff-sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: 8px; }
.diff-side p { margin: 2px 0 0; white-space: pre-wrap; font-size: 13px; max-width: none; }
.diff-label { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.diff-side.is-before p { color: var(--ink-2); }
.diff-side summary { white-space: pre-wrap; font-size: 13px; color: inherit; }
.blocked { margin: var(--s4) 0; }
.blocked ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 13px; color: var(--ink-2); }
.review-foot { display: flex; gap: var(--s2); margin-top: var(--s4); }

/* ---------------------------------------------------------------- change bar */

.change-bar {
  position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: var(--s5) calc(-1 * var(--s6)) calc(-1 * var(--s7)); padding: 10px var(--s6);
  background: var(--bar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line); font-size: 13px;
}
.change-actions { display: flex; gap: var(--s2); }

@media (max-width: 1200px) {
  .listing-grid { grid-template-columns: 190px minmax(0, 1fr); }
  .listing-preview { display: none; }
}

@media (max-width: 760px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .listing-grid { grid-template-columns: minmax(0, 1fr); }
  .locale-list { position: static; display: flex; overflow-x: auto; max-height: none; }
  .locale-item { flex: none; }
  .diff-sides { grid-template-columns: minmax(0, 1fr); }
  .review { min-width: 0; }
  .change-bar { margin: var(--s5) calc(-1 * var(--s4)) -40px; padding: 10px var(--s4); }
}
