/* gm-design.css — Global Mapper Help Center design layer
 *
 * ClickUp-style article layout on top of Copenhagen:
 *   - sticky white header, logo + nav left-aligned
 *   - search pill above the breadcrumbs in a full-width band
 *   - pill-style left navigation (see gm-nav.css) and a wide article column
 *   - "In this article" grey box floated at the top-right of the body
 *   - blue note callouts, calmer footer
 * Palette = the Global Mapper design tokens used in the mockups.
 */

:root {
  --gm-blue: #1F6FB8;
  --gm-blue-dark: #17568F;
  --gm-blue-tint: #EAF3FB;
  --gm-ink: #1B2733;
  --gm-text: #33414F;
  --gm-muted: #5C6B7A;
  --gm-line: #E3E8EE;
  --gm-line-strong: #C9D2DB;
  --gm-grey: #F3F5F7;
  --gm-grey-2: #E9EDF1;
  --gm-header-h: 72px;
  --gm-font: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* One type scale for the whole help center (mockup-aligned). Every
     font-size below refers to these — nudge the scale here, not per rule. */
  --gm-fs-h1: 26px;   /* page + article titles          */
  --gm-fs-h2: 20px;   /* section headings in prose      */
  --gm-fs-h3: 17px;   /* sub-headings, card titles      */
  --gm-fs-body: 15px; /* prose, lists, tables, controls */
  --gm-fs-sm: 14px;   /* nav, card links, secondary     */
  --gm-fs-xs: 13.5px; /* breadcrumbs, meta, footer      */
}

/* ---------- base ---------- */
body { font-family: var(--gm-font); color: var(--gm-text); font-size: var(--gm-fs-body); line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-family: var(--gm-font); color: var(--gm-ink); }
/* the scale applies to every template, including the ones this design layer
   does not restyle (search results, requests, community, profile) */
h1 { font-size: var(--gm-fs-h1); font-weight: 700; }
h2 { font-size: var(--gm-fs-h2); font-weight: 700; }
h3 { font-size: var(--gm-fs-h3); font-weight: 700; }
h4, h5, h6 { font-size: var(--gm-fs-body); font-weight: 700; }
/* form controls otherwise fall back to the OS font at their own size;
   the class-level Copenhagen rules need matching specificity */
input, select, textarea, button, .button {
  font-family: var(--gm-font); font-size: var(--gm-fs-body);
}
.hbs-form input, .hbs-form textarea, .hbs-form select,
.search input, .search textarea, .search input[type=search] {
  font-family: var(--gm-font); font-size: var(--gm-fs-body);
}
/* Copenhagen sizes its buttons at 12px through descendant selectors that
   outrank a bare .button rule */
.button, .article-subscribe button, .section-subscribe button,
.community-follow button, .subscriptions-subscribe button,
.split-button button, .pagination-next-link, .pagination-prev-link,
.pagination-first-link, .pagination-last-link {
  font-size: var(--gm-fs-sm);
}
a, a:visited { color: var(--gm-blue); }
a:hover, a:focus { color: var(--gm-blue-dark); }
h2, h3, h4 { scroll-margin-top: calc(var(--gm-header-h) + 20px); }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  display: block;
  max-width: none; width: 100%; padding: 0;
  height: var(--gm-header-h);
  background: #fff;
  border-bottom: 1px solid var(--gm-line);
}
.gm-header-inner {
  max-width: 1160px; width: 90%; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 40px;
}
@media (max-width: 1159px) { .gm-header-inner { width: auto; padding: 0 5%; } }
.logo a { display: flex; align-items: center; }
.logo img { max-height: 40px; }
.logo span { color: var(--gm-ink); font-weight: 700; }
@media (min-width: 1024px) {
  .nav-wrapper-desktop { display: flex; align-items: center; flex: 1; gap: 20px; }
}
.user-nav { position: static; flex: 1; }
.user-nav-list > li { margin: 0; }
.header .nav-wrapper-desktop .user-nav-list a,
.header .nav-wrapper-desktop .user-nav-list a:visited {
  color: var(--gm-muted); font-size: var(--gm-fs-sm); font-weight: 500; padding: 0 32px 0 0; text-decoration: none;
}
.header .nav-wrapper-desktop .user-nav-list a:hover,
.header .nav-wrapper-desktop .user-nav-list a:focus { color: var(--gm-ink); text-decoration: none; }
/* Ask AI: outlined pill, right-aligned with the account menu */
.header .nav-wrapper-desktop .ask-ai, .header .nav-wrapper-desktop .ask-ai:visited {
  background: #fff; border: 1px solid var(--gm-line-strong); border-radius: 999px;
  color: var(--gm-ink); font-size: var(--gm-fs-sm); font-weight: 600; padding: 6px 14px; margin: 0;
}
.header .nav-wrapper-desktop .ask-ai:hover, .header .nav-wrapper-desktop .ask-ai:focus {
  background: var(--gm-grey); border-color: var(--gm-line-strong); color: var(--gm-ink); text-decoration: none;
}
.header .nav-wrapper-desktop .ask-ai .ask-ai-icon { color: var(--gm-blue); }
.header .user-info .dropdown-toggle { color: var(--gm-muted); }
.nav-wrapper-mobile { margin-left: auto; }
.user-nav[aria-expanded=true] { top: var(--gm-header-h); }
.container-divider { display: none; }

