/* Form controls that look the same everywhere: checkbox, radio and select in the app's own colours (light and dark). */
input[type=checkbox], input[type=radio] {
  appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; padding: 0;
  border: 1.5px solid var(--border-strong); background: var(--surface) center / 100% no-repeat; cursor: pointer; vertical-align: -4px;
  transition: background-color .12s, border-color .12s, box-shadow .12s; }
input[type=checkbox] { border-radius: 5px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--brand); }
input[type=checkbox]:checked, input[type=radio]:checked { background-color: var(--brand); border-color: var(--brand); }
input[type=checkbox]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type=radio]:checked { background-image: radial-gradient(circle, #fff 0 32%, transparent 36%); }
input[type=checkbox]:indeterminate { background-color: var(--brand); border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8h7' stroke='white' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: none; box-shadow: var(--ring); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .45; cursor: not-allowed; }
:root[data-theme="dark"] input[type=checkbox]:checked, :root[data-theme="dark"] input[type=radio]:checked { border-color: var(--brand); }

/* a label with a checkbox: box and text on one line, the whole line clickable */
label.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; line-height: 1.4; }
label.check input { margin-top: 1px; }

select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
select[multiple] { background-image: none; padding-right: 10px; }
select:disabled { opacity: .6; cursor: not-allowed; }

/* search fields look like the other text fields (the browser's own search style is rounder and smaller) */
input[type=search] { appearance: none; -webkit-appearance: none; font: inherit; padding: 8px 12px; min-height: 36px; box-sizing: border-box; }
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }

/* the bar over a list: search grows, filters keep one height, the live note and Refresh sit at the end */
.toolbar > * { min-height: 36px; box-sizing: border-box; }
.toolbar input[type=search], .toolbar input[type=text] { flex: 1 1 150px; width: auto; min-width: 150px; max-width: 340px; }
.toolbar select { min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.toolbar .seg { align-items: center; min-height: 36px; padding: 2px; }
.toolbar .btn-sm { padding: 6px 14px; font-size: 13px; }
.toolbar .muted.small { display: inline-flex; align-items: center; gap: 6px; }
.toolbar .grow { flex: 1 1 0; min-width: 0; }
.toolbar .live-dot + * , .toolbar .muted.small { white-space: nowrap; }

/* tables that hold sentences, not codes: the text wraps instead of being cut off with "…" */
table.wrap-text td, table.wrap-text th { white-space: normal; max-width: none; text-overflow: clip; overflow: visible; }
/* the tables in the PoV Academy chapters are text: never cut a sentence off */
.chapter table td, .chapter table th { white-space: normal; max-width: none; text-overflow: clip; overflow: visible; }
