/* Translation status module */

:root {
    --ts-done: #16a34a;
    --ts-unpublished: #3b82f6;
    --ts-outdated: #f97316;
    --ts-partial: #eab308;
    --ts-missing: #cbd5e1;
    --ts-warn: #dc2626;
    --ts-border: #e3e8ef;
    --ts-muted: #606d7b;
}

/* Colour keys */
.ts-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ts-missing);
    vertical-align: middle;
}

.ts-done {
    background: var(--ts-done);
}

.ts-unpublished {
    background: var(--ts-unpublished);
}

.ts-outdated {
    background: var(--ts-outdated);
}

.ts-partial {
    background: var(--ts-partial);
}

.ts-missing {
    background: var(--ts-missing);
}

.ts-na {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--ts-missing);
}

.ts-code {
    display: inline-block;
    min-width: 2.2em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ts-warn {
    display: inline-block;
    padding: 0 6px;
    border-radius: 9px;
    background: #fee2e2;
    color: var(--ts-warn);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap;
}

.ts-queued {
    display: inline-block;
    padding: 0 6px;
    border-radius: 9px;
    background: #ede9fe;
    color: #6d28d9;
    font-size: 11px;
    line-height: 18px;
    white-space: nowrap;
}

/* Stacked bar */
.ts-bar {
    display: flex;
    overflow: hidden;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #eef1f5;
}

.ts-bar-seg {
    display: block;
    height: 100%;
}

/* Entry index column */
.ts-strip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ts-dots {
    display: inline-flex;
    gap: 2px;
}

.ts-dots .ts-dot {
    width: 6px;
    height: 10px;
    border-radius: 2px;
}

.ts-strip-count {
    color: var(--ts-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* Pages */
.ts-page h2.ts-heading {
    margin: 32px 0 12px;
}

.ts-page h2.ts-heading:first-of-type {
    margin-top: 24px;
}

.ts-intro {
    margin: 0 0 8px;
    color: var(--ts-muted);
}

.ts-hint {
    margin: -4px 0 12px;
}

.ts-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ts-callout {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #f3f7fc;
}

.ts-callout-warn {
    background: #fff7ed;
    color: #9a3412;
}

.ts-problems p,
.ts-problems ul {
    margin: 0 0 6px;
}

.ts-problems ul {
    padding-left: 18px;
    list-style: disc;
}

.ts-problems p:last-child {
    margin-bottom: 0;
}

.ts-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
}

.ts-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Languages table */
.ts-languages th[scope='row'] {
    font-weight: normal;
    white-space: nowrap;
}

.ts-lang-link {
    margin-inline-end: 6px;
}

.ts-col-bar {
    width: 30%;
    min-width: 180px;
}

.ts-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ts-progress .ts-bar {
    height: 8px;
    border-radius: 4px;
}

.ts-percent {
    min-width: 3.2em;
    color: var(--ts-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: end;
}

.ts-num {
    text-align: end !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ts-num .ts-dot {
    margin-inline-end: 5px;
}

/* Sections × languages */
.ts-matrix-wrap {
    overflow-x: auto;
}

.ts-matrix {
    border-collapse: separate;
    border-spacing: 3px;
}

.ts-matrix th,
.ts-matrix td {
    padding: 0 !important;
    border: 0 !important;
}

.ts-matrix .ts-matrix-group {
    padding-inline-end: 12px !important;
    font-weight: normal;
    white-space: nowrap;
}

.ts-matrix-head {
    text-align: center;
}

.ts-matrix-head a {
    display: block;
    padding: 4px 0;
    font-weight: 600;
}

.ts-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 46px;
    padding: 5px 6px 6px;
    border-radius: 5px;
    background: #f3f5f8;
    color: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

a.ts-cell:hover {
    box-shadow: inset 0 0 0 1px #9aa5b1;
}

.ts-cell .ts-bar {
    height: 4px;
    background: rgba(0, 0, 0, 0.06);
}

.ts-cell-empty {
    background: transparent;
    color: var(--ts-missing);
}

.ts-cell-missing {
    color: var(--ts-muted);
}

.ts-cell-progress {
    background: #eef2f7;
}

.ts-cell-partial {
    background: #fef9c3;
}

.ts-cell-outdated {
    background: #ffedd5;
}

.ts-cell-unpublished {
    background: #dbeafe;
}

.ts-cell-done {
    background: #dcfce7;
    color: var(--ts-done);
    font-weight: 600;
}

/* Language page */
.ts-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ts-states {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ts-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 14px;
    background: #f3f5f8;
    color: inherit !important;
    font-size: 13px;
    text-decoration: none !important;
}

.ts-filter:hover {
    background: #e6eaf0;
}

.ts-filter.active {
    background: #33404d;
    color: #fff !important;
}

.ts-count {
    color: var(--ts-muted);
    font-variant-numeric: tabular-nums;
}

.ts-filter.active .ts-count {
    color: #cbd5e1;
}

.ts-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ts-when {
    white-space: nowrap;
}

.ts-row-actions .btn + .btn {
    margin-inline-start: 4px;
}

.ts-bulk {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.ts-zilch {
    padding: 48px 0;
}

/* Entry sidebar panel */
.ts-panel-body {
    padding: 10px var(--pane-padding, 24px) 12px !important;
}

.ts-panel-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-bottom: 8px;
    font-size: 12px;
}

.ts-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ts-langs {
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.ts-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    margin: 0 -6px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.ts-lang:hover {
    background: rgba(0, 0, 0, 0.035);
}

.ts-lang.ts-current {
    background: #eef3fb;
}

.ts-lang-name {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: baseline;
    gap: 4px;
    color: inherit !important;
}

.ts-lang-full {
    overflow: hidden;
    color: var(--ts-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-lang-state {
    color: var(--ts-muted);
    font-size: 12px;
    white-space: nowrap;
}

.ts-lang-missing .ts-lang-state,
.ts-lang-partial .ts-lang-state,
.ts-lang-outdated .ts-lang-state {
    color: #33404d;
}

.ts-lang-actions {
    display: flex;
    gap: 6px;
}

.ts-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--link-color, #0b69a3);
    cursor: pointer;
    font-size: 12px;
}

.ts-link:hover {
    text-decoration: underline;
}

.ts-link.loading {
    opacity: 0.5;
    cursor: wait;
}

.ts-link-quiet {
    visibility: hidden;
}

.ts-lang:hover .ts-link-quiet,
.ts-link-quiet:focus {
    visibility: visible;
}

.ts-translate-all {
    width: 100%;
}

.ts-panel-note {
    margin: 10px 0 0;
    font-size: 12px;
}

/* Settings */
.ts-settings h2 {
    margin-top: 24px;
}

.ts-settings-codes .text {
    width: 100%;
}
