/* Terminal status loader — Uiverse jeremyssocial, adapted for DivineChecker check panel */

@keyframes terminalBlinkCursor {
  50% {
    border-right-color: transparent;
  }
}

.terminal-loader {
  border: 0.1em solid #333;
  background-color: #1a1a1a;
  color: #0f0;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.92rem;
  padding: 2em 1em 1.1em;
  width: 100%;
  max-width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.terminal-loader.is-aborted {
  border-color: rgba(239, 68, 68, 0.45);
}

.terminal-loader.is-stale {
  border-color: rgba(245, 158, 11, 0.45);
}

.terminal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5em;
  background-color: #333;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  padding: 0 0.4em;
  box-sizing: border-box;
}

.terminal-controls {
  float: right;
}

.terminal-loader .control {
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.4em;
  border-radius: 50%;
  background-color: #777;
}

.terminal-loader .control.close {
  background-color: #e33;
}

.terminal-loader .control.minimize {
  background-color: #ee0;
}

.terminal-loader .control.maximize {
  background-color: #0b0;
}

.terminal-title {
  float: left;
  line-height: 1.5em;
  color: #eee;
  font-size: 0.85em;
}

.terminal-body {
  margin-top: 0.35em;
}

.terminal-loader-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 0.2em solid #0f0;
  margin: 0;
  min-height: 1.35em;
  max-width: 100%;
}

.terminal-loader-text--idle {
  width: auto;
  overflow: visible;
  animation: terminalBlinkCursor 0.5s step-end infinite alternate;
}

.terminal-loader-text--live {
  white-space: normal;
  overflow: visible;
  width: auto;
  animation: terminalBlinkCursor 0.5s step-end infinite alternate;
}

.terminal-loader-meta {
  margin-top: 0.65em;
  color: #9ae6b0;
  font-size: 0.9em;
  line-height: 1.45;
}

.terminal-loader-meta.is-scanning {
  color: #86efac;
}

.terminal-loader-progress-track {
  margin-top: 0.85em;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.terminal-loader-progress-fill,
.live-scan-progress-fill.terminal-loader-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  transition: width 0.35s ease;
}

.terminal-loader.is-aborted .terminal-loader-progress-fill {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.terminal-loader.is-stale .terminal-loader-progress-fill {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.terminal-loader-detail {
  margin-top: 0.85em;
  display: grid;
  gap: 0.35em;
  font-size: 0.82em;
  color: #a3e635;
}

.terminal-loader-detail .live-scan-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.terminal-loader-detail .live-scan-detail-row span {
  color: #6b7280;
}

.terminal-loader-alert {
  margin-top: 0.75em;
  padding: 0.55em 0.65em;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
  font-size: 0.85em;
}

.terminal-loader-alert.is-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fde68a;
}

.terminal-loader-log {
  margin-top: 0.75em;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.78em;
  color: #86efac;
  opacity: 0.92;
}

.check-progress-panel--terminal .check-panel-head {
  display: none;
}

.check-progress-panel--terminal .status-pill {
  display: none !important;
}

html[data-theme="alt"] .check-progress-panel--terminal .terminal-loader {
  border-color: rgba(63, 63, 70, 0.95);
  background: rgba(10, 10, 12, 0.88);
  box-shadow: none;
}

html[data-theme="alt"] .check-progress-panel--terminal .terminal-header {
  background: rgba(39, 39, 42, 0.95);
}
