/* Shared action vocabulary. Loaded last so page layout can remain independent.
   Repeating the component class deliberately outranks legacy page rules. */
/* Safari's native popup appearance can ignore a styled select's height/padding.
   Keep the native select semantics and popup, but draw the closed field ourselves.
   Multiple-selection and listbox controls retain their native appearance. */
:root body select:not([multiple]):not([size]),
:root body select:not([multiple])[size="1"] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  padding-inline-end: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
@media (forced-colors: active) {
  :root body select:not([multiple]):not([size]),
  :root body select:not([multiple])[size="1"] {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
  }
}
:root body .action-control.action-control.action-control {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 9px 15px;
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  background: var(--brand-surface);
  color: var(--brand-ink);
  box-shadow: none;
  font-family: var(--brand-font);
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
:root body .action-control.action-control.action-primary {
  padding: 11px 16px;
  border-color: var(--brand-accent);
  border-radius: 12px;
  background: var(--brand-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
:root body .action-control.action-control.action-text {
  justify-content: flex-start;
  gap: 6px;
  width: auto;
  padding: 0;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--brand-accent-hover);
  font-size: .875rem;
  font-weight: 700;
  text-align: left;
}
:root body .action-control.action-control.action-refresh {
  background: var(--brand-soft);
  border-color: var(--brand-line-strong);
  color: var(--brand-accent-hover);
}
:root body .action-control.action-control.action-danger { color: var(--brand-danger); }
:root body .action-control.action-control.action-quiet { min-width: 44px; padding: 9px; background: transparent; }
:root body .action-control.action-control.action-control:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--brand-soft);
  border-color: var(--brand-accent);
  color: var(--brand-ink);
  text-decoration: none;
  box-shadow: none;
  transform: none;
}
:root body .action-control.action-control.action-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--brand-accent-hover); border-color: var(--brand-accent-hover); color: #fff;
}
:root body .action-control.action-control.action-text:hover:not(:disabled):not([aria-disabled="true"]) {
  background: transparent; border-color: transparent; color: var(--brand-accent);
}
:root body .action-control.action-control.action-danger:hover:not(:disabled):not([aria-disabled="true"]) {
  color: var(--brand-danger); border-color: var(--brand-danger);
}
:root body .action-control.action-control.action-control:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 3px;
  text-decoration: none;
}
:root body .action-control.action-control.action-control:is(:disabled,[aria-disabled="true"]) { opacity: .65; cursor: not-allowed; }
:root body .action-control.action-control.action-control[aria-busy="true"] { cursor: wait; }
:root body .action-control.action-control.action-control:is([aria-pressed="true"],.is-active) { border-color: var(--brand-accent); background: var(--brand-soft); color: var(--brand-accent-hover); }
:root body .action-control :is(.button-icon,.refresh-mark) { width: 22px; height: 22px; flex: 0 0 22px; }
:root body :is(.action-control,.priority-card) :is(.action-arrow,.button-arrow) {
  display: inline-block;
  transform: none;
}
:root body .action-control :is(.action-arrow,.button-arrow) { flex: 0 0 auto; font-size: 1.1rem; line-height: 1; }
:root body .action-external { --action-arrow-rise: -3px; }
/* Move only the arrow: the label and hit target stay in place. Touch controls
   avoid a sticky hover state; reduced-motion preferences keep arrows still. */
@media (prefers-reduced-motion: no-preference) {
  :root body :is(.action-control,.priority-card) :is(.action-arrow,.button-arrow) {
    transition: transform 160ms ease-out;
  }
  :root body :is(.action-control,.priority-card):focus-visible:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) :is(.action-arrow,.button-arrow) {
    transform: translate(3px, var(--action-arrow-rise, 0px));
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :root body :is(.action-control,.priority-card):hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) :is(.action-arrow,.button-arrow) {
    transform: translate(3px, var(--action-arrow-rise, 0px));
  }
}
/* Compact password visibility controls retain their field-level placement. */
:root body .action-control.action-control.action-quiet[id^="toggle-"] { min-width: 44px; min-height: 44px; padding: 6px; border: 0; }
@media (prefers-reduced-motion: reduce) { :root body .action-control.action-control.action-control { transition: none; } }
