/**
 * task_9_py — Python-разбор задания 9 (Pyodide sandbox)
 */

/* Левая колонка: Python-тренажёр вместо Univer */
.task-9-py-page .task-solve__left .task-view--sandbox {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.task-9-py-page .python-sandbox {
  flex: 0 1 auto;
  min-height: 0;
}

/* Компактная компоновка: toolbar и форма ответа выше при динамической высоте редактора */
.task-9-py-page .task-solve__answer {
  margin-top: 0.75rem;
  flex-shrink: 0;
}

.task-9-py-statement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.task-9-py-statement-header h1 {
  margin: 0;
}

/* Mode toggle: Excel | Python (shared with task_9_ex) */
.task-9-mode-toggle {
  display: inline-flex;
  align-items: stretch;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.task-9-mode-toggle__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.task-9-mode-toggle__item--active {
  background: rgba(5, 184, 125, 0.2);
  color: var(--green, #05b87d);
  cursor: default;
}

a.task-9-mode-toggle__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

[data-theme="light"] .task-9-mode-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .task-9-mode-toggle__item {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .task-9-mode-toggle__item--active {
  background: rgba(5, 184, 125, 0.15);
  color: var(--green, #05b87d);
}

[data-theme="light"] a.task-9-mode-toggle__item:hover {
  background: rgba(0, 0, 0, 0.08);
}
