/*
 * Owner 2026-10-13 ("bu tür hiç bir sorun istemiyorum"): tables sized by their content instead of equal fixed columns
 * (short values no longer break into one word per line) and never cut off by a narrow card or side panel — a wide
 * table scrolls inside its own box. Loaded after admin.css.
 */
.content-hub-table:not(.posts-list-table) { table-layout: auto; min-width: 0; }
.content-hub-table th { white-space: nowrap; }
.content-hub-table td { overflow-wrap: normal; word-break: normal; }
.content-hub-table td small, .content-hub-table td .muted { overflow-wrap: anywhere; }

/* Side panels (detail drawers) and cards: the table keeps its natural width and scrolls sideways when needed. */
.content-editor-side .content-hub-table,
.content-editor-side .wp-list-table,
.class-show-overview-card .content-hub-table,
.card .lms-terms .content-hub-table { min-width: 0; }
.content-editor-side .content-editor-panel,
.wp-list-table-wrap,
.class-show-overview-card,
.lms-terms,
.cat-detail-table-wrap { overflow-x: auto; }
.content-editor-side .content-hub-table td,
.content-editor-side .wp-list-table td { white-space: nowrap; }
.content-editor-side .content-hub-table td:first-child,
.content-editor-side .wp-list-table td:first-child { white-space: normal; min-width: 9rem; }

/* Definition lists in side panels: label column never squeezes the value into a sliver. */
.content-editor-side .cat-detail-dl { grid-template-columns: minmax(6.5rem, 9rem) minmax(0, 1fr); }

/* Cells may wrap (the table always fits its card) but never below a readable width; badges, buttons, codes and
   dates inside a cell never break. */
.content-hub-table:not(.posts-list-table) td:not(:first-child) { min-width: 6.5rem; }
.content-hub-table td .pill, .content-hub-table td .btn, .content-hub-table td code, .content-hub-table td .badge,
.content-hub-table td .mem-chip, .content-hub-table td time { white-space: nowrap; }
.content-hub-table td:last-child .btn + .btn, .content-hub-table td:last-child .btn + a, .content-hub-table td:last-child a + .btn { margin-left: 6px; }
/* Wide lists scroll inside their own card instead of overflowing the page. */
.content-hub-table-wrap, .content-hub .card, .mt-hub .card, .cat-hub .card { overflow-x: auto; }
/* The first column (title / name) keeps a readable width next to the one-line columns. */
.content-hub-table:not(.posts-list-table) td:first-child { min-width: 12rem; }
/* Wide lists with a form beside them: the list takes the full width, the forms line up below it. */
.cat-hub .cat-hub-layout.is-stacked { grid-template-columns: minmax(0, 1fr); }
.cat-hub .cat-hub-layout.is-stacked > aside, .cat-hub .cat-hub-layout.is-stacked > .editor-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; align-items: start; }

/* Role / permission matrix: compact cells so every role column fits at laptop widths. */
.idn-matrix th, .idn-matrix td { padding: 6px 5px; }
.idn-matrix th { font-size: 11px; letter-spacing: 0; }
/* Action buttons wrap to a second line rather than being cut off at the card edge. */
.content-hub-table td:last-child { white-space: normal; }
.content-hub-table td:last-child > div, .content-hub-table td .row-actions, .content-hub-table td .content-hub-actions { flex-wrap: wrap; row-gap: 6px; }
.content-hub-table td:last-child .btn { margin-top: 3px; margin-bottom: 3px; }
/* Laptop widths: tables inside panels drop the per-cell minimum, matrix role names may wrap. */
.content-editor-panel .content-hub-table td:not(:first-child) { min-width: 0; }
.idn-matrix th { white-space: normal; }
.card-table .content-hub-table { width: 100%; }
.content-editor-panel .content-hub-table:not(.posts-list-table) td:first-child { min-width: 8rem; }
.content-editor-panel .content-hub-table th { white-space: normal; }
.card-table.table-wrap { overflow-x: auto; }
.card-table.table-wrap > .content-hub-table { min-width: 0 !important; width: 100% !important; }
.card-table.table-wrap > .content-hub-table:not(.posts-list-table) td:first-child { min-width: 9rem; }
/* Many-column reports: no per-cell minimum; marked cells (dates) stay on one line. */
.content-hub-table.is-dense td:not(:first-child), .content-hub-table.is-dense td:first-child { min-width: 0; }
.content-hub-table td.is-nowrap { white-space: nowrap; }
.content-hub-table.is-dense th { white-space: normal; }