/* ---------- search + breadcrumb band ---------- */
.gm-band { background: #fff; border-bottom: 1px solid var(--gm-line); margin-bottom: 36px; }
.gm-band .sub-nav {
  display: flex; flex-direction: column; align-items: stretch;
  gap: 0; margin: 0 auto; padding-top: 24px; padding-bottom: 14px;
}
.gm-band .search-container { order: -1; max-width: 576px; width: 100%; flex: none; margin-bottom: 18px; }
.sub-nav .search, .gm-band .search {
  border: 1px solid var(--gm-line-strong); border-radius: 32px; background: #fff;
  transition: border-color .12s, box-shadow .12s;
}
.gm-band .search:focus-within { border-color: var(--gm-blue); box-shadow: 0 0 0 3px rgba(31,111,184,.14); }
.gm-band .search input[type=search] {
  height: 42px; font-family: var(--gm-font); font-size: var(--gm-fs-body); color: var(--gm-ink);
  padding-left: 44px; padding-right: 20px;
}
[dir=rtl] .gm-band .search input[type=search] { padding-left: 20px; padding-right: 44px; }
.gm-band .search input[type=search]:focus { border: none; }
.gm-band .search-icon { left: 16px; width: 16px; height: 16px; color: var(--gm-muted); }
.gm-band .search .clear-button { border-radius: 0 32px 32px 0; }

.breadcrumbs { flex-wrap: wrap; row-gap: 4px; }
.breadcrumbs li { font-size: var(--gm-fs-xs); color: var(--gm-muted); }
.breadcrumbs li a, .breadcrumbs li a:visited { color: var(--gm-blue); }
.breadcrumbs li + li::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-top: 1.6px solid #9AA5B1; border-right: 1.6px solid #9AA5B1;
  transform: rotate(45deg); margin: 0 12px 2px 10px; vertical-align: middle;
}

/* ---------- article layout ---------- */
/* the sidebar must stretch full height, otherwise the sticky nav inside it
   has no room to stick and scrolls away with the page */
.article-container { align-items: stretch; }
@media (max-width: 1023px) { .article-sidebar { border: 0; margin-bottom: 0; } }
@media (min-width: 1024px) {
  .article-sidebar { flex: 0 0 256px; max-width: 256px; padding-right: 24px; }
  .article { flex: 1 1 auto; max-width: none; min-width: 0; padding: 0 0 0 40px; }
}
@media (min-width: 1200px) { .article { padding-left: 56px; } }
.article-header { margin: 4px 0 28px; }
.article-title {
  font-size: var(--gm-fs-h1); font-weight: 700; line-height: 1.25; letter-spacing: -.01em;
  color: var(--gm-ink); margin-bottom: 0;
}
.article-author { display: none; }
.article-subscribe .button { border-radius: 6px; border-color: var(--gm-line-strong); color: var(--gm-text); font-weight: 500; }
.article-subscribe .button:hover { background: var(--gm-grey); }

.article-content { margin: 0 0 40px; line-height: 1.6; }
.article-body { font-size: var(--gm-fs-body); max-width: none; color: var(--gm-text); }
.article-body p { margin: 0 0 16px; }
.article-body h2 { font-size: var(--gm-fs-h2); font-weight: 700; margin: 44px 0 14px; }
.article-body h3 { font-size: var(--gm-fs-h3); font-weight: 700; margin: 32px 0 10px; }
.article-body h4 { font-size: var(--gm-fs-body); font-weight: 700; margin: 24px 0 8px; }
.article-body > h2:first-child, .article-body > .gm-toc + h2 { margin-top: 8px; }
.article-body a, .article-body a:visited { color: var(--gm-blue); text-decoration: none; }
.article-body a:hover, .article-body a:focus { color: var(--gm-blue-dark); text-decoration: underline; }
.article-body ul, .article-body ol { margin: 0 0 16px 4px; padding-left: 22px; }
.article-body li { margin: 4px 0; }
.article-body li > p { margin: 0 0 6px; }
.article-body li > ul, .article-body li > ol { margin: 4px 0 4px 0; }
.article-body table { border-collapse: collapse; width: 100%; font-size: var(--gm-fs-sm); margin: 8px 0 20px; }
.article-body th, .article-body td { border: 1px solid var(--gm-line); padding: 8px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--gm-grey); font-weight: 600; color: var(--gm-ink); }
.article-body pre {
  background: var(--gm-grey); border: 1px solid var(--gm-line); border-radius: 6px;
  padding: 12px 16px; font-size: var(--gm-fs-xs); line-height: 1.5;
}
.article-body :not(pre) > code {
  background: var(--gm-grey); border: 1px solid var(--gm-line); border-radius: 4px;
  padding: 1px 6px; font-size: .92em;
}
.article-body blockquote { border-left: 3px solid var(--gm-line-strong); color: var(--gm-muted); }
.article-body figcaption { background: none; color: var(--gm-muted); }
.article-body details { border-color: var(--gm-line); border-radius: 6px; }
.article-body details summary { color: var(--gm-ink); font-size: var(--gm-fs-body); }
.article-body details details { background: var(--gm-grey); }

