/*
 * Styling for the Markdown rendered inside .article — tables, prose, lists.
 * Fenced code blocks are wrapped in the design's .code-block markup (server
 * side), so they're styled by styles.css, not here.
 * Uses the design tokens so it stays on-brand.
 */

.article p {
  font-size: 16px;
  line-height: 1.7;
  color: #3c352c;
  margin: 0 0 18px;
}
:root[data-theme='dark'] .article p { color: #cfc7ba; }

.article h2 { margin-top: 44px; }
.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 30px 0 8px;
  scroll-margin-top: 84px;
}

/* Lists */
.article ul, .article ol {
  margin: 0 0 20px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.7;
  color: #3c352c;
}
:root[data-theme='dark'] .article ul,
:root[data-theme='dark'] .article ol { color: #cfc7ba; }
.article li { margin: 7px 0; }
.article li::marker { color: var(--muted); }

/* Prose links */
.article p a, .article li a, .article td a {
  color: var(--text);
  font-weight: 600;
  border-bottom: 1.5px solid var(--text-soft);
}
.article p a:hover, .article li a:hover, .article td a:hover { border-bottom-color: var(--text); }
.article strong { color: var(--text); font-weight: 700; }

/* Inline code (fenced blocks are handled by .code-block in styles.css) */
.article :not(pre) > code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text);
}

