:where(.reset-root) .ch-reset-btn {
  display: none;
  padding: 8px 4px;
  max-width: 76px;
  white-space: normal;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--ch-font-primary);
  background: var(--ch-warning-bg);
  color: var(--px-warning-text);
  border: 1px solid var(--ch-warning-border);
  border-radius: var(--ch-radius-md);
  cursor: pointer;
  transition: opacity var(--ch-transition-fast), transform var(--ch-transition-fast), background-color var(--ch-transition-fast), color var(--ch-transition-fast), border-color var(--ch-transition-fast), box-shadow var(--ch-transition-fast);
}

:where(.reset-root) .ch-reset-btn:hover:not(:disabled) {
  background: var(--ch-warning);
  color: var(--px-ink-on-bright);
}

:where(.reset-root) .ch-reset-btn:disabled {
  background: var(--px-bg-disabled);
  color: var(--px-text-disabled);
  border-color: var(--px-border-disabled);
  cursor: not-allowed;
}

:where(.reset-root) .ch-reset-btn.visible {
  display: inline-flex;
}

/* Reset training data overlay (CH Training async reset flow) */
.ch-reset-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--px-backdrop-busy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ch-space-md);
  z-index: var(--px-z-reset-cover);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ch-transition-normal), visibility var(--ch-transition-normal);
}

.ch-reset-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.ch-reset-countdown {
  font-size: 64px;
  font-weight: 600;
  color: var(--px-backdrop-text);
  font-variant-numeric: tabular-nums;
}

.ch-reset-status {
  color: var(--px-backdrop-text);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  max-width: 480px;
  padding: 0 var(--ch-space-md);
}

.ch-reset-actions {
  display: none;
  gap: var(--ch-space-md);
  margin-top: var(--ch-space-md);
}

.ch-reset-actions.visible {
  display: flex;
}

/* Dismiss-only variant (showResetDismissOnly): the reset has already
   SUCCEEDED there, so Retry is taken off the screen; its click handler
   does nothing on that screen either. */
.ch-reset-actions.dismiss-only .ch-reset-retry {
  display: none;
}

.ch-reset-retry,
.ch-reset-dismiss {
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--ch-radius-md);
  cursor: pointer;
  border: 1px solid var(--px-backdrop-text);
  font-family: inherit;
}

.ch-reset-retry {
  background: var(--px-backdrop-text);
  color: var(--px-ink-on-bright);
}

.ch-reset-retry:hover {
  background: color-mix(in srgb, var(--px-backdrop-text) 90%, transparent);
}

.ch-reset-dismiss {
  background: transparent;
  color: var(--px-backdrop-text);
}

.ch-reset-dismiss:hover {
  background: color-mix(in srgb, var(--px-backdrop-text) 10%, transparent);
}

/* Last-reset-failed strip (spoke's notice). Below the overlay, which covers it. */
.ch-reset-failure-notice {
  display: none;
  position: fixed;
  top: calc(var(--ch-sticky-top) + var(--pa-callbar-inset-unpinned));
  left: 0;
  right: var(--pa-drawer-inset);
  z-index: var(--ch-z-overlay);
  background: var(--ch-danger-bg);
  color: var(--ch-danger-text);
  border-bottom: 1px solid var(--ch-danger-border);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 40px 7px 16px;
  text-align: center;
  font-family: var(--ch-font-primary);
}

.ch-reset-failure-notice.visible {
  display: block;
}

.ch-reset-failure-dismiss {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ch-danger-text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

@media (max-width: 768px) {
  .ch-reset-failure-notice {
    padding-right: 56px;
  }

  .ch-reset-failure-dismiss {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 6px;
  }
}
