/* ინტერაქტიული Python უჯრა (py-runner.js) */

.py-editor {
  margin: 1em 0;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.3rem;
  overflow: hidden;
  background: var(--md-code-bg-color);
}

.py-editor__code {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.9rem;
  border: 0;
  outline: 0;
  resize: vertical;
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.78rem;
  line-height: 1.5;
  tab-size: 4;
  color: var(--md-code-fg-color);
  background: var(--md-code-bg-color);
}

.py-editor__toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.4rem 0.6rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-default-bg-color);
}

.py-editor__run,
.py-editor__reset {
  cursor: pointer;
  border: 0;
  border-radius: 0.3rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  transition: background-color 0.15s, opacity 0.15s;
}

.py-editor__run {
  color: var(--md-primary-bg-color, #fff);
  background: var(--md-primary-fg-color);
}

.py-editor__run:hover {
  opacity: 0.85;
}

.py-editor__run:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.py-editor__reset {
  color: var(--md-default-fg-color);
  background: var(--md-default-fg-color--lightest);
}

.py-editor__reset:hover {
  background: var(--md-default-fg-color--lighter);
}

.py-editor__status {
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}

.py-editor__output {
  display: none;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  max-height: 22rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--md-code-font-family, monospace);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--md-code-fg-color);
  background: var(--md-code-bg-color);
}

.py-editor__output--visible {
  display: block;
}

.py-editor__output--error {
  color: #d32f2f;
}

[data-md-color-scheme="slate"] .py-editor__output--error {
  color: #ff8a80;
}
