.codex-video-undo-status {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  color: #111827;
  background: rgba(249, 250, 251, 0.97);
  text-align: center;
}

.codex-video-undo-status [hidden] {
  display: none !important;
}

.dark .codex-video-undo-status {
  color: #f9fafb;
  background: rgba(17, 24, 39, 0.96);
}

.codex-video-undo-panel {
  display: flex;
  width: min(100%, 280px);
  min-height: 148px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.codex-video-undo-kicker {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.dark .codex-video-undo-kicker {
  color: #9ca3af;
}

.codex-video-undo-count {
  display: flex;
  height: 48px;
  align-items: baseline;
  justify-content: center;
  margin-top: 2px;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

.dark .codex-video-undo-count {
  color: #f9fafb;
}

.codex-video-undo-count strong {
  min-width: 34px;
  font-size: 38px;
  font-weight: 650;
  line-height: 48px;
}

.codex-video-undo-count span {
  margin-left: 3px;
  color: #9ca3af;
  font-size: 12px;
}

.codex-video-undo-message {
  max-width: 240px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.5;
}

.dark .codex-video-undo-message {
  color: #9ca3af;
}

.codex-video-undo-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.codex-video-start-hero-button,
.codex-video-undo-hero-button {
  display: inline-flex;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.codex-video-start-hero-button {
  border: 1px solid #4f46e5;
  background: #4f46e5;
}

.codex-video-start-hero-button:hover:not(:disabled) {
  background: #4338ca;
}

.codex-video-undo-hero-button {
  border: 1px solid #dc2626;
  background: #dc2626;
}

.codex-video-undo-hero-button:hover:not(:disabled) {
  background: #b91c1c;
}

.codex-video-start-hero-button:active:not(:disabled),
.codex-video-undo-hero-button:active:not(:disabled) {
  transform: translateY(1px);
}

.codex-video-start-hero-button:disabled,
.codex-video-undo-hero-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.codex-video-undo-status.is-submitted .codex-video-undo-panel::before {
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  border: 2px solid #d1d5db;
  border-top-color: #6366f1;
  border-radius: 50%;
  content: "";
  animation: codex-video-undo-spin 0.8s linear infinite;
}

.codex-video-undo-status.is-submitted .codex-video-undo-count,
.codex-video-undo-status.is-submitted .codex-video-undo-hero-actions,
.codex-video-undo-status.is-submitted .codex-video-start-hero-button,
.codex-video-undo-status.is-submitted .codex-video-undo-hero-button {
  display: none !important;
}

.codex-video-undo-status.is-submitted .codex-video-undo-kicker {
  color: #e5e7eb;
  font-size: 13px;
}

.codex-video-undo-status.is-submitted .codex-video-undo-message {
  margin-top: 6px;
}

@keyframes codex-video-undo-spin {
  to {
    transform: rotate(360deg);
  }
}

.codex-video-undo-button {
  padding: 4px 12px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  color: #fff;
  background: #dc2626;
  font-size: 12px;
  line-height: 1.25;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.codex-video-undo-button:hover:not(:disabled) {
  background: #b91c1c;
}

.codex-video-undo-button:disabled {
  border-color: #e5e7eb;
  color: #9ca3af;
  background: #f3f4f6;
  cursor: not-allowed;
}

.dark .codex-video-undo-button:disabled {
  border-color: #374151;
  color: #6b7280;
  background: #1f2937;
}
