/* The playground's editor/console/sidebar follow the site-wide light/dark
   theme toggle via the --code-* tokens defined in base.css. The CodeMirror
   syntax theme itself ("dracula" for dark, "default" for light) is switched
   in run.js alongside these, in response to the same toggle. */

.playground-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--code-border);
  overflow: hidden;
  min-height: 0;
}

.playground-main.has-sidebar {
  grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr);
}

.playground-main.has-sidebar.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.playground-main.sidebar-collapsed .playground-sidebar {
  display: none;
}

@media (max-width: 800px) {
  .playground-main {
    grid-template-columns: 1fr;
    /* the editor needs more room than the console: its toolbar, statement,
       status bar, symbol bar and submit bar all sit in this pane */
    grid-template-rows: minmax(0, 3fr) minmax(0, 2fr);
  }

  .pane {
    overflow: hidden;
  }

  .statement-panel {
    max-height: 30%;
  }

  .CodeMirror {
    min-height: 4.5rem;
  }

  .playground-main.has-sidebar,
  .playground-main.has-sidebar.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  /* `.pane { display: flex }` comes later in this file: the extra class keeps the
     file explorer hidden on phones for logged-in users too */
  .playground-main .playground-sidebar {
    display: none;
  }
}

.pane {
  background: var(--code-panel-bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pane-header {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pane-header span.pane-title {
  font-weight: 600;
  margin-right: auto;
  color: var(--code-text);
}

.CodeMirror {
  flex: 1;
  height: auto !important;
  font-size: var(--editor-font-size, 15px);
}

#status,
#save-status {
  color: var(--code-muted);
  font-size: 0.85rem;
}

#output {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: calc(var(--editor-font-size, 15px) * 0.95);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--code-text);
}

.output-error {
  color: var(--code-danger);
}

.output-input {
  outline: none;
  border-bottom: 1px solid var(--code-accent);
  min-width: 1ch;
  display: inline-block;
}

.submit-bar {
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.submit-bar .pane-title {
  font-weight: 600;
  margin-right: auto;
  color: var(--code-text);
}

.explorer-header {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.explorer-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--code-muted);
  margin-right: auto;
}

.explorer-new {
  color: var(--code-muted);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.explorer-new:hover {
  color: var(--code-text);
}

.snippet-explorer {
  list-style: none;
  margin: 0;
  padding: 0.2rem 0;
  overflow-y: auto;
  flex: 1;
}

.snippet-explorer-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.75rem;
  color: var(--code-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid transparent;
  font-size: 0.82rem;
  line-height: 1.7;
}

.snippet-explorer-icon {
  flex-shrink: 0;
  font-size: 0.8em;
  opacity: 0.8;
}

.snippet-explorer-item:hover {
  background: var(--code-bg);
}

.snippet-explorer-item.is-active {
  border-left-color: var(--code-accent);
  background: color-mix(in srgb, var(--code-accent) 12%, transparent);
}

.snippet-explorer-empty {
  color: var(--code-muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
}

/* A pane's width does not depend on its content (the editor next to the file
   explorer on a laptop), so the toolbar never spills into the neighbouring pane. */
.pane {
  container-type: inline-size;
}

/* Toolbar buttons (standard small size): an inline SVG icon only. The text lives
   in each button's title/aria-label, so it stays accessible and discoverable;
   the .btn-label span is kept in the markup but never shown. */
.pg-btn {
  gap: 0.35rem;
  width: 2.5em;
  padding-inline: 0;
  justify-content: center;
}

.pg-btn .btn-label {
  display: none;
}

.pg-btn .btn-icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}

.pane-header,
.submit-bar {
  gap: 0.4rem;
}

@media (max-width: 600px) {
  .pane-header {
    padding: 0.4rem 0.6rem;
  }

  .submit-bar {
    padding: 0.4rem 0.6rem;
  }
}


/* ---- Pas à pas (trace view) ---- */
.trace-line.CodeMirror-linebackground,
.CodeMirror-linebackground.trace-line {
  background: rgba(255, 193, 7, 0.28);
}

.CodeMirror-linebackground.trace-error-line {
  background: rgba(220, 53, 69, 0.25);
}

#trace-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--code-text);
}

#trace-panel[hidden],
.trace-inputs[hidden] {
  display: none !important;
}

.trace-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  flex-wrap: wrap;
}

.trace-counter {
  font-size: 0.85rem;
  color: var(--code-muted);
  min-width: 6.5em;
  text-align: center;
}

