/* Reusable page presets for MkDocs Material */

/*
Opt-in preset: add to a page's YAML front matter

---
class: preset-hide-navlist
---

This does NOT require any template overrides. We rely on the `class:` page
metadata that Material for MkDocs adds inside the page content area, and we
use :has() to scope global changes only when that class is present on the page.
*/

/* Hide the primary nav list on larger screens when the page opted in. */
body:has(.preset-hide-navlist) .md-nav__list {
  display: none !important;
}

/* Restore the nav list on small screens */
@media screen and (max-width: 76.25em) {
  body:has(.preset-hide-navlist) .md-nav__list {
    display: block !important;
  }
}

/* Simple print toolbar for CV page */
.cv-print-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin: .25rem 0 1rem 0;
}

.cv-print-btn {
  padding: .45rem .75rem;
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  border: none;
  border-radius: .25rem;
  cursor: pointer;
  font: inherit;
}

.cv-print-btn:hover {
  filter: brightness(0.95);
}

/* Hide UI chrome when printing the CV page and ensure content uses full width */
@media print {
  .cv-print-toolbar { display: none !important; }
  body:has(.preset-hide-navlist) .md-header,
  body:has(.preset-hide-navlist) .md-nav,
  body:has(.preset-hide-navlist) .md-sidebar,
  body:has(.preset-hide-navlist) .md-footer { display: none !important; }
  body:has(.preset-hide-navlist) .md-main__inner { margin: 0 !important; }
  body:has(.preset-hide-navlist) .md-content { max-width: 100% !important; }
}