/* "Editar conteúdo" (public/content-editor.js): the lesson as a list of
   steps, in the participant's order, edited in place like a form. */
.content-editor-panel > p:first-of-type {
  max-width: 70ch;
}
.content-editor-pane {
  min-width: 0;
}
.lesson-editor-head {
  margin-bottom: 12px;
}
.lesson-editor-head h2 {
  margin: 4px 0 8px;
}
.editor-field {
  margin: 10px 0;
}
.editor-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}
.editor-field :is(input, textarea, select) {
  width: 100%;
  min-width: 0;
}
.editor-field textarea {
  line-height: 1.6;
  resize: vertical;
}
.content-editor :is(input, textarea)[readonly] {
  background: #f1f3f4;
  color: #3c4043;
}
/* The steps of a lesson: a numbered list, one row for each step, like the
   slides of a presentation. A row opens to show the step's fields. */
.step-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 20px;
  margin: 18px 0 6px;
}
.step-toolbar h3 {
  margin: 0 0 2px;
}
.step-toolbar p {
  margin: 0;
  max-width: 62ch;
}
.step-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.step-card {
  margin: 0;
  background: var(--white, #fff);
  border: 1px solid #cfd8e3;
  border-left: 4px solid var(--nexo-navy, #0c305b);
  min-width: 0;
  overflow-wrap: anywhere;
}
.step-card.is-locked {
  background: #f5f7fa;
  border-left-color: #8a96a3;
}
.step-card.is-open {
  box-shadow: 0 2px 10px #0a17261f;
}
.step-card.has-issue {
  border-color: #b3261e;
  border-left-color: #b3261e;
}
.step-card-head {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.content-editor .step-toggle {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.content-editor .step-toggle:hover {
  background: #f1f5fa;
}
.step-number {
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--nexo-navy, #0c305b);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 50%;
}
.step-card.is-locked .step-number {
  background: #5c6875;
}
.step-icon {
  flex: 0 0 auto;
  color: var(--nexo-navy, #0c305b);
}
.step-heading {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.step-kind {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nexo-navy, #0c305b);
}
.step-card.is-locked .step-kind {
  color: #4a5561;
}
.step-title {
  font-size: 0.95rem;
}
.step-summary {
  color: #4a5561;
  font-size: 0.9rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-summary.is-empty {
  font-style: italic;
}
.step-thumb[hidden] {
  display: none;
}
.step-chevron {
  flex: 0 0 auto;
  width: 0.6rem;
  height: 0.6rem;
  margin: 0 6px 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.step-card.is-open .step-chevron {
  margin-bottom: -4px;
  transform: rotate(-135deg);
}
.step-lock {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  background: #e6e9ee;
  color: #3c4043;
}
/* A lock drawn here (an emoji needs a font every device may not have). */
.step-lock::before {
  content: "";
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.35em;
  vertical-align: -0.05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h1a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm2 0h4V5a2 2 0 1 0-4 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h1a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1zm2 0h4V5a2 2 0 1 0-4 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.step-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 8px;
}
.step-tools button {
  min-width: 2.5rem;
}
.step-card-body {
  padding: 6px 16px 14px;
  border-top: 1px solid #e3e8ef;
}
.step-card-body > p:first-child {
  margin-top: 8px;
}
.step-card-body > .editor-image,
.step-thumb {
  display: block;
  max-width: 100%;
  max-height: 260px;
  margin: 8px 0;
  border: 1px solid #dce2ea;
}
.step-thumb {
  max-width: 240px;
}
.step-card-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #cfd8e3;
}
.step-card-foot .field-note {
  flex: 1 1 260px;
  margin: 0;
}
.step-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.step-issue {
  margin: 0;
  padding: 0 16px 10px;
  color: #b3261e;
  font-weight: 600;
}
/* Between two steps: where a new one may enter. */
.step-insert {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 30px;
}
.step-insert::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dashed transparent;
}
.step-insert:hover::before,
.step-insert:focus-within::before {
  border-top-color: #8fa3ba;
}
.content-editor .step-insert .step-add {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #8fa3ba;
  border-radius: 50%;
  color: var(--nexo-navy, #0c305b);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}
.content-editor .step-insert .step-add:hover,
.content-editor .step-insert .step-add:focus-visible {
  background: var(--nexo-navy, #0c305b);
  border-color: var(--nexo-navy, #0c305b);
  color: #fff;
}
.content-editor .step-insert .step-add:disabled {
  opacity: 0.4;
}
/* The steps the manager took out of the lesson. */
.step-hidden {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f5f7fa;
  border: 1px dashed #b8c2cc;
}
.step-hidden h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.step-hidden p {
  margin: 0;
}
.step-hidden ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.step-hidden li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #e3e8ef;
  font-weight: 600;
}
/* "Adicionar etapa": every kind of step, to choose from. */
.step-chooser {
  width: min(860px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 22px 24px;
  border: 1px solid #cfd8e3;
  border-radius: 0;
  color: #0a1726;
  overflow: auto;
}
.step-chooser::backdrop {
  background: #0a172699;
}
.step-chooser-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.step-chooser h2 {
  margin: 0;
}
.step-chooser h3 {
  margin: 18px 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a5561;
}
.step-chooser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.step-chooser .step-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  align-items: start;
  min-height: 72px;
  margin: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #cfd8e3;
  color: #0a1726;
  font-weight: 400;
  text-align: left;
  white-space: normal;
}
.step-chooser .step-tile:hover,
.step-chooser .step-tile:focus-visible {
  background: #f1f5fa;
  border-color: var(--nexo-navy, #0c305b);
}
.step-tile .step-icon {
  grid-row: 1 / span 2;
  margin-top: 2px;
}
.step-tile strong {
  font-size: 1rem;
}
.step-tile span {
  grid-column: 2;
  color: #4a5561;
  font-size: 0.88rem;
  line-height: 1.35;
}
/* A video step: where the video comes from, and the file being sent. */
.content-editor .editor-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 12px 0 4px;
  padding: 0;
  border: 0;
}
.content-editor .editor-sources legend {
  margin-bottom: 4px;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
}
.editor-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.editor-source input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--nexo-navy, #0c305b);
}
.step-link-status {
  margin: -4px 0 8px;
}
.step-upload-status {
  min-height: 1.2em;
  margin: 6px 0;
  color: var(--nexo-navy, #0c305b);
  font-weight: 600;
}
.step-upload-status.is-error {
  color: #b3261e;
}
.step-video {
  display: block;
  width: 100%;
  max-height: 340px;
  margin: 8px 0;
  background: #000;
}
.step-video-controls details {
  margin: 10px 0;
}
.step-narration {
  margin-top: 10px;
}
.step-narration .course-prose {
  max-height: 240px;
  overflow: auto;
  padding: 8px 0;
}
.step-image img,
.step-image .editor-image {
  max-width: 100%;
  max-height: 220px;
}
.editor-options,
.editor-list,
.editor-node,
.editor-material {
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid #dce2ea;
  min-width: 0;
}
.editor-options legend,
.editor-list legend,
.editor-node legend,
.editor-material legend {
  font-weight: 600;
  padding: 0 4px;
}
.editor-option,
.editor-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.editor-option input:not([type="radio"]),
.editor-row input:not([type="checkbox"]) {
  flex: 1 1 auto;
  min-width: 0;
}
.editor-option input[type="radio"],
.editor-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--green, #1b4741);
}
/* The alternative marked as the right one. */
.editor-option:has(input[type="radio"]:checked) input:not([type="radio"]) {
  border-color: #1e7a46;
  background: #eef7f1;
}
.editor-option:has(input[type="radio"]:checked)::after {
  content: "correta";
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e7a46;
}
.editor-row-number {
  flex: 0 0 auto;
  min-width: 1.5rem;
  font-weight: 600;
}
.editor-pair span[aria-hidden] {
  flex: 0 0 auto;
}
.editor-choice {
  margin: 10px 0;
  padding: 8px 10px;
  background: #f8f9fb;
  border-left: 3px solid #b8c2cc;
}
.editor-choice-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 600;
}
.lesson-materials {
  margin-top: 20px;
  padding-top: 8px;
  border-top: 1px solid #dce2ea;
}
.lesson-materials h3 {
  margin-bottom: 4px;
}
.editor-issues {
  margin: 0 0 16px;
}
.editor-issues ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
.content-editor .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.content-editor .maintenance-tree button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 4px 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.content-editor .maintenance-tree button[aria-current] {
  background: #e6edf7;
  border-color: #456c99;
  color: #0c305b;
}
.editor-savebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
body.high-contrast .step-card,
body.high-contrast .step-card.is-locked,
body.high-contrast .step-hidden,
body.high-contrast .step-chooser,
body.high-contrast .step-chooser .step-tile,
body.high-contrast .editor-choice {
  background: #111;
  color: #fff;
}
body.high-contrast :is(.step-kind, .step-summary, .step-icon),
body.high-contrast .step-tile span,
body.high-contrast .step-chooser h3 {
  color: #fff;
}
body.high-contrast .content-editor .step-toggle:hover {
  background: #333;
}
@media (max-width: 720px) {
  .step-card-head {
    flex-wrap: wrap;
  }
  .content-editor .step-toggle {
    flex-basis: 100%;
  }
  .step-tools {
    width: 100%;
    justify-content: flex-end;
    padding: 0 8px 8px;
  }
  .step-summary {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .step-insert {
    height: 40px;
  }
  .content-editor .step-insert .step-add {
    width: 34px;
    height: 34px;
  }
  .editor-pair {
    flex-wrap: wrap;
  }
  .editor-pair input {
    flex-basis: 100%;
  }
  .editor-pair span[aria-hidden] {
    display: none;
  }
}