.trace-note {
  margin: 0;
  padding: 0 1rem 0.4rem;
  font-size: 0.85rem;
  color: var(--code-muted);
}

.trace-note.is-error {
  color: var(--code-danger);
}

.trace-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem 0.75rem;
}

.trace-vars {
  width: 100%;
  border-collapse: collapse;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.88rem;
}

.trace-vars th,
.trace-vars td {
  text-align: left;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--code-border);
  word-break: break-word;
}

.trace-vars th {
  font-family: inherit;
  color: var(--code-muted);
  font-weight: 600;
}

.trace-vars tr.is-changed td {
  background: rgba(255, 193, 7, 0.22);
  font-weight: 700;
}

.trace-vars tr.is-local td:first-child::after {
  content: " (locale)";
  color: var(--code-muted);
  font-weight: 400;
  font-size: 0.8em;
}

.trace-empty {
  color: var(--code-muted);
  font-style: italic;
}

.trace-out-title {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--code-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trace-output {
  margin: 0.25rem 0 0;
  padding: 0.5rem 0.6rem;
  min-height: 2.5rem;
  background: transparent;
  border: 1px solid var(--code-border);
  border-radius: 6px;
  color: var(--code-text);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.trace-inputs {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--code-border);
  font-size: 0.8rem;
  color: var(--code-muted);
}

.trace-inputs textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  background: transparent;
  color: var(--code-text);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  resize: vertical;
}

/* Keep the editor toolbar on one line: the filename gives way first. */
#editor-filename {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane-header:has(#editor-filename) {
  flex-wrap: nowrap;
}

/* Exercise / challenge statement shown above the editor. Collapsible; it scrolls
   on its own so the editor always keeps most of the pane. */
.statement-panel {
  border-bottom: 1px solid var(--code-border);
  max-height: 40%;
  overflow-y: auto;
  flex-shrink: 0;
  color: var(--code-text);
}

.statement-panel > summary {
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  position: sticky;
  top: 0;
  background: var(--code-panel-bg);
}

.statement-body {
  padding: 0 1rem 0.75rem;
  font-size: 0.9rem;
  color: var(--code-text);
}

.statement-body p,
.statement-body li {
  color: inherit;
}

.statement-body pre {
  white-space: pre-wrap;
  font-size: 0.85rem;
}



/* ---- Erreurs repérées dans le code ---- */
.CodeMirror-linebackground.error-line {
  background: rgba(209, 69, 59, 0.2);
}

.error-gutter {
  width: 1.2rem;
}

.error-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.1rem;
  border-radius: 50%;
  background: var(--code-danger);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.output-error-link {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.output-error-link:hover,
.output-error-link:focus-visible {
  text-decoration-style: solid;
  outline: none;
}

.output-hint {
  display: inline-block;
  margin: 0.15rem 0 0.35rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--code-accent);
  color: var(--code-muted);
}

/* ---- Brouillon restauré ---- */
.draft-notice {
  font-size: 0.8rem;
  color: var(--code-muted);
}

