/* Shared controls. Colors come from the tokens of the page stylesheet. */
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle.floating { position: fixed; top: 14px; right: 14px; z-index: 30; }

.native-select { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.select { position: relative; display: block; min-width: 0; }
.select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 46px; padding: 0 12px 0 14px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px; font: 700 15px var(--sans); text-align: left; cursor: pointer; }
.select-trigger:hover, .select-trigger[aria-expanded="true"] { border-color: var(--accent); }
.select-value { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.select-chevron { flex: none; display: grid; place-items: center; width: 20px; height: 20px; color: var(--muted); transition: transform .15s ease; }
.select-trigger[aria-expanded="true"] .select-chevron { transform: rotate(180deg); }
.select-chevron svg, .select-check svg, .action-menu svg, .more-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.popover { position: fixed; z-index: 1000; overflow-y: auto; padding: 6px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgb(20 8 12 / .28); font-family: var(--sans); }
.select-list { margin: 0; list-style: none; outline: none; }
.select-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 42px; padding: 0 10px; border-radius: 9px; font-size: 15px; font-weight: 700; cursor: pointer; }
.select-list li.active { background: var(--soft); }
.select-list li[aria-selected="true"] { color: var(--accent); }
.select-check { flex: none; width: 18px; height: 18px; }

.action-menu button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 0 12px; color: var(--ink); background: none; border: 0; border-radius: 9px; font: 700 15px var(--sans); text-align: left; cursor: pointer; }
.action-menu button:hover, .action-menu button:focus { background: var(--soft); outline: none; }
.action-menu button.danger { color: var(--danger, #b3261e); }
.action-menu svg { flex: none; width: 19px; height: 19px; }

@media (prefers-reduced-motion: reduce) {
  .select-chevron { transition: none; }
}
