$sp-ink: #1e293b;
$sp-ink-muted: #64748b;
$sp-border: #e2e8f0;
$sp-surface: #ffffff;
$sp-accent: #2563eb;
$sp-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

.player-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  font-family: $sp-font;
  color: $sp-ink;
  pointer-events: none; // only the blocking (modal) zone dims/intercepts the whole page
}

.player-backdrop-blocking {
  background: rgba(15, 23, 42, 0.45);
  pointer-events: auto;
}

.player-shell {
  position: absolute;
  background: $sp-surface;
  border: 1px solid $sp-border;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  overflow: hidden;
}

// Modal / overlay (UITour fallback, per decision 3 — no real DOM anchoring yet) — centered.
.player-zone-modal,
.player-zone-overlay {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-height: 70vh;
}

// Sidepanel — right-docked, full height.
.player-zone-sidepanel {
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  border-radius: 0;
  max-height: 100vh;
}

// Banner — top strip, full width.
.player-zone-banner {
  top: 0;
  left: 0;
  right: 0;
  width: auto;
  border-radius: 0;
  max-height: 220px;
}

// Toast — small popup, bottom-right.
.player-zone-toast {
  bottom: 20px;
  right: 20px;
  width: 340px;
  max-height: 60vh;
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 1px solid $sp-border;
  flex-shrink: 0;
}

.player-close {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: $sp-ink-muted;

  &:hover {
    color: $sp-ink;
  }
}

.player-loading,
.player-empty {
  padding: 16px;
  font-size: 12.5px;
  color: $sp-ink-muted;
}

.player-progress {
  padding: 8px 16px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: $sp-ink-muted;
}

.player-step {
  padding: 12px 16px;
  overflow-y: auto;
}

.player-step-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.player-step-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: $sp-ink;
  white-space: pre-wrap;
}

.player-links {
  padding: 0 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid $sp-border;
  border-radius: 8px;
  font-size: 12.5px;
}

.player-link-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: $sp-accent;
  flex-shrink: 0;
}

.player-link-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-link-open,
.player-link-lms {
  border: none;
  background: #eef2ff;
  color: $sp-accent;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;

  &:hover {
    background: #e0e7ff;
  }
}

.player-footer {
  border-top: 1px solid $sp-border;
  padding: 10px 16px;
  flex-shrink: 0;
}

.player-resources-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: $sp-ink-muted;
  margin-bottom: 6px;
}

.player-resources {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.player-prev,
.player-next,
.player-done {
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.player-prev {
  background: #f1f5f9;
  color: $sp-ink;

  &:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
}

.player-next,
.player-done {
  background: var(--button-primary-bg-default, #{$sp-accent});
  color: var(--button-primary-text-default, white);
}