/* note callouts (Flare p.note / div.noteInDiv carry their own bold "Note:" label) */
.article-body p.note, .article-body .noteInDiv {
  background: #F3F8FD; border-left: 4px solid #6FA8E0; border-radius: 4px;
  padding: 12px 16px; margin: 16px 0;
}
.article-body .noteInDiv > p:last-child { margin-bottom: 0; }
.article-body p.note > b:first-child, .article-body p.note > strong:first-child,
.article-body .noteInDiv b:first-child, .article-body .noteInDiv strong:first-child { color: var(--gm-blue); }

/* "In this article" box, built by gm-nav.js */
.gm-toc {
  float: right; width: 41%; max-width: 340px; margin: 0 0 24px 28px;
  background: var(--gm-grey); border: 1px solid var(--gm-line); border-radius: 6px;
  padding: 10px 24px 16px; font-size: var(--gm-fs-sm);
}
.gm-toc-title { font-size: var(--gm-fs-h3); font-weight: 700; color: var(--gm-ink); margin: 10px 0 10px; }
.gm-toc ol { list-style: none; margin: 0; padding: 0; }
.gm-toc li { margin: 0; padding: 4px 0; line-height: 1.4; }
.gm-toc li.gm-toc-h3 { padding-left: 14px; font-size: var(--gm-fs-xs); }
.gm-toc a, .gm-toc a:visited { color: var(--gm-blue); text-decoration: none; }
.gm-toc a:hover { text-decoration: underline; }
@media (max-width: 767px) { .gm-toc { float: none; width: auto; max-width: none; margin: 0 0 20px; } }

/* article footer */
.article-footer { border-top: 1px solid var(--gm-line); padding: 18px 0; }
.article-votes { border-top: 1px solid var(--gm-line); text-align: left; padding: 24px 0 8px; }
.article-votes-question { font-size: var(--gm-fs-body); font-weight: 600; color: var(--gm-ink); }
.article-vote { border-radius: 6px; margin: 10px 8px 10px 0; }
.article-votes-count { color: var(--gm-muted); font-size: var(--gm-fs-xs); }
.article-more-questions { text-align: left; margin: 6px 0 28px; color: var(--gm-muted); }
.article-relatives { border-top: 1px solid var(--gm-line); }
.article-relatives h2, .article-relatives h3 { font-size: var(--gm-fs-body); font-weight: 700; }
.article-relatives li { padding: 4px 0; }
.article-return-to-top { border-top-color: var(--gm-line); }

/* ---------- section / category pages ---------- */
.page-header h1 { font-size: var(--gm-fs-h1); font-weight: 700; letter-spacing: -.01em; }
.page-header-description { font-style: normal; color: var(--gm-muted); }
.section-list-item, .article-list-item { border-bottom: 1px solid var(--gm-line); padding: 12px 0; }
.section-list-item a, .article-list-link { color: var(--gm-blue); font-size: var(--gm-fs-body); font-weight: 500; }
.article-list-item .icon-star { color: #E0A800; }
.gm-aside-col { width: 256px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--gm-line); }
.footer-inner { color: var(--gm-muted); font-size: var(--gm-fs-xs); }
.footer a { color: var(--gm-muted); }

