/* TokenForge additions to the builder's "Form submissions" screen.
   Everything sits inside .tf-skin (the --tf-* colour tokens come from admin.css).
   The builder's own table is not restyled; the only rules that reach it are the
   unread row weight and the hidden-column class. */

/* Rows and columns of the builder's table */
.wp-list-table tr.tf-subs-unread td { font-weight: 600; }
.wp-list-table .tf-subs-off { display: none !important; }

.tf-skin [hidden] { display: none !important; }
.tf-skin *,
.tf-skin *::before,
.tf-skin *::after { box-sizing: border-box; }
.tf-skin :focus-visible { outline: 2px solid var(--tf-accent); outline-offset: 2px; }
.tf-skin .tf-subs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Inside the ID cell */
.tf-skin.tf-subs-tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: 8px; font-weight: 400; }
.tf-skin .tf-subs-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; color: var(--tf-link); text-decoration: underline; }

/* Marks */
.tf-skin .tf-subs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tf-accent); flex: none; }
.tf-skin .tf-subs-chip { display: inline-block; padding: 0 6px; border: 1px solid var(--tf-line); border-radius: var(--tf-radius); background: var(--tf-panel-2); color: var(--tf-text); font-size: 11px; line-height: 18px; }
.tf-skin .tf-subs-chip[data-status="done"] { border-color: var(--tf-ok); color: var(--tf-ok); }
.tf-skin .tf-subs-chip[data-status="spam"] { border-color: var(--tf-err); color: var(--tf-err); }

/* Buttons and fields */
.tf-skin .tf-subs-btn,
.tf-skin .tf-subs-x { font: inherit; font-size: 13px; line-height: 1.4; padding: 5px 10px; min-height: 30px; border: 1px solid var(--tf-line-hover); border-radius: var(--tf-radius); background: var(--tf-panel-3); color: var(--tf-text); cursor: pointer; }
.tf-skin .tf-subs-btn:hover:not(:disabled),
.tf-skin .tf-subs-x:hover { border-color: var(--tf-accent); }
.tf-skin .tf-subs-btn:disabled { opacity: .5; cursor: default; }
.tf-skin .tf-subs-btn.is-primary { background: var(--tf-accent); border-color: var(--tf-accent); color: var(--tf-on-accent); }
.tf-skin select,
.tf-skin input[type="search"],
.tf-skin input[type="text"],
.tf-skin input[type="email"],
.tf-skin input[type="tel"],
.tf-skin input[type="url"],
.tf-skin input[type="number"],
.tf-skin textarea { font: inherit; font-size: 13px; padding: 4px 8px; min-height: 30px; border: 1px solid var(--tf-line-hover); border-radius: var(--tf-radius); background: var(--tf-panel-2); color: var(--tf-text); max-width: 100%; }
.tf-skin textarea { width: 100%; }
/* wp-admin recolours fields on hover and focus (dark text): keep the token colours. */
.tf-skin :is(select, input, textarea):is(:hover, :focus) { color: var(--tf-text); background-color: var(--tf-panel-2); }
.tf-skin .tf-subs-field { display: flex; flex-direction: column; gap: 3px; }
.tf-skin .tf-subs-field label,
.tf-skin .tf-subs-fl { font-size: 12px; color: var(--tf-muted); }
.tf-skin .tf-subs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tf-skin .tf-subs-empty,
.tf-skin .tf-subs-hint { color: var(--tf-faint); }

/* Bulk buttons in the builder's top bar */
.tf-skin.tf-subs-bulk { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; float: left; margin: 0 8px 4px 0; }
.tf-skin .tf-subs-bulknote { color: var(--tf-muted); font-size: 12px; background: none; }

