/* Local adaptation of mintresearch.org/assets/presentation-shell.css.
   The GitHub Pages origin keeps its own controller while sharing MINT's
   remotely maintained banner and navigation assets. */
:root {
  --presentation-status-h: var(--statusline-h, 30px);
}

html,
body.presentation-shell-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body.presentation-shell-page {
  padding-bottom: 0;
}

.presentation-main {
  position: fixed;
  inset: var(--banner-h, 132px) 0 var(--presentation-status-h) var(--sidebar-w, 240px);
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 8px 12px 12px;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  background: var(--bg-1);
  transition: inset 0.3s ease, padding 0.2s ease;
}

.presentation-toolbar {
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.presentation-stage {
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-0);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
}

.presentation-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg-0);
}

body.sidebar-collapsed .presentation-main {
  left: 0;
  margin-left: 0;
}

.presentation-mode-toggle {
  position: relative;
  z-index: 1;
  min-width: 92px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  background: var(--bg-0);
  color: var(--accent);
  font: 600 10px/1 var(--font-ui);
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.3);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.presentation-mode-toggle:hover,
.presentation-mode-toggle:focus-visible {
  border-color: var(--accent);
  background: var(--bg-2);
  color: var(--accent-bright);
  outline: none;
}

.presentation-mode-toggle .presentation-icon-exit,
body.presentation-mode .presentation-mode-toggle .presentation-icon-enter {
  display: none;
}

body.presentation-mode .presentation-mode-toggle .presentation-icon-exit {
  display: inline;
}

body.presentation-mode .presentation-main {
  inset: 0;
  z-index: 1000;
  display: block;
  padding: 0;
}

body.presentation-mode .presentation-stage {
  border: 0;
  box-shadow: none;
}

body.presentation-mode .presentation-toolbar {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10002;
}

body.presentation-mode .presentation-mode-toggle {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  opacity: 0.42;
}

body.presentation-mode .presentation-mode-toggle:hover,
body.presentation-mode .presentation-mode-toggle:focus-visible {
  opacity: 1;
}

body.presentation-mode .presentation-mode-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.presentation-mode .sidebar,
body.presentation-mode .sidebar-toggle,
body.presentation-mode .top-banner,
body.presentation-mode .statusline,
body.presentation-mode .mobile-menu-btn,
body.presentation-mode .mobile-overlay,
body.presentation-mode .search-overlay {
  display: none !important;
}

@media (max-width: 900px) {
  :root {
    --presentation-status-h: 49px;
  }

  .presentation-main,
  body.sidebar-collapsed .presentation-main {
    left: 0;
    margin-left: 0;
    padding: 6px 8px 8px;
  }

  .presentation-mode-toggle {
    min-width: 84px;
  }
}

@media (max-width: 560px) {
  .presentation-main,
  body.sidebar-collapsed .presentation-main {
    grid-template-rows: 32px minmax(0, 1fr);
    padding: 4px 5px 5px;
  }

  .presentation-mode-toggle {
    min-width: 78px;
    height: 26px;
    padding-inline: 8px;
    font-size: 9px;
  }
}

/* Short phone windows cannot afford the desktop-style two-line masthead.
   Keep the same shared assets, but use the compact horizontal contract. */
@media (max-width: 900px) and (max-height: 700px) {
  .top-banner {
    min-height: 44px;
    padding: 3px 0;
  }

  .top-banner-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 7px;
    padding: 3px 48px 3px 10px;
  }

  .top-banner-logo {
    height: 28px;
  }

  .top-banner-minties {
    flex-wrap: nowrap;
    gap: 2px;
  }

  .top-banner-minty {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 900px) and (max-height: 500px) {
  :root {
    --presentation-status-h: 0px;
  }

  .statusline {
    display: none;
  }

  .presentation-main,
  body.sidebar-collapsed .presentation-main {
    display: block;
    padding: 5px;
  }

  .presentation-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
  }

  .presentation-stage {
    width: 100%;
    height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .presentation-main,
  .presentation-mode-toggle {
    transition: none;
  }
}
