/* Sidebar-foot Cordis action and the fixed list it opens above the footer. */

.layer {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  width: 100%;
  height: 49px;
  margin: 8px 0 0;
}

.footerButtons {
  display: flex;
  align-items: center;
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 49px;
  padding: 0 8px 0 6px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--dsw-alias-label-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
}

.badge:hover {
  background: var(--dsw-alias-interactive-bg-hover-solid);
}

.badge[data-active] {
  background: var(--dsw-alias-interactive-bg-hover);
}

.badgeLabel {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badgeCount {
  flex: none;
  margin-left: auto;
  color: var(--dsw-alias-label-tertiary);
  font-size: 12px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}

.layer.rail {
  width: 36px;
  height: 36px;
  margin: 0;
}

.rail .badge {
  justify-content: center;
  gap: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}

.rail .footerButtons {
  flex-direction: column;
  gap: 2px;
}

.panel {
  position: fixed;
  left: 12px;
  bottom: 128px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: calc(100vw - 24px);
  max-height: 60vh;
  overflow: hidden;
  border: 1px solid var(--dsw-alias-border-l1);
  border-radius: 12px;
  background: var(--dsw-alias-bg-base);
  box-shadow: var(--dsw-shadow-lv2);
  /* Only `.body` scrolls; the header remains fixed above it. */
  --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
  --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
}

.header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--dsw-alias-border-l2);
  background: var(--dsw-alias-bg-base);
}

.body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 12px 12px;
}

.title {
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: var(--dsw-alias-label-primary);
}

.note,
.readError {
  margin: 4px 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--dsw-alias-label-tertiary);
}

.readError {
  color: var(--dsw-alias-state-error-primary);
}

/* Session headings replace per-row ownership markers. */
.group {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  color: var(--dsw-alias-label-caption);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--dsw-alias-border-l2);
  border-radius: 12px;
  background: var(--dsw-alias-bg-base);
}

.row[data-cordis-awaiting] {
  border-color: var(--dsw-alias-state-business-primary);
}

.rowHead {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rowId {
  flex: none;
  color: var(--dsw-alias-label-tertiary);
  font-family: var(--dsh-font-mono, monospace);
  font-size: 11px;
  line-height: 20px;
}

.rowName {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  color: var(--dsw-alias-label-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rowStatus {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--dsw-alias-button-ghost-active-fill);
  font-size: 11px;
  line-height: 20px;
  color: var(--dsw-alias-label-caption);
}

.row[data-cordis-status='idle'] .rowStatus {
  background: var(--dsw-alias-button-ghost-active-fill);
  color: var(--dsw-alias-label-caption);
}

.row[data-cordis-status='awaiting-approval'] .rowStatus,
.row[data-cordis-status='client-pending'] .rowStatus {
  background: var(--dsw-alias-state-warn-tertiary);
  color: var(--dsw-alias-state-warn-label);
}

.row[data-cordis-status='failed'] .rowStatus {
  background: var(--dsw-alias-interactive-bg-hover-danger);
  color: var(--dsw-alias-state-error-primary);
}

.row[data-cordis-status='running'] .rowStatus {
  background: var(--dsw-alias-state-success-tertiary);
  color: var(--dsw-alias-state-success-primary);
}

.rowDetail {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.versionPicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dsw-alias-label-caption);
  font-size: 11px;
  line-height: 18px;
}

.versionPicker select {
  min-width: 0;
  flex: 1;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--dsw-alias-border-l2);
  border-radius: 7px;
  background: var(--dsw-alias-bg-base);
  color: var(--dsw-alias-label-secondary);
  font: inherit;
}

.rowPurpose {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 18px;
  color: var(--dsw-alias-label-tertiary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rowError {
  font-size: 12px;
  line-height: 18px;
  color: var(--dsw-alias-state-error-primary);
}

.rowActions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.transition {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--dsw-alias-label-caption);
  font-size: 11px;
  line-height: 18px;
}

.transitionActions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.transitionActions button {
  padding: 2px 8px;
  border: 1px solid var(--dsw-alias-border-l2);
  border-radius: 999px;
  background: transparent;
  color: var(--dsw-alias-label-secondary);
  font: inherit;
  cursor: pointer;
}

.transitionActions button:hover:not(:disabled) {
  background: var(--dsw-alias-interactive-bg-hover);
}

.transitionActions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.activeVersion {
  color: var(--dsw-alias-label-caption);
  font-size: 11px;
  line-height: 16px;
}

/* Matches GoalBar's action controls: compact circular icons whose visible copy
   lives in a tooltip and accessible name. */
.actionButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--dsw-alias-label-tertiary);
  cursor: pointer;
}

.actionButton:hover:not(:disabled) {
  background: var(--dsw-alias-interactive-bg-hover);
  color: var(--dsw-alias-label-secondary);
}

.actionButton:disabled {
  opacity: 0.4;
  cursor: default;
}

.doubleCheck {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 14px;
}

.doubleCheck svg {
  position: absolute;
  top: 1px;
}

.doubleCheck svg:first-child {
  left: 0;
  opacity: 0.7;
}

.doubleCheck svg:last-child {
  left: 5px;
}
