/* =========================================================
   GLOBAL HELP MODAL
   Styled to match previous application_2 help modal
   ========================================================= */

.help-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 7000;
}

.help-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  background: #FFFCEB;
  width: 1000px;
  min-height: 500px;

  border: 1px solid #bdbdbd;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);

  z-index: 7010;

  display: flex;
  flex-direction: column;

  /*
    Important:
    Menu page uses Lucida Bright globally.
    Previous help modal text looked different because the modal content
    should control its own font instead of inheriting the page font.
  */
  font-family: Lucida Bright, Arial, sans-serif;
}

/* Header */
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 14px;
  border-bottom: 1px solid #d9d9d9;
  background: #E6DFC5;

  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.help-title {
  font-size: 16px;
  font-weight: 700;
  color: #42597d;
}

/* Top-right X */
.help-close {
  border: 0 !important;
  background: transparent !important;
  cursor: pointer;

  font-size: 18px;
  line-height: 1;
  padding: 6px 10px;
  min-width: 0 !important;

  color: #4F7146;
  box-shadow: none !important;
}

.help-close:hover,
.help-close:focus,
.help-close:focus-visible {
  background: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Body */
.help-body {
  position: relative;
  flex: 1;

  padding-top: 14px;
  padding-bottom: 14px;

  /* increased left margin; right still slightly wider */
  padding-left: 42px;
  padding-right: 95px;

  overflow-y: auto;
  min-height: 380px;

  background: #FFFCEB;
}

/* Main help text */
.help-text {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #000;
}

/* Normal rendered text lines */
.help-text .help-line {
  margin-bottom: 9px;
  line-height: 1.45;
}

/* Paragraph spacing */
.help-text p,
.help-text .help-p {
  margin: 0;
}

.help-text .help-spacer {
  height: 10px;
}

/* Headings produced by helpMarkupToHtml() */
/* This matches the previous modal heading style for headings like "Panels" */
.help-text h1,
.help-text .help-h1 {
  font-family: "Bodoni MT Black", Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: #4F7146;
  margin: 0 0 10px;
}

.help-text h2,
.help-text .help-h2 {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: #7A5738;
  margin: 14px 0 8px;
}

.help-text h3,
.help-text .help-h3 {
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: #7A5738;
  margin: 12px 0 6px;
}

/* Lists */
.help-text ul,
.help-text ol {
  margin: 6px 0 10px 22px;
  padding: 0;
}

.help-text li {
  margin: 0 0 6px 0;
}

/* Inline emphasis */
.help-text strong {
  color: #8A5A30;
}

.help-text em {
  font-style: italic;
}

.help-text u {
  text-decoration: underline;
}

.help-text del {
  opacity: 0.8;
}

.help-du {
  text-decoration: underline double;
}

/* Inline code */
.help-text code {
  background: rgba(255,255,255,0.75);
  border: 1px solid #d5cbb0;
  border-radius: 5px;
  padding: 1px 5px;
  font-family: Consolas, "Courier New", monospace;
}

/* Links */
.help-text a {
  color: #0b57d0;
  text-decoration: underline;
}

/* Quotes */
.help-text blockquote,
.help-quote {
  border-left: 5px solid #C9A06A;
  background: rgba(201,160,106,0.12);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 10px 0;
}

/* Pre/code blocks */
.help-pre {
  background: rgba(255,255,255,0.75);
  border: 1px solid #d5cbb0;
  padding: 10px;
  overflow: auto;
  border-radius: 8px;
  font-family: Consolas, "Courier New", monospace;
}

/* Horizontal line */
.help-hr {
  border: 0;
  border-top: 1px solid #d5cbb0;
  margin: 12px 0;
}

/* Semantic inline tokens */
.help-warn {
  color: #9b1c1c;
  font-weight: 700;
}

.help-tip {
  color: #245c2a;
  font-weight: 700;
}

.help-req {
  color: #7A5738;
  font-weight: 700;
}

.help-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #E6DFC5;
  font-weight: 700;
}

/* Marker anchor */
.help-mark {
  display: block;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Footer */
.help-foot {
  padding: 12px 14px;
  border-top: 1px solid #d9d9d9;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;

  background: #E6DFC5;

  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Close button */
.help-close-btn {
  padding: 8px 14px;
  border: 1px solid #bdbdbd;
  background: #B97A57;
  border-radius: 8px;
  cursor: pointer;

  color: #4F7146;
  font-weight: 700;
  min-width: 90px;
}

.help-close-btn:hover {
  background: #A86E50;
  border-color: #9C6550;
  filter: none;
}

/* Navigation arrows */
.help-nav {
  position: absolute;
  top: 16px;
  z-index: 10;

  width: 18px !important;
  height: 34px !important;
  min-width: 0 !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  color: #4F7146;
  cursor: pointer;

  font-size: 24px;
  line-height: 1;

  box-shadow: none !important;
}

.help-prev {
  right: 70px;
}

.help-next {
  right: 16px;
}

.help-nav:hover,
.help-nav:focus,
.help-nav:focus-visible {
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  filter: none !important;
}

.help-nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.help-text ol.help-alpha {
  list-style-type: lower-alpha;
  margin: 6px 0 10px 52px;
  padding: 0;
}

.help-text ol.help-alpha li {
  margin: 0 0 8px 0;
  line-height: 1.45;
}

.help-right {
  display: block;
  text-align: right;
  font-style: italic;
  font-size: 14px;
  margin-top: 12px;
  margin-bottom: 4px;
  color: #4A5568;
}
/* Responsive fallback */
@media (max-width: 1040px) {
  .help-modal {
    width: calc(100vw - 40px);
  }
}