/* Dictionary page: the word list, the prompt-revision strip and the word card
 * (pages/dictionary_browse.js, dictionary_detail*.js). Only the theme tokens of
 * style.css are used, so every panel theme works unchanged. */

.dict-badge-muted { background: var(--bg3); color: var(--text2); }
.dict-grow { flex: 1; }
.dict-empty { text-align: center; color: var(--text2); padding: 20px; }
.dict-cell-note { font-size: 11px; color: var(--text2); margin-top: 2px; }
.dict-total { font-size: 14px; color: var(--text2); font-weight: 400; }
.dict-word { color: var(--primary); }

/* ── Revision strip ── */
.dict-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
    padding: 10px 14px; margin-bottom: 14px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.dict-strip-part { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.dict-strip-actions { display: flex; gap: 6px; margin-left: auto; }
.dict-meter {
    display: inline-block; width: 90px; height: 4px; overflow: hidden;
    background: var(--bg3); border-radius: 2px;
}
.dict-meter > span { display: block; height: 100%; background: var(--success); }

/* ── Filters, table, pager ── */
.dict-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dict-check { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.dict-check input { width: auto; margin: 0; }
.dict-table-wrap { overflow-x: auto; }
.dict-row { cursor: pointer; }
.dict-col-meaning {
    max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2);
}
.dict-col-actions { white-space: nowrap; }
.dict-rev-line { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.dict-rev-line + .dict-rev-line { margin-top: 4px; }
.dict-pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dict-pager-buttons { display: flex; gap: 6px; align-items: center; font-size: 13px; }

/* ── Word card ── */
.modal.dict-modal {
    width: 92%; max-width: 880px; max-height: 92vh; padding-bottom: 0; overflow-wrap: anywhere;
}
.dict-card-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
.dict-card-head h2 { font-size: 24px; margin: 0; color: var(--primary); }
.dict-reading { color: var(--text2); font-style: italic; }
.dict-sources { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; }
.dict-source {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
    padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
}
.dict-source-key { font-weight: 600; min-width: 80px; }
.dict-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.dict-tab {
    background: transparent; border: 1px solid transparent; border-bottom: 0; color: var(--text2);
    padding: 6px 14px; border-radius: var(--radius) var(--radius) 0 0; cursor: pointer; font: inherit;
}
.dict-tab:hover { color: var(--text); }
.dict-tab.active { background: var(--bg); border-color: var(--border); color: var(--primary); font-weight: 600; }

.dict-block { margin-bottom: 10px; }
.dict-block h4 {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text2);
    margin: 0 0 4px; font-weight: 600;
}
.dict-block-body { line-height: 1.55; }
.dict-sense {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px; margin-bottom: 12px;
}
.dict-sense-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 15px; }
.dict-sense-no {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700;
    background: var(--primary); color: var(--on-primary);
}
.dict-example {
    background: var(--bg2); border-left: 3px solid var(--primary);
    padding: 8px 12px; margin-bottom: 6px; border-radius: 0 var(--radius) var(--radius) 0;
}
.dict-example-text { font-weight: 500; }
.dict-example-translation { color: var(--success); font-size: 13px; }
.dict-example-note { color: var(--text2); font-size: 12px; margin-top: 2px; }
.dict-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dict-chip {
    display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 13px;
    background: var(--bg2); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
a.dict-chip:hover { border-color: var(--primary); color: var(--primary); }
.dict-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.dict-family th, .dict-family td { padding: 6px 10px; font-size: 13px; }
.dict-raw { margin: 14px 0 4px; }
.dict-raw summary { cursor: pointer; color: var(--text2); font-size: 13px; margin-bottom: 8px; }
.dict-raw pre { max-height: 50vh; overflow: auto; word-break: break-all; margin-top: 8px; }
.dict-modal-actions {
    position: sticky; bottom: 0; align-items: center; flex-wrap: wrap;
    background: var(--bg2); border-top: 1px solid var(--border); padding: 10px 0 14px; margin-top: 14px;
}

/* Sözlük yenileme page (dictionary_refresh*.js, dictionary_prompt_upgrade.js) */
.pu-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 10px 0; }
.pu-tile { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.pu-tile .label { font-size: 12px; color: var(--text2); margin-bottom: 2px; }
.pu-tile .value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pu-tile small { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.pu-tile.ok .value { color: var(--success); }
.pu-tile.warn .value { color: var(--warning); }
.pu-tile.bad .value { color: var(--danger); }
.pu-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pu-chips, .pu-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pu-tabs { margin: 0 0 10px; }
.pu-tabs .btn.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pu-slider { display: flex; gap: 8px; align-items: center; }
.pu-slider input[type="range"] { flex: 1; min-width: 0; padding: 0; }
.pu-slider input[type="number"], .pu-key-input { width: 96px; }
.pu-state { font-size: 12px; font-weight: 600; }
.pu-state.ok { color: var(--success); }
.pu-state.warn, .pu-warn { color: var(--warning); }
.pu-state.bad { color: var(--danger); }
.pu-warn { font-size: 13px; }
input.pu-low { border-color: var(--warning); }
#pu-keys .pu-key-input { width: 96px; min-width: 0; flex: none; }
#pu-keys label.inline { white-space: normal; }
.pu-auto { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 400; }
.pu-auto input { width: auto; }
tr.pu-current td { background: var(--hover-tint); }

@media (max-width: 900px) {
    .dict-list { min-width: 860px; }
    .dict-strip-actions { margin-left: 0; }
    .dict-filters .filter-select, .dict-filters .search-box { flex: 1 1 150px; min-width: 0; max-width: none; }
    .modal.dict-modal { width: calc(100% - 16px); max-height: calc(100vh - 16px); padding: 14px 14px 0; }
    .dict-card-head h2 { font-size: 20px; }
    .dict-sense { padding: 10px 12px; }
    .dict-source-key { min-width: 0; }
    .dict-family { min-width: 480px; }
}
