/* NHHIP navigation styling. Append to an existing publish.css if present. */
.nav-view .nhhip-navigation-list {
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

.nav-view .nhhip-section-heading {
  margin: 1.4rem 0 0.4rem;
  padding: 0 8px;
  color: var(--text-normal);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.nav-view .nhhip-navigation-list > .tree-item > .tree-item-self {
  padding-left: 8px;
}

.nav-view .nhhip-navigation-list .tree-item-inner,
.nav-view .nhhip-navigation-list .tree-item-inner a {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Desktop: keep the existing site navigation on the left.
   Explicitly resets the earlier right-side customization.
   Mobile keeps Obsidian Publish's native drawer behavior. */
@media (min-width: 1000px) {
  .site-body > .site-body-center-column { order: 1; }
  .site-body > .site-body-right-column { order: 2; }
  .site-body > .site-body-left-column {
    order: 0;
    border-left: 0;
    border-right: 1px solid var(--background-modifier-border);
  }
}

/* NHHIP image viewer: an uncluttered canvas with floating controls. */
.markdown-preview-view img:not(.emoji) { cursor: zoom-in; }
.markdown-preview-view img[role="button"]:focus-visible {
  outline: 3px solid var(--interactive-accent);
  outline-offset: 4px;
}
dialog.nhhip-image-dialog {
  position: fixed;
  inset: 0;
  width: 96vw;
  height: 94vh;
  height: 94dvh;
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f5f5f3;
  color: #30332f;
  box-shadow: 0 20px 80px #0004;
  font-family: inherit;
}
dialog.nhhip-image-dialog[open] { display: block; }
dialog.nhhip-image-dialog::backdrop { background: #17201880; }
.nhhip-image-header {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  padding: 0;
}
.nhhip-image-title, .nhhip-image-help { display: none; }
/* Keep the current zoom available to assistive technology without a readout. */
.nhhip-image-percent {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.nhhip-image-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 4px;
  border: 1px solid #30332f12;
  border-radius: 12px;
  background: #fffffff2;
  box-shadow: 0 3px 14px #00000012;
}
.nhhip-image-dialog button, .nhhip-image-dialog .nhhip-image-original {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #30332f;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}
.nhhip-image-dialog button:hover, .nhhip-image-dialog .nhhip-image-original:hover {
  background: #eef0eb;
  color: #171a15;
}
.nhhip-image-dialog button:focus-visible,
.nhhip-image-dialog a:focus-visible,
.nhhip-image-viewport:focus-visible {
  outline: 2px solid #59734a;
  outline-offset: -2px;
}
.nhhip-image-dialog .nhhip-image-close {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #30332f12;
  border-radius: 50%;
  background: #fffffff2;
  box-shadow: 0 3px 14px #00000012;
  font-size: 0;
}
.nhhip-image-dialog .nhhip-image-close::after {
  content: "×";
  font-size: 26px;
  font-weight: 300;
}
.nhhip-image-dialog .nhhip-image-original {
  margin-left: 2px;
  padding: 0;
  font-size: 0;
}
.nhhip-image-original::after { content: "↗"; font-size: 20px; }
.nhhip-image-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f5f5f3;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.nhhip-image-viewport.is-dragging { cursor: grabbing; }
.nhhip-image-viewport .nhhip-image-full {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  transform-origin: center;
  pointer-events: none;
  user-select: none;
  border: 0;
}
.nhhip-image-full[hidden] { display: none; }
.nhhip-image-status {
  position: absolute;
  inset: 45% 16px auto;
  margin: 0;
  text-align: center;
  color: #666b61;
  font-size: 15px;
  pointer-events: none;
}
@media (max-width: 600px) {
  dialog.nhhip-image-dialog {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  .nhhip-image-header { top: 10px; right: 10px; }
  .nhhip-image-toolbar { top: 10px; left: 10px; gap: 0; padding: 2px; }
  .nhhip-image-dialog button, .nhhip-image-dialog .nhhip-image-original {
    min-width: 36px;
    min-height: 44px;
    padding: 0 8px;
  }
  .nhhip-image-dialog .nhhip-image-close { padding: 0; }
}
