/* =============================================================================
   Orbital Practice — step bar, Practice step, Interact step, Answer step.
   Layered on top of the existing element-modal two-pane layout without
   altering it: .modal-step-panel-learn wraps the original
   .modal-info-pane + .modal-visual-pane pair unchanged.
   ============================================================================= */

.modal-step-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  padding: 4px;
  z-index: 150;
}

.modal-step-btn {
  border: none;
  background: transparent;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.modal-step-btn:hover {
  color: var(--text-primary, #1e293b);
}

.modal-step-btn.active {
  background: #ffffff;
  color: var(--text-primary, #1e293b);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.modal-step-panel {
  display: none;
  width: 100%;
  height: 100%;
}

.modal-step-panel.active {
  display: flex;
}

.modal-step-panel-learn {
  /* Matches .modal-content's original flex layout for info-pane + visual-pane */
  flex-direction: row;
}

.modal-step-panel-practice,
.modal-step-panel-answer {
  flex-direction: column;
  overflow: hidden;
  padding-top: 70px;
}

.modal-step-panel-interact {
  flex-direction: column;
  align-items: stretch;
}

.interact-step-hint {
  text-align: center;
  padding: 70px 24px 0;
  font-size: 0.9rem;
  color: var(--text-secondary, #64748b);
}

.interact-visual-slot {
  flex: 1;
  display: flex;
  min-height: 0;
}

.interact-visual-slot .modal-visual-pane {
  flex: 1;
  width: 100%;
}

/* ---------------------------------------------------------------------------
   Practice / Answer shared scaffolding
   --------------------------------------------------------------------------- */

.practice-step-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 48px 48px;
}

.practice-section {
  margin-bottom: 36px;
}

.practice-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text-primary, #1e293b);
}

.practice-section-hint {
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 16px;
}

.practice-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.practice-check-btn {
  border: none;
  background: #1e293b;
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.practice-check-btn:hover {
  background: #334155;
}

.practice-result {
  font-size: 0.85rem;
  font-weight: 600;
}

.practice-result-correct {
  color: #16a34a;
}

.practice-result-incorrect {
  color: #dc2626;
}

/* ---------------------------------------------------------------------------
   Config fill-in
   --------------------------------------------------------------------------- */

.config-fill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  font-family: "Courier New", monospace;
  font-size: 1.15rem;
}

.config-token {
  display: inline-flex;
  align-items: flex-start;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
}

.config-token-blank {
  background: rgba(99, 102, 241, 0.08);
}

.config-token-correct {
  background: rgba(22, 163, 74, 0.12);
}

.config-token-incorrect {
  background: rgba(220, 38, 38, 0.12);
}

.config-blank-input {
  width: 34px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
  font-family: inherit;
}

/* ---------------------------------------------------------------------------
   Orbital box diagram
   --------------------------------------------------------------------------- */

.orbital-boxes-row {
  display: flex;
  gap: 8px;
}

.orbital-box {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.orbital-box:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.orbital-box-violation {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

/* ---------------------------------------------------------------------------
   Quantum number inputs / options
   --------------------------------------------------------------------------- */

.qn-input-row {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.85rem;
}

.qn-input-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
}

.qn-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  font-size: 0.9rem;
}

.qn-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qn-option-btn {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-family: "Courier New", monospace;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.qn-option-wide {
  font-family: inherit;
  flex: 1 1 100%;
  text-align: left;
}

.qn-option-btn:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.qn-option-selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.qn-option-correct {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.12);
}

.qn-option-incorrect {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
}
