/* Cue Card Tutorial Overlay */

/* Semi-transparent backdrop — blocks all interaction */
.cue-card-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 900;
  display: none;
}

.cue-card-backdrop.active {
  display: block;
}

/* Target element highlight — visual outline around the focused element.
   For action-gated steps, a clip-path cutout in the backdrop (set via JS)
   makes the highlighted area clickable. */
.cue-card-target-highlight {
  z-index: 901 !important;
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* Fallback for elements flush with viewport/container edges where outline clips */
.cue-card-target-highlight.cue-card-highlight-inset {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* Action-gated steps: highlighted area pulses to signal "interact here".
   Interactivity is handled by clip-path cutout in the backdrop, not z-index. */
.cue-card-target-highlight.cue-card-action-gate {
  animation: cue-pulse 1.5s ease-in-out infinite;
}

@keyframes cue-pulse {
  0%, 100% { outline-color: var(--accent); }
  50% { outline-color: transparent; }
}

/* Inset variant pulses box-shadow instead */
.cue-card-target-highlight.cue-card-highlight-inset.cue-card-action-gate {
  animation: cue-pulse-inset 1.5s ease-in-out infinite;
}

@keyframes cue-pulse-inset {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--accent); }
  50% { box-shadow: inset 0 0 0 1px transparent; }
}

/* Card container */
.cue-card {
  position: fixed;
  z-index: 902;
  max-width: 380px;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  padding: 12px 16px;
  display: none;
}

.cue-card.visible {
  display: block;
}

/* Step counter */
.cue-card-step-counter {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* Faint step ID for debugging — always visible on all cards */
.cue-card-step-id {
  opacity: 0.4;
  float: right;
}

/* Card body text */
.cue-card-body {
  margin-bottom: 12px;
}

.cue-card-body strong {
  color: #fff;
}

/* Action emphasis — accent-colored text for key instructions */
.cue-card-body .cue-card-action {
  color: var(--accent);
  font-style: normal;
  font-weight: 600;
}

.cue-card-body p {
  margin: 0 0 8px 0;
}

.cue-card-body p:last-child {
  margin-bottom: 0;
}

/* Button row */
.cue-card-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.cue-card-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.75rem;
  padding: 4px 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.cue-card-btn:hover {
  border-color: var(--accent);
  color: #fff;
}

.cue-card-btn-primary {
  border-color: var(--accent);
  color: var(--accent);
}

.cue-card button.cue-card-btn.cue-card-btn-primary:hover {
  background: var(--accent);
  color: #000;
}

/* Skip / hide-hints button — secondary, left-aligned in button row */
.cue-card-skip {
  font-size: 0.65rem;
  color: var(--text-dim);
  cursor: pointer;
  margin-right: auto;
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  padding: 4px 12px;
  transition: border-color 0.15s, color 0.15s;
}

.cue-card-skip:hover {
  color: var(--text);
  border-color: var(--border);
}

/* Center position (for welcome/completion cards) */
.cue-card.cue-card-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Toast shown after skipping tutorial */
.cue-card-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 910;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 8px 16px;
  opacity: 0;
  transition: opacity 0.3s;
}

.cue-card-toast.visible {
  opacity: 1;
}
