/* The Debug log (debug.js): the status bar's button, and its window of every error so far. */

.debug-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.debug-btn:hover {
  color: var(--champagne);
  border-color: var(--line-3);
}
.debug-btn.has {
  color: #f0b0a8;
  border-color: rgba(220, 110, 100, 0.55);
  background: rgba(160, 50, 45, 0.18);
}
.debug-btn svg {
  width: 12px;
  height: 12px;
}

.db-overlay {
  z-index: 73;
  animation: pm-fade 0.16s ease-out;
}
.db-scrim {
  position: absolute;
  inset: 0;
}
.db {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  border-radius: 18px;
  background: linear-gradient(180deg, #1c1821, #0f0d12);
  border: 1px solid var(--line-3);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.7),
    var(--glow);
  overflow: hidden;
  animation: pm-rise 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.db-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 16px 12px 20px;
  border-bottom: 1px solid var(--line);
}
.db-title {
  flex: 1;
  min-width: 0;
}
.db-title h2 {
  margin: 0 0 4px;
  font: italic 600 24px/1.1 var(--serif);
  color: var(--gold-hi);
}
.db-about {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.db-empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}
/* Plain text a mouse selects. */
.db-log {
  margin: 0;
  padding: 12px 16px 16px;
  overflow: auto;
  font: 12px/1.5 var(--mono, ui-monospace, monospace);
  color: var(--champagne);
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
.db-entry {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.db-when {
  color: var(--muted);
  margin-right: 10px;
}
.db-kind {
  display: inline-block;
  min-width: 64px;
  margin-right: 10px;
  color: #f0b0a8;
}
.db-warning .db-kind {
  color: #e8c97a;
}
.db-toast .db-kind {
  color: #c9a5e8;
}
