/* The MoaV mark is a maze pattern -- at the theme's default 1.2rem the inner
   corridors close up into a solid blob. A few extra pixels keep them open
   without unbalancing the header. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.75rem;
  width: 1.75rem;
}

/* No override for the drawer logo. Material reserves exactly 3rem of top
   padding in .md-nav__title for an absolutely-positioned 2.4rem mark; anything
   taller spills onto the "MoaV Docs" title underneath it. */

/* Terminal demos. preload="none" means nothing is fetched until the reader
   presses play, so a page carrying three of these costs what it did before --
   these docs are read on connections where a 1.7 MB autoplay would be rude. */
.moav-demo {
  display: block;
  width: 100%;
  max-width: 40rem;
  margin: 1em 0 0.3em;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.2rem;
  background: #0a0a0f; /* the terminalizer theme colour, so letterboxing blends */
}

/* Weight and size under each demo, so nobody on metered data is surprised. */
.moav-demo-caption {
  display: block;
  margin: 0 0 1.4em;
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}

/* YouTube embeds on the tutorials page. aspect-ratio keeps it 16:9 without the
   old padding-hack wrapper, and the iframe is only ever loaded lazily -- the page
   should cost nothing until someone scrolls to it. */
.moav-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  margin: 1rem auto 0.4rem;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.moav-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* "Edit this page" as a floating action button in the bottom corner, rather than
   the small pencil Material puts inline at the top of the content. Contributing a
   fix is the thing we most want a reader to do, and inline it reads as decoration.
   Exactly one .md-content__button exists per page (only content.action.edit is
   enabled), so the class is safe to target -- the title attribute is not, being
   localised ("Edit this page" / "این صفحه را ویرایش کنید").
   inset-inline-end, not right: on the RTL Farsi pages it belongs in the opposite
   corner, and the logical property flips on its own. */
.md-content__button.md-icon {
  position: fixed;
  inset-inline-end: 1.1rem;
  bottom: 1.1rem;
  z-index: 3;
  float: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  color: var(--md-default-bg-color);
  background: var(--md-primary-fg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.md-content__button.md-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}
.md-content__button.md-icon:hover,
.md-content__button.md-icon:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
  color: var(--md-default-bg-color);
}
.md-content__button.md-icon:focus-visible {
  outline: 2px solid var(--md-accent-fg-color);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .md-content__button.md-icon { transition: none; }
  .md-content__button.md-icon:hover { transform: none; }
}