.draft-reset {
  background: none;
  border: 0;
  padding: 0;
  color: var(--code-accent);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

/* ---- Barre de symboles (téléphone et tablette) ---- */
.symbol-bar {
  display: none;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  overflow-x: auto;
  border-top: 1px solid var(--code-border);
  background: var(--code-panel-bg);
  scrollbar-width: none;
}

.symbol-bar::-webkit-scrollbar {
  display: none;
}

@media (pointer: coarse), (max-width: 800px) {
  .symbol-bar {
    display: flex;
  }
}

.symbol-key {
  flex: none;
  min-width: 2.6rem;
  height: 2.4rem;
  padding: 0 0.6rem;
  border: 1px solid var(--code-border);
  border-radius: 8px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.1s ease, transform 0.1s ease;
}

@media (pointer: coarse) {
  .symbol-key {
    min-width: 2.75rem;
    height: 2.75rem;
  }

  /* the editor's own controls: fingers need 44px too */
  .font-btn,
  .font-size-label,
  .lint-status {
    min-height: 2.75rem;
  }

  .font-btn {
    min-width: 2.75rem;
  }
}

.symbol-key:active {
  background: var(--code-accent);
  color: #ffffff;
  transform: scale(0.95);
}


/* ---- Complétion ---- */
.CodeMirror-hints {
  z-index: 1100;
  max-height: 18rem;
  min-width: 16rem;
  max-width: min(34rem, 92vw);
  padding: 0.25rem;
  border: 1px solid var(--code-border);
  border-radius: 10px;
  background: var(--code-panel-bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.85rem;
}

li.CodeMirror-hint {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  color: var(--code-text);
  white-space: normal;
}

li.CodeMirror-hint-active {
  background: var(--code-accent);
  color: #ffffff;
}

.hint-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.hint-name {
  font-weight: 700;
}

.hint-detail {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.75;
}

.hint-kind {
  margin-left: auto;
  padding: 0 0.4rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  opacity: 0.6;
  white-space: nowrap;
}

.hint-desc {
  margin-top: 0.1rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  opacity: 0.8;
}


/* ---- Analyse en direct ---- */
.CodeMirror .lint-gutter {
  width: 1.2rem;
}

/* Breakpoints: a red dot in the margin; the margin itself is clickable. */
.CodeMirror .breakpoints {
  width: 0.95rem;
  cursor: pointer;
}

.CodeMirror .breakpoints:hover {
  background: rgba(209, 69, 59, 0.12);
}

.breakpoint-dot {
  width: 0.62rem;
  height: 0.62rem;
  margin: 0.18rem 0 0 0.16rem;
  border-radius: 50%;
  background: #d1453b;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.trace-break-count {
  color: var(--code-muted, #626a7a);
  font-size: 0.78rem;
}

.trace-note.is-breakpoint {
  color: #d1453b;
  font-weight: 600;
}

.lint-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.1rem;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.lint-marker.is-error { background: var(--code-danger); }
.lint-marker.is-warning { background: #d98e04; border-radius: 3px; }
.lint-marker.is-info { background: var(--code-muted); font-style: italic; }

.lint-text {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.lint-text.is-error { text-decoration-style: wavy; text-decoration-color: var(--code-danger); }
.lint-text.is-warning { text-decoration-style: wavy; text-decoration-color: #d98e04; }
.lint-text.is-info { text-decoration-style: dotted; text-decoration-color: var(--code-muted); }

.CodeMirror-linebackground.lint-line-error {
  background: rgba(209, 69, 59, 0.1);
}

.lint-bar {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-top: 1px solid var(--code-border);
  background: var(--code-panel-bg);
}

.lint-bar .draft-notice {
  padding-left: 0.75rem;
  white-space: nowrap;
}

@media (pointer: coarse) {
  .lint-bar {
    flex-wrap: wrap;
  }

  .draft-reset {
    min-height: 44px;
  }
}

/* ---- Taille du texte ---- */
.font-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
  padding-left: 0.75rem;
}

.font-btn,
.font-size-label {
  min-width: 1.7rem;
  height: 1.6rem;
  padding: 0 0.3rem;
  border: 1px solid var(--code-border);
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.font-btn:hover:not(:disabled),
.font-size-label:hover {
  border-color: var(--code-accent);
}

.font-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.font-btn.is-small-a { font-size: 0.72rem; }
.font-btn.is-large-a { font-size: 1.05rem; }

.font-size-label {
  min-width: 2.6rem;
  border-style: dashed;
  color: var(--code-muted);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (pointer: coarse) {
  .font-btn,
  .font-size-label {
    height: 2rem;
    min-width: 2.2rem;
  }
}

.lint-status {
  padding: 0.1rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.lint-status[hidden] { display: none; }
.lint-status.is-ok { color: var(--code-muted); cursor: default; }
.lint-status.is-info { color: var(--code-muted); }
.lint-status.is-warning { color: #d98e04; }
.lint-status.is-error { color: var(--code-danger); font-weight: 600; }
.lint-status.is-off { color: var(--code-muted); border-style: dashed; }

.lint-panel {
  max-height: 11rem;
  overflow-y: auto;
  border-top: 1px solid var(--code-border);
  background: var(--code-bg);
}

.lint-panel[hidden] { display: none; }

.lint-list {
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
}

.lint-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  padding: 0.3rem 0.75rem;
  border: 0;
  background: none;
  color: var(--code-text);
  font: inherit;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.lint-item:hover,
.lint-item:focus-visible {
  background: var(--code-panel-bg);
  outline: none;
}

.lint-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
}

.lint-icon.is-error { background: var(--code-danger); }
.lint-icon.is-warning { background: #d98e04; border-radius: 3px; }
.lint-icon.is-info { background: var(--code-muted); }

.lint-where {
  flex: none;
  color: var(--code-muted);
  font-variant-numeric: tabular-nums;
}

.lint-disable {
  display: block;
  margin: 0 0.75rem 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--code-muted);
  font: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
}


/* ---- Résultat du test (bouton Tester) ---- */
.test-report {
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--code-border);
  border-left-width: 4px;
  border-radius: 8px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  white-space: normal;
}

.test-report.is-pass { border-left-color: #2f9e6b; }
.test-report.is-fail { border-left-color: var(--code-danger); }

.test-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.test-mark { font-weight: 700; }
.test-report.is-pass > .test-title .test-mark,
.test-constraints li.is-pass .test-mark { color: #2f9e6b; }
.test-report.is-fail > .test-title .test-mark,
.test-constraints li.is-fail .test-mark { color: var(--code-danger); }

.test-section { margin-top: 0.7rem; }

.test-section-title {
  margin-bottom: 0.3rem;
  color: var(--code-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.test-block { margin-bottom: 0.35rem; }

.test-label {
  color: var(--code-muted);
  font-size: 0.78rem;
}

.test-pre {
  margin: 0.1rem 0 0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: var(--code-bg);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.test-pre.is-pass { box-shadow: inset 3px 0 0 #2f9e6b; }
.test-pre.is-error { box-shadow: inset 3px 0 0 var(--code-danger); }

.test-difference,
.test-hint {
  margin: 0.35rem 0 0;
}

.test-hint {
  padding-left: 0.6rem;
  border-left: 3px solid var(--code-accent);
  color: var(--code-muted);
}

.test-constraints {
  margin: 0;
  padding: 0;
  list-style: none;
}

.test-constraints li { padding: 0.1rem 0; }

.test-notes {
  margin-top: 0.7rem;
  color: var(--code-muted);
  font-size: 0.8rem;
}

.test-notes p { margin: 0.1rem 0; }


/* ---- Pas à pas : champs d'un objet ---- */
.trace-vars tr.trace-field td {
  color: var(--code-muted);
  font-size: 0.92em;
}

.trace-vars tr.trace-field.is-changed td {
  color: var(--code-text);
}

/* ---- Exam mode ---------------------------------------------------------------
   The editor alone: no navigation, no explorer, no saving or sharing. */
.exam-mode .navbar,
.exam-mode #save-btn,
.exam-mode #share-btn,
.exam-mode #draft-notice,
.exam-mode #example-notice {
  display: none !important;
}

.exam-bar[hidden],
#exam-statement[hidden],
.exam-overlay[hidden] {
  display: none;
}

.exam-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--code-text);
}

.exam-timer.is-low {
  color: var(--code-danger);
}

.exam-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  background: var(--code-bg);
  color: var(--code-text);
}

.exam-overlay-warning {
  background: var(--code-panel-bg);
}

.exam-card {
  max-width: 40rem;
  width: 100%;
}

.exam-card .title,
.exam-card .subtitle,
.exam-card li,
.exam-card p {
  color: inherit;
}

/* Moderator's comment on a rejected challenge solution, shown above the editor. */
.rejection-notice {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.75rem;
  border-left: 4px solid #f14668;
  border-radius: 4px;
  background: rgba(241, 70, 104, 0.12);
  font-size: 0.9rem;
  white-space: pre-line;
}
.attempts-note { font-weight: 400; opacity: 0.75; }

/* The save dialog's two icon buttons sit apart. */
.modal-card-foot { gap: 0.5rem; }

/* The exam screens' big icon buttons. */
.exam-card .button.icon-btn.is-medium { font-size: 1.1rem; width: 3em; height: 2.4em; }
.exam-card .button.icon-btn.is-medium .btn-icon { width: 1.4em; height: 1.4em; }

/* ---- Le dessin du programme (Avancer, Droite, Crayon…) ---- */
.drawing-panel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.75rem;
  border-bottom: 1px solid var(--code-border);
}

.drawing-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: stretch;
}

.drawing-title {
  margin-right: auto;
  font-weight: 600;
  color: var(--code-text);
}

.drawing-canvas {
  /* a square that fits the pane: never taller than about half of it */
  width: min(100%, 46vh);
  aspect-ratio: 1;
  height: auto;
  background: #ffffff;
  border: 1px solid var(--code-border);
  border-radius: 6px;
}

.drawing-panel[hidden] {
  display: none;
}

/* The button that turns on the offline mode (see local-engine.js): a pill like the lint status, next to it. */
.offline-btn {
  margin-left: 0.5rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  text-decoration: none;
  white-space: nowrap;
}

.offline-btn[hidden] { display: none; }
.offline-btn:disabled { color: var(--code-muted); cursor: default; }

/* The note under a test report when the submission was kept on the device instead of being sent. */
.queued-note {
  margin-top: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--code-accent);
  border-radius: 6px;
  font-size: 0.9rem;
}
