/* Kontext-Hilfe-Button (Header) und Vollbild-Overlay (Body-Ebene) */
.erp-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 2.25rem;
  font-weight: 600;
  flex-shrink: 0;
}
.erp-help-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--secondary-color, #3d8b99);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

/* Overlay direkt unter body — nicht im Header (backdrop-filter bricht position:fixed) */
.erp-help-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  box-sizing: border-box;
}
.erp-help-overlay.is-open {
  display: flex;
}
.erp-help-panel {
  background: var(--bg-primary, #fff);
  border-radius: 0.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  width: min(820px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  margin: auto;
}
.erp-help-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  flex-shrink: 0;
}
.erp-help-panel__body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.erp-help-panel__footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-secondary, #f8fafc);
  flex-shrink: 0;
}
.handbook-viewer--embed .handbook-article {
  border: none;
  padding: 0;
  margin: 0;
}
.handbook-viewer--embed .handbook-article h2 {
  font-size: 1.25rem;
  margin-top: 0;
}
.handbook-viewer--embed .handbook-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  border: 1px solid var(--border-color, #e2e8f0);
}

body.help-context-open {
  overflow: hidden;
}

@media (max-width: 575px) {
  .erp-help-overlay {
    padding: 0;
    align-items: stretch;
  }
  .erp-help-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
}
