/* Demonstrations share the typography, palette and controls of the course. */
.lecture-seven .uml-link {
  flex-basis: 100%;
  text-align: right;
}
.lecture-seven .source-links { max-width: 250px; }

.lecture-seven pre.python-code {
  padding: 12px 15px;
  overflow-x: auto;
  white-space: pre;
  font: 14px/1.55 Consolas, "Liberation Mono", monospace;
}

.l7-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 9px;
  margin-bottom: 8px;
}

.l7-options button,
.l7-options input {
  border: 1px solid #bec8d6;
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  min-height: 32px;
  padding: 5px 10px;
  font: inherit;
}

.l7-options input { width: 130px; }
.l7-options button:hover:not(:disabled) { background: #edf2f9; }
.l7-options button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 650;
}
.l7-options button:disabled { opacity: .45; cursor: default; }
.l7-options input[aria-invalid="true"] { border-color: #993b38; }

.l7-demo .demo-explanation {
  block-size: 76px;
  margin: 10px 0 12px;
}
.prose .l7-demo :not(pre) > code { font-size: max(12px, .9em); }

.l7-binding,
.l7-race,
.l7-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.l7-card,
.l7-race li {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 12px;
  background: white;
}
.l7-card h4 {
  font-size: 14px;
  margin: 0 0 6px;
}
.l7-card.is-active {
  border-color: #bd772b;
  box-shadow: inset 3px 0 #bd772b;
}
.l7-method {
  grid-column: 1 / -1;
  border-color: #96b1d1;
  background: #edf4fc;
}
.l7-method p {
  display: inline-block;
  margin-right: 12px;
}
.l7-method span { color: var(--accent); margin: 0 3px; }
.l7-output { min-height: 1.5em; margin-top: 8px; }
[data-lecture7="super"] .l7-output > code { display: block; width: fit-content; }

.prose .l7-race,
.prose .l7-mro {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.l7-race p { margin-top: 5px; }
.l7-terminal .code-block { margin: 4px 0 8px; }
.l7-terminal pre { min-height: 76px; }

.l7-mro {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.l7-mro li {
  flex: 1;
  min-width: 88px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  padding: 6px 8px;
}
.l7-mro li[data-status="sprawdzono"] { background: #f1f4f8; }
.l7-mro li[data-status="trafienie"] {
  border-color: var(--accent);
  background: #eaf2fd;
  box-shadow: inset 3px 0 var(--accent);
}
.l7-mro small { display: block; font-size: 12px; color: var(--muted); }

.l7-fields {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 3px 0;
}
.l7-fields dd { margin: 0; }
.l7-two-columns { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.l7-two-columns .code-block { margin-top: 0; }

.l7-error {
  color: #963333;
  font-size: 13px;
}
.l7-error:empty { margin: 0; }
.l7-account-state { margin: 3px 0 10px; }
.l7-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.l7-accounts {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 6px;
}
.l7-accounts caption {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 4px;
}
.l7-accounts th,
.l7-accounts td {
  border: 1px solid var(--line);
  padding: 7px 9px;
  background: white;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}
.l7-accounts th { background: #edf3fb; }
.l7-accounts code { overflow-wrap: anywhere; }
.l7-rate { font-size: 13px; color: var(--muted); }
.l7-accounts [data-role="balances"] td {
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.l7-accounts [data-role="methods"] p { margin-top: 4px; }
.l7-accounts [data-status="Odrzucono"] { color: #8c4223; }
.l7-accounts [data-status="Niedostępne"] { color: var(--muted); }

@media (max-width: 860px) {
  .l7-two-columns { grid-template-columns: minmax(0, 1fr); }
  .l7-options button, .l7-options input { padding-inline: 7px; }
}
