/* Порядок действий — поверх общих стилей тренажёра */

.ooo-expression-wrap {
  overflow-x: auto;
  padding: 1.25rem 0.5rem 1.5rem;
  margin: 0.5rem 0 1rem;
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.ooo-expression {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.2rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  min-height: 3.5rem;
}

.ooo-num {
  padding: 0 0.15rem;
}

.ooo-op {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.05rem;
  padding: 0.05rem 0.2rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  vertical-align: middle;
}

.ooo-op:hover:not(:disabled) {
  background: rgba(14, 165, 233, 0.08);
}

.ooo-op:disabled {
  cursor: default;
}

.ooo-op--active {
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  color: var(--color-primary);
}

.ooo-op-badge {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1rem;
  text-align: center;
}

.ooo-op-sign {
  line-height: 1;
}

.ooo-compute,
.ooo-batch {
  margin: 0.75rem 0 1rem;
}

.ooo-step-label {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.ooo-answer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.ooo-answer-label {
  color: var(--color-muted);
}

.ooo-answer-input {
  width: 8rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.ooo-input--wrong {
  border-color: var(--tr-error, #dc2626);
  background: var(--tr-error-bg, #fef2f2);
}

.ooo-batch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ooo-batch-expr {
  font-weight: 600;
  min-width: 12rem;
}

.ooo-error-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: var(--tr-error-bg, #fef2f2);
  border-radius: 8px;
}

.ooo-error-choices p {
  margin: 0;
  width: 100%;
  color: var(--color-muted);
}

.feedback--ok {
  color: var(--tr-success, #0d9488);
}

.feedback--error {
  color: var(--tr-error, #dc2626);
}

@media (max-width: 600px) {
  .ooo-expression {
    justify-content: flex-start;
  }
}
