/* ==========================================================================
   Print and PDF styles — Glider Operations Knowledge Base
   ========================================================================== */

/* --------------------------------------------------------------------------
   Screen: print button shown on checklist pages
   -------------------------------------------------------------------------- */
.print-button {
  display: inline-block;
  padding: 0.4em 1em;
  background-color: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color) !important;
  border-radius: 4px;
  text-decoration: none !important;
  font-size: 0.8rem;
  cursor: pointer;
  margin-bottom: 1em;
}

.print-button:hover {
  background-color: var(--md-accent-fg-color);
}

/* --------------------------------------------------------------------------
   Print media — hide navigation chrome, keep content full-width
   -------------------------------------------------------------------------- */
@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-search,
  [data-md-component="search"],
  [data-md-component="header-topic"],
  .md-content__button,
  .print-button {
    display: none !important;
  }

  .md-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 1cm !important;
  }

  .md-main__inner {
    margin: 0 !important;
  }

  body {
    font-size: 11pt;
    color: #000 !important;
  }

  h1 { font-size: 20pt; margin-top: 0; }
  h2 { font-size: 15pt; page-break-after: avoid; }
  h3 { font-size: 12pt; page-break-after: avoid; }

  .md-typeset .task-list-item { page-break-inside: avoid; }
  .md-typeset .admonition { page-break-inside: avoid; }
  table { page-break-inside: avoid; }

  /* Render checkboxes as printable empty boxes */
  .md-typeset .task-list-item input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 12pt;
    height: 12pt;
    border: 1.5pt solid #333;
    display: inline-block;
    margin-right: 6pt;
    vertical-align: middle;
    flex-shrink: 0;
  }

  .md-typeset .task-list-item input[type="checkbox"]:checked::after {
    content: "✓";
    font-size: 10pt;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  a[href]::after {
    content: none;
  }

  pre {
    white-space: pre-wrap;
    border: 1pt solid #ccc;
    padding: 0.5em;
    font-size: 9pt;
  }
}

/* --------------------------------------------------------------------------
   Platform graphics (Glider Components)
   -------------------------------------------------------------------------- */

/* Small icon-sized image used inside the platform "grid cards" */
.md-typeset .platform-icon {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 0 0.4em 0;
}

/* Larger banner image at the top of a platform landing page */
.md-typeset .platform-banner {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  margin: 0.5em 0 1em 0;
}

/* The artwork is black line-art on a transparent/white background.
   In dark mode, invert so the lines read as light on the dark surface. */
[data-md-color-scheme="slate"] .md-typeset .platform-icon,
[data-md-color-scheme="slate"] .md-typeset .platform-banner {
  filter: invert(1) hue-rotate(180deg);
}

/* --------------------------------------------------------------------------
   Checklist layout improvements (screen)
   -------------------------------------------------------------------------- */
.md-typeset .task-list-item {
  padding: 0.2em 0;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset .task-list-item:last-child {
  border-bottom: none;
}