/* ---------- home page: hero ---------- */
.hero { height: auto; padding: 56px 20px 60px; }
.hero-inner { top: auto; transform: none; max-width: 640px; }
.gm-hero-title {
  color: #fff; font-size: 28px; font-weight: 700; line-height: 1.2;
  letter-spacing: -.01em; margin: 0 0 8px;
}
.gm-hero-sub { color: rgba(255,255,255,.88); font-size: var(--gm-fs-body); margin: 0 0 26px; }
.gm-hero-search { position: relative; max-width: 560px; margin: 0 auto; }
.gm-hero-search .search-icon { left: 18px; width: 17px; height: 17px; color: var(--gm-muted); }
.hero .search { border-radius: 32px; border-color: transparent; }
.hero .search input[type=search] {
  height: 48px; font-family: var(--gm-font); font-size: var(--gm-fs-body);
  padding-left: 46px; padding-right: 20px;
}
[dir=rtl] .hero .search input[type=search] { padding-left: 20px; padding-right: 46px; }
@media (max-width: 767px) {
  .hero { padding: 40px 20px 44px; }
  .gm-hero-title { font-size: 23px; }
  .gm-hero-sub { font-size: var(--gm-fs-sm); }
}

/* ---------- home page: category cards ---------- */
.knowledge-base > h2 { font-size: var(--gm-fs-h3); font-weight: 700; margin: 40px 0 18px; }
.blocks-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px; margin: 0; padding: 0;
}
@media (min-width: 768px) { .blocks-list { margin: 0; } }
.blocks-item.gm-cat-card {
  flex: none; margin: 0; text-align: left;
  border: 1px solid var(--gm-line); border-radius: 10px;
  padding: 24px 24px 20px; box-shadow: none;
  display: flex; flex-direction: column;
}
/* stock Copenhagen floods the whole block with brand colour on hover */
.blocks-item.gm-cat-card:hover, .blocks-item.gm-cat-card:focus, .blocks-item.gm-cat-card:active {
  background-color: #fff; border-color: var(--gm-line-strong);
}
.blocks-item.gm-cat-card:hover *, .blocks-item.gm-cat-card:focus *, .blocks-item.gm-cat-card:active * { color: inherit; }
.gm-cat-card .blocks-item-link { padding: 0; display: block; flex: none; }
.gm-cat-card .blocks-item-link:hover .blocks-item-title { color: var(--gm-blue); }
.gm-cat-icon {
  display: flex; width: 44px; height: 44px; border-radius: 10px;
  background: var(--gm-blue-tint); color: var(--gm-blue);
  align-items: center; justify-content: center; margin: 0 0 16px;
}
.gm-cat-card .blocks-item-title {
  display: block; font-size: var(--gm-fs-h3); font-weight: 700; color: var(--gm-ink);
  margin: 0 0 8px; line-height: 1.3;
}
.gm-cat-card .blocks-item-description {
  display: block; font-size: var(--gm-fs-sm); color: var(--gm-muted); line-height: 1.55; margin: 0;
}
.gm-cat-card .blocks-item-description:empty { display: none; }
.gm-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.gm-cat-chip, .gm-cat-chip:visited {
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: var(--gm-blue-tint); color: var(--gm-blue-dark); text-decoration: none;
}
.gm-cat-chip:hover { background: #DCEAF8; color: var(--gm-blue-dark); text-decoration: none; }
.gm-cat-sections { list-style: none; margin: 16px 0 0; padding: 0; font-size: var(--gm-fs-sm); }
.gm-cat-sections:empty { display: none; }
.gm-cat-sections li { padding: 8px 0; border-top: 0; }
.gm-cat-sections li + li { border-top: 1px dashed var(--gm-line); }
.gm-cat-sections a, .gm-cat-sections a:visited {
  color: var(--gm-blue); text-decoration: none; font-weight: 500;
}
.gm-cat-sections a:hover { text-decoration: underline; }
.gm-browse-all, .gm-browse-all:visited {
  display: block; margin-top: auto; padding: 18px 0 0;
  font-weight: 600; font-size: var(--gm-fs-sm); color: var(--gm-blue); text-decoration: none;
}
.gm-browse-all:hover { text-decoration: underline; }

/* promoted articles under the cards */
.knowledge-base .articles h2 { font-size: var(--gm-fs-h3); font-weight: 700; margin: 40px 0 16px; }

/* ---------- search results, filters and meta text on the same scale ---------- */
.search-results-subheading { font-size: var(--gm-fs-h2); font-weight: 700; }
.search-result-title { font-size: var(--gm-fs-h3); }
.search-result-description { font-size: var(--gm-fs-body); }
.search-results-sidebar .sidenav-item,
.search-results-sidebar .see-all-filters { font-size: var(--gm-fs-sm); }
.meta-data, .search-result-meta, .search-result-votes,
.search-result-meta-count, .content-tag .label { font-size: var(--gm-fs-xs); }
.no-results .headline { font-size: var(--gm-fs-h3); }
.pagination-next-text, .pagination-prev-text, .pagination-first-text,
.pagination-last-text, .pagination-next-icon, .pagination-prev-icon,
.pagination-first-icon, .pagination-last-icon { font-size: var(--gm-fs-sm); }
