/* Action button tokens shared across the workspace. Layout and specialized
   controls (facility tiles, calendar days, seek + and category chips) stay local. */
:root {
  --button-radius:6px;
  --button-weight:500;
  --button-primary-bg:var(--brand-color);
  --button-primary-hover:color-mix(in srgb,var(--brand-color) 85%,#202127);
  --button-primary-ink:#ffffff;
  --button-secondary-bg:var(--canvas);
  --button-secondary-hover:var(--surface-2);
  --button-secondary-ink:var(--ink);
  --button-secondary-border:var(--line);
  --button-danger-ink:#b42332;
}
.ui-button {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:44px; padding:8px 14px; border:1px solid transparent;
  border-radius:var(--button-radius); font-family:inherit;
  font-size:var(--text-sm); font-weight:var(--button-weight); line-height:20px;
  cursor:pointer; box-shadow:none;
  transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease;
}
.ui-button[data-ui-size="compact"] { min-height:32px; height:auto; padding:6px 10px; font-size:var(--text-xs); line-height:18px; }
.ui-button[data-ui-icon="true"] { width:32px; min-height:32px; height:32px; padding:0; }
.ui-button > svg { width:20px; height:20px; flex-shrink:0; }
.ui-button[data-ui-size="compact"] > svg,.ui-button[data-ui-icon="true"] > svg { width:18px; height:18px; }
.ui-button[data-ui-variant="primary"] { background:var(--button-primary-bg); color:var(--button-primary-ink); border-color:var(--button-primary-bg); }
.ui-button[data-ui-variant="primary"]:hover:not(:disabled) { background:var(--button-primary-hover); border-color:var(--button-primary-hover); color:var(--button-primary-ink); }
.ui-button[data-ui-variant="secondary"] { background:var(--button-secondary-bg); color:var(--button-secondary-ink); border-color:var(--button-secondary-border); }
.ui-button[data-ui-variant="secondary"]:hover:not(:disabled) { background:var(--button-secondary-hover); color:var(--button-secondary-ink); }
.ui-button[data-ui-variant="ghost"] { background:transparent; color:var(--button-secondary-ink); border-color:transparent; }
.ui-button[data-ui-variant="ghost"]:hover:not(:disabled) { background:var(--button-secondary-hover); color:var(--button-secondary-ink); }
.ui-button[data-ui-variant="danger"] { background:var(--button-secondary-bg); color:var(--button-danger-ink); border-color:color-mix(in srgb,var(--button-danger-ink) 25%,var(--canvas)); }
.ui-button[data-ui-variant="danger"]:hover:not(:disabled) { background:color-mix(in srgb,var(--button-danger-ink) 7%,var(--canvas)); color:var(--button-danger-ink); }
.ui-button:disabled { opacity:.45; cursor:default; }
.ui-button:focus-visible { outline:2px solid var(--focus); outline-offset:2px; }
/* Selected controls retain their own semantics; action typography stays shared. */
.insight-filter.ui-button[aria-pressed="true"] { background:var(--canvas); border-color:var(--line); color:var(--ink); box-shadow:0 1px 2px rgb(32 33 39 / .04); }
.insight-filter.ui-button[aria-pressed="true"]:hover { background:var(--canvas); }
.mark-review-button.ui-button { transition:background-color 220ms ease,color 220ms ease,border-color 220ms ease; }
@media(prefers-reduced-motion:reduce) { .mark-review-button.ui-button { transition:none; } }
.call-filters .ui-button[aria-pressed="true"],.alert-tabs .ui-button[aria-selected="true"] { background:var(--button-secondary-bg); border-color:var(--button-secondary-border); color:var(--button-secondary-ink); }
.call-play-button.ui-button[data-visited="true"] { background:var(--surface-2); }
.call-play-button.ui-button[data-visited="true"]:hover:not(:disabled) { background:var(--surface-3); }
#player-split-speakers.ui-button[aria-pressed="true"],.date-filter-button.ui-button.has-filter { border-color:var(--brand-color); background:var(--surface-4); color:var(--button-secondary-ink); }
/* Field triggers and compact menus use the same text color without changing widths. */
.space-selector.ui-button { justify-content:flex-start; padding-left:42px; padding-right:30px; }
#note-assignee-trigger.ui-button,#note-intent-trigger.ui-button { justify-content:space-between; }
@media(prefers-reduced-motion:reduce) { .ui-button { transition:none; } }

.call-row-processing .call-play-button.ui-button { background:var(--surface-3); }
/* Preserve responsive navigation visibility after applying shared button layout. */
.menu-toggle.ui-button { display:none; }
@media(max-width:640px) {
  .menu-toggle.ui-button { display:inline-flex; }
  .sidebar-toggle.ui-button { display:none; }
}

.call-details-entry.ui-button { justify-content:flex-start; gap:10px; padding:10px 8px; border-bottom-color:var(--line); border-radius:0; }

/* Download menu reuses the existing download actions and their availability. */
.record-download-menu { position:fixed; inset:auto; margin:0; width:220px; max-width:calc(100vw - 16px); padding:4px; border:1px solid var(--line); border-radius:8px; background:var(--canvas); color:var(--ink); box-shadow:0 4px 16px rgb(32 33 39 / .08); }
.record-download-menu::backdrop { background:transparent; }
.record-download-option { display:flex; align-items:center; gap:8px; width:100%; min-height:36px; padding:8px 10px; border:0; border-radius:4px; background:transparent; color:var(--ink); font:inherit; font-size:var(--text-xs); text-align:left; cursor:pointer; }
.record-download-option svg { width:16px; height:16px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.record-download-option:hover:not(:disabled),.record-download-option:focus-visible { background:var(--surface-2); outline:none; }
.record-download-option:disabled { color:var(--subtle); opacity:.5; cursor:default; }
.record-download-button .download-chevron { width:14px; height:14px; transition:transform 140ms ease; }
.record-download-button[aria-expanded="true"] .download-chevron { transform:rotate(180deg); }
@media(prefers-reduced-motion:reduce) { .record-download-button .download-chevron { transition:none; } }

#player-toggle-timeline svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; transition:transform 140ms ease; }
#player-toggle-timeline[aria-expanded="true"] svg { transform:rotate(180deg); }
.call-player.timeline-collapsed .player-controls { padding-top:12px; padding-bottom:12px; border-top:0; }
@media(prefers-reduced-motion:reduce) { #player-toggle-timeline svg { transition:none; } }

.call-player .player-controls { transition:padding 320ms cubic-bezier(.4,0,.2,1); }
@media(prefers-reduced-motion:reduce) { .call-player .player-controls { transition:none; } }

/* Compact playback controls follow the timeline disclosure state. */
.call-player .player-controls > button.ui-button { transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease,min-height 320ms cubic-bezier(.4,0,.2,1),min-width 320ms cubic-bezier(.4,0,.2,1),padding 320ms cubic-bezier(.4,0,.2,1),font-size 320ms cubic-bezier(.4,0,.2,1); }
.call-player.timeline-collapsed .player-controls { gap:6px; padding-top:8px; padding-bottom:8px; }
.call-player.timeline-collapsed .player-controls > button.ui-button { min-height:32px; padding:6px 10px; font-size:var(--text-xs); line-height:18px; }
.call-player.timeline-collapsed .player-controls > #player-play { min-width:80px; }
.call-player.timeline-collapsed .player-controls > button svg { width:16px; height:16px; }
.call-player.timeline-collapsed .player-time { font-size:var(--text-xs); }
@media(prefers-reduced-motion:reduce) { .call-player .player-controls > button.ui-button { transition:none; } }