/* Search bar and results */
.tf-skin.tf-subs-search { margin: 12px 0; padding: 12px; background: var(--tf-panel); color: var(--tf-text); border: 1px solid var(--tf-line); border-radius: var(--tf-radius-l); font-size: 13px; }
.tf-skin .tf-subs-scope { margin: 0 0 8px; color: var(--tf-muted); }
.tf-skin .tf-subs-searchform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
.tf-skin .tf-subs-colpanel { margin-top: 10px; padding: 10px; background: var(--tf-panel-2); border: 1px solid var(--tf-line); border-radius: var(--tf-radius); }
.tf-skin .tf-subs-collist { list-style: none; margin: 0 0 8px; padding: 0; max-height: 280px; overflow: auto; }
.tf-skin .tf-subs-collist li { display: flex; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--tf-line); }
.tf-skin .tf-subs-collist label { flex: 1; color: var(--tf-text); }
.tf-skin .tf-subs-collist .tf-subs-btn { padding: 0 8px; min-height: 26px; }
.tf-skin .tf-subs-results { margin-top: 12px; }
.tf-skin .tf-subs-rh { margin: 0 0 8px; font-size: 14px; color: var(--tf-text); }
.tf-skin .tf-subs-hits { list-style: none; margin: 0; padding: 0; }
.tf-skin .tf-subs-hit { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; text-align: left; font: inherit; padding: 8px 10px; margin: 0 0 4px; background: var(--tf-panel-2); color: var(--tf-text); border: 1px solid var(--tf-line); border-radius: var(--tf-radius); cursor: pointer; }
.tf-skin .tf-subs-hit:hover { border-color: var(--tf-accent); }
.tf-skin .tf-subs-hit.is-unread .tf-subs-hitid { font-weight: 700; }
.tf-skin .tf-subs-hitmeta { color: var(--tf-muted); font-size: 12px; }
.tf-skin .tf-subs-hitsum { flex: 1 1 100%; color: var(--tf-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-skin .tf-subs-paging { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

/* Detail dialog */
.tf-skin .tf-subs-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--tf-line); border-radius: var(--tf-radius-l); background: var(--tf-panel); color: var(--tf-text); font-size: 13px; line-height: 1.45; }
.tf-skin .tf-subs-dialog[open] { display: flex; flex-direction: column; }
.tf-skin .tf-subs-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.tf-skin .tf-subs-dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--tf-line); }
.tf-skin .tf-subs-dtitle { margin: 0; font-size: 16px; color: var(--tf-text); }
.tf-skin .tf-subs-dsub { margin: 2px 0 0; color: var(--tf-muted); }
.tf-skin .tf-subs-x { padding: 0 10px; font-size: 18px; }
.tf-skin .tf-subs-dbody { flex: 1; overflow: auto; padding: 12px 16px; }
.tf-skin .tf-subs-h { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--tf-muted); }
.tf-skin .tf-subs-h:first-child { margin-top: 0; }
.tf-skin .tf-subs-handle { margin-top: 14px; }
.tf-skin .tf-subs-dl { display: grid; grid-template-columns: minmax(110px, 28%) 1fr; gap: 6px 12px; margin: 0; }
.tf-skin .tf-subs-dl dt { color: var(--tf-muted); }
.tf-skin .tf-subs-dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tf-skin .tf-subs-dl a,
.tf-skin .tf-subs-dialog a { color: var(--tf-link); }
.tf-skin .tf-subs-handle,
.tf-skin .tf-subs-editlist { display: grid; gap: 10px; }
.tf-skin .tf-subs-dbody > .tf-subs-actions { margin-top: 12px; }
.tf-skin .tf-subs-msg { margin: 0; padding: 0 16px; min-height: 20px; color: var(--tf-ok); }
.tf-skin .tf-subs-msg.is-err { color: var(--tf-err); }
.tf-skin .tf-subs-dfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--tf-line); }
.tf-skin .tf-subs-pos { color: var(--tf-muted); }

@media (max-width: 600px) {
	.tf-skin .tf-subs-dl { grid-template-columns: 1fr; gap: 0; }
	.tf-skin .tf-subs-dl dd { margin-bottom: 8px; }
}
.wp-list-table td.column-id { white-space: nowrap; } /* keeps the unread dot beside the View link */
