/* =============================================================
   Help Scout Docs — Neue Haas Grotesk (Adobe Fonts)
   Typography + Image Fixes
   ============================================================= */

/* Font variables */
:root {
  --hs-font-display: "neue-haas-grotesk-display", sans-serif;
  --hs-font-text: "neue-haas-grotesk-text", sans-serif;
}

/* === Typography === */

/* Article body text */
#fullArticle p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  margin-bottom: 1.5em;
}

/* Sidebar category link text */
#sidebar .nav-list a {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Global body text */
html, body, .article, .article-content, main, p, li, a, blockquote, table, td, th {
  font-family: var(--hs-font-text) !important;
  font-weight: 400;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Italics */
em, i {
  font-family: var(--hs-font-text) !important;
  font-weight: 400;
  font-style: italic;
}

/* Bold */
strong, b {
  font-family: var(--hs-font-text) !important;
  font-weight: 700;
  font-style: normal;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--hs-font-display) !important;
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.015em;
}

h1 em, h1 i,
h2 em, h2 i,
h3 em, h3 i {
  font-family: var(--hs-font-display) !important;
  font-weight: 700;
  font-style: italic;
}

/* Code blocks */
code, pre, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace !important;
}

/* === Images === */

/* Remove outlines/borders */
.article-content img,
#fullArticle img,
figure img {
  border: none !important;
  box-shadow: none !important;
}

/* Natural size but shrink large ones to fit */
#fullArticle img,
#fullArticle figure img {
  width: auto !important;        /* don’t upscale small images */
  max-width: 100% !important;    /* shrink down large images */
  height: auto !important;
  display: inline-block !important;
}

/* Center images in paragraphs/figures */
#fullArticle figure,
#fullArticle p img {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Prevent wrappers from overflowing */
#fullArticle figure,
#fullArticle .hs-image-wrapper,
#fullArticle .image {
  max-width: 100% !important;
  overflow: visible !important;
}

/* Kill floats on mobile */
@media (max-width: 768px) {
  #fullArticle .alignleft,
  #fullArticle .alignright,
  #fullArticle img[style*="float"],
  #fullArticle figure[style*="float"] {
    float: none !important;
    margin: 1rem 0 !important;
  }
}

/* Safety: prevent horizontal scroll */
#fullArticle { overflow-x: hidden; }

/* === Search Bar Styling === */
#searchBar .search-query {
  background: #fff;
  border-color: transparent;
  box-shadow: none;
  color: #777;
}

#searchBar button {
  background: #A38A7C;
  border-color: transparent;
  color: #fff;
}

#searchBar button:hover {
  background: #D1BDB2;
  border-color: transparent;
  color: #fff;
}
/* === Make videos full-width in Help Scout Docs === */

/* 1) Make every <video> fluid */
#fullArticle video {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

/* 2) Common wrappers that sometimes constrain width */
#fullArticle .hr-video,
#fullArticle .video.widescreen,
#fullArticle .hs-embed,
#fullArticle .hs-image-wrapper,
#fullArticle figure,
#fullArticle p:has(> video) {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 3) Prevent odd inline attrs from forcing a size */
#fullArticle video[width],
#fullArticle video[height],
#fullArticle video[style*="width"],
#fullArticle video[style*="height"] {
  width: 100% !important;
  height: auto !important;
}

/* 4) Optional: keep a clean 16:9 box (remove if not desired) */
#fullArticle .hr-video,
#fullArticle .video.widescreen,
#fullArticle p:has(> video),
#fullArticle figure:has(> video) {
  aspect-ratio: 16 / 9;
}
#fullArticle p > video,
#fullArticle figure > video {
  height: 100% !important;
}