/* Tables → clean, roomy, on-brand */
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 30px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.article thead th {
  text-align: left;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.article tbody td {
  padding: 12px 16px;
  color: #3c352c;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
:root[data-theme='dark'] .article tbody td { color: #cfc7ba; }
.article tbody tr:last-child td { border-bottom: none; }

/* Key panel — the single Cavendish-yellow "important panel" per page.
   A prominent, eye-catching box for the one thing that matters most. */
.mc-key {
  position: relative;
  padding: 20px 24px 20px 26px;
  margin: 4px 0 30px;
  border-radius: var(--radius-lg);
  background: var(--mc-jasmine, #fffdf0);
  border: 1px solid #f0e08f;
  border-left: 5px solid var(--mc-cavendish-yellow);
  box-shadow: 0 6px 22px rgba(255, 224, 27, 0.12);
}
.mc-key__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}
.mc-key__body { font-size: 15.5px; line-height: 1.6; color: #4a4236; }
.mc-key__body p { margin: 0; color: inherit; font-size: inherit; }
.mc-key__body a { color: var(--text); font-weight: 600; border-bottom: 1.5px solid var(--text-soft); }
:root[data-theme='dark'] .mc-key {
  background: rgba(255, 224, 27, 0.08);
  border-color: rgba(255, 224, 27, 0.28);
}
:root[data-theme='dark'] .mc-key__body { color: #d8cfbf; }

/* Pager — when only one direction exists, don't leave a lonely half-box */
.pager--single { display: flex; }
.pager--next-only { justify-content: flex-end; }
.pager--prev-only { justify-content: flex-start; }
.pager--single .pager__item { flex: 0 1 380px; }

/* Header "Get the extension" CTA — yellow, header-sized (override the tall .btn--accent) */
.site-header__cta {
  height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 14px;
  gap: 8px;
}

/* Brand flip (#1028) — ebizmarts wordmark, divider bar, product tagline on two
   lines beside it (the \n in the string breaks via pre-line). Two pre-colored
   copies of the official asset swap per theme (no CSS filter: inverting the
   Peppercorn fill would tint it). Sits at the header's own 28px padding; the
   old center-over-sidebar box (width 290 + padding-left 0) pinned it to the
   screen edge. */
/* The sidebar text sits at 40px (28px sidebar padding + 12px label padding);
   start the wordmark on that same vertical so header and nav share one line. */
@media (min-width: 761px) { .site-header { padding-left: 40px; } }
.brand__logo { height: 23px; width: auto; filter: none; }
.brand__logo--dark { display: none; }
:root[data-theme='dark'] .brand__logo--light { display: none; }
:root[data-theme='dark'] .brand__logo--dark { display: block; }
.brand__divider { height: 32px; }
.brand__tagline {
  font-size: 11px; line-height: 1.35; font-weight: 600;
  color: var(--muted); text-align: left; white-space: pre-line;
}
/* Narrow screens: the wordmark alone (the tagline pushes the header actions
   off-screen; every page title still names the product). */
@media (max-width: 760px) {
  .brand__divider, .brand__tagline { display: none; }
}

/* Site-wide footer — the home footer-note reused at the end of every guide */
.article .site-footer {
  flex-wrap: wrap;
  margin: 40px 0 6px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.site-footer__links { display: inline-flex; align-items: center; gap: 8px; }
.site-footer__links a { color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.site-footer__links a:hover { color: var(--text); border-bottom-color: var(--text-soft); }
.site-footer__sep { color: var(--muted); }

/* Search lives in the right-hand actions cluster now (was centered).
   margin-left:auto pushes the whole cluster to the right of the logo. */
.header__actions { margin-left: auto; }
/* Fixed size in both languages; the label stays on one line (no wrap → the box
   never grows taller in Spanish). If a translation is too long it ellipsizes
   rather than reflowing the header. */
.search-trigger { width: 264px; max-width: none; }
.search-trigger__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Search results rendered by theme.js into the overlay list */
.search-empty { padding: 22px 14px; color: var(--muted); font-size: 14px; text-align: center; }

/* "Up next" preview line beside the yellow CTA — a compact intro of the next
   guide (its own description). Wraps below the button on narrow widths. */
.meta-inline--preview { max-width: 360px; line-height: 1.45; }

/* Caption under a real screenshot inside the .shot-frame */
.shot-frame__cap {
  padding: 10px 14px; font-size: 13px; color: var(--muted);
  border-top: 1px solid var(--border); background: var(--surface);
}

/* Theme toggle — circular reveal (View Transitions API).
   Kill the default cross-fade; the new theme sits on top and is clipped open
   by the clip-path animation in theme.js, expanding from the toggle button. */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 0; }
::view-transition-new(root) { z-index: 1; }
@media (max-width: 760px) {
  .search-trigger { width: auto; padding: 0 12px; }
  .search-trigger .search-trigger__text,
  .search-trigger .kbd-group { display: none; }
}

/* Language selector (native <details> dropdown, no JS) */
.lang { position: relative; }
.lang__summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; width: auto; padding: 0 12px; }
.lang__summary::-webkit-details-marker { display: none; }
.lang__code { font-size: 13px; font-weight: 600; }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-pop);
  padding: 6px; min-width: 156px; z-index: 50;
}
.lang__item { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.lang__item:hover { background: var(--surface); }
.lang__item--active { font-weight: 700; background: var(--surface); }

/* Blockquotes */
.article blockquote {
  margin: 0 0 24px;
  padding: 4px 18px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* Glossary term — dotted underline + hover/focus tooltip bubble (no navigation).
   The definition lives in data-tip; shown on hover and on keyboard focus. */
.term {
  border-bottom: 1.5px dotted var(--muted);
  cursor: help;
  position: relative;
}
.term::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--mc-cavendish-yellow, #ffe01b);
  box-shadow: 0 8px 30px rgba(255, 224, 27, 0.18), var(--shadow-pop, 0 8px 30px rgba(0, 0, 0, 0.1));
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 400;
  white-space: normal;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.term::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--mc-cavendish-yellow, #ffe01b);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
  z-index: 61;
}
.term:hover::after, .term:focus::after,
.term:hover::before, .term:focus::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.term:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .term::after, .term::before { transition: none; }
}

/* Frosted-glass bubble: the tooltip goes translucent and blurs only what sits
   behind it, so the definition reads clean without dimming the whole page. */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .term::after {
    background: color-mix(in srgb, var(--card) 72%, transparent);
    -webkit-backdrop-filter: blur(8px) saturate(1.3);
    backdrop-filter: blur(8px) saturate(1.3);
  }
}
