/* =========================================================
   rlblogfix — RaidLine blog pages (TMD blog), 2026-11-11.
   Theme tokens only (rl-theme.css): --rl-text, --rl-surface, --rl-border,
   --rl-crimson-*, --rl-green ... Works in the light and the dark theme.
   Loaded only on extension/tmdblog/tmd/blog* routes by the rlblogfix module.
   When the next theme deploy happens, these rules can move into rl-blog.css
   and the module can be uninstalled.
   ========================================================= */

/* ---------- 1. Breadcrumbs: the last item (full article title) made the page
   475 px wide on a 390 px phone. stylesheet.css sets white-space:nowrap on every
   item. Items now wrap onto a new line, and the last one shrinks to the line
   width and ends with "…". ---------- */
#latestpost > .breadcrumb { flex-wrap: wrap; max-width: 100%; }
#latestpost > .breadcrumb > li.breadcrumb-item { min-width: 0; }
#latestpost > .breadcrumb > li.breadcrumb-item:last-child { flex: 0 1 auto; max-width: 100%; overflow: hidden; }
#latestpost > .breadcrumb > li.breadcrumb-item:last-child::after { display: none; }
#latestpost > .breadcrumb > li.breadcrumb-item:last-child > a,
#latestpost > .breadcrumb > li.breadcrumb-item:last-child > span {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 2. Table of contents printed by rlschema ----------
   a) An article can keep its FAQ questions out of the TOC: give the FAQ heading
      id="faq-section" (h2.rl-faq-title). The FAQ section link itself stays.
   b) Phones: links are 44 px tap targets (they were 19 px high). */
#latestpost .rl-toc .rl-toc__l2:has(> a[href$="#faq-section"]) > ol { display: none; }
@media (max-width: 767.98px) {
  #latestpost .rl-toc .rl-toc__title { display: flex; align-items: center; min-height: 44px; }
  #latestpost .rl-toc .rl-toc__list li { margin: 0; }
  #latestpost .rl-toc .rl-toc__list a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; }
}

/* ---------- 3. Hero banner (.rl-banner) of an article sits above the TOC.
   rlschema always prints the TOC at the very start of the article text, so the
   banner is moved up visually; the DOM order stays as stored. ---------- */
#latestpost #content > .row.all > .col-xs-12 > .description:has(> .rl-banner) { display: flex; flex-direction: column; }
#latestpost #content > .row.all > .col-xs-12 > .description:has(> .rl-banner) > .rl-banner { order: -1; }
#latestpost .rl-banner p.rl-banner__title {
  font-family: 'Rajdhani', sans-serif; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase;
}
#latestpost .rl-banner .rl-banner__cta { margin: 1.25rem 0 0; }

/* Theme button inside article blocks: 48 px high, 16 px label (same class as the site buttons). */
#latestpost :is(.rl-banner, .rl-guide) .rl-btn { min-height: 48px; justify-content: center; font-size: 16px; }
#latestpost :is(.rl-banner, .rl-guide) .rl-btn:hover { text-decoration: none; }

/* ---------- 4. Guides on the .rl-p-wrap block system (rl-theme.css + rl-blog.css),
   modifier .rl-guide. Only what a long read needs on top of the product blocks. ---------- */
#latestpost .rl-p-wrap.rl-guide { font-size: 16px; line-height: 1.65; }
#latestpost .rl-guide .rl-p-section { margin: 0 0 40px; }
#latestpost .rl-guide .rl-p-title { margin-bottom: 16px; }
#latestpost .rl-guide .rl-steps > li > div > strong { display: block; }

/* Info / note / warning boxes: theme icon instead of emoji. */
#latestpost .rl-guide .rl-two-col > * { margin-bottom: 0; align-self: start; }
#latestpost .rl-guide .rl-note { border-inline-start-color: var(--rl-crimson-500); }
#latestpost .rl-guide .rl-note > p,
#latestpost .rl-guide .rl-warn > p,
#latestpost .rl-guide .rl-info > p { margin: 0; font-size: 15px; color: var(--rl-text-dim); }
#latestpost .rl-guide .rl-info ul { font-size: 15px; }
#latestpost .rl-guide :is(.rl-info-title, .rl-warn-title)::before {
  flex-shrink: 0; font-family: 'Font Awesome 7 Free', 'Font Awesome 6 Free', 'Font Awesome 5 Free'; font-weight: 900; font-size: 15px; line-height: 1;
}
#latestpost .rl-guide .rl-info > .rl-info-title::before { content: '\f058'; color: var(--rl-green); }
#latestpost .rl-guide .rl-note > .rl-info-title::before { content: '\f05a'; color: var(--rl-crimson-500); }
#latestpost .rl-guide .rl-warn > .rl-warn-title::before { content: '\f071'; color: var(--rl-crimson-500); }
[data-rl-theme="dark"] #latestpost .rl-guide .rl-info > .rl-info-title::before { color: #3BBE78; }
[data-rl-theme="dark"] #latestpost .rl-guide :is(.rl-note > .rl-info-title, .rl-warn > .rl-warn-title)::before { color: var(--rl-crimson-300); }

/* Tables: 14 px minimum, region codes as theme badges, cards on phones. */
#latestpost .rl-guide .rl-table th,
#latestpost .rl-guide .rl-table td { padding: 10px 12px; font-size: 14px; }
#latestpost .rl-guide .rl-table td:first-child { width: 30%; }
#latestpost .rl-guide .rl-table .rc-badge { margin-inline-end: 2px; vertical-align: 1px; }
@media (max-width: 599.98px) {
  #latestpost .rl-guide .rl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #latestpost .rl-guide .rl-table,
  #latestpost .rl-guide .rl-table tbody,
  #latestpost .rl-guide .rl-table tr,
  #latestpost .rl-guide .rl-table td { display: block; width: 100%; }
  #latestpost .rl-guide .rl-table tr { padding: 10px 14px; border-top: 1px solid var(--rl-border-soft); }
  #latestpost .rl-guide .rl-table tbody tr:first-child { border-top: 0; }
  #latestpost .rl-guide .rl-table td,
  #latestpost .rl-guide .rl-table td:first-child { width: 100%; padding: 3px 0; border: 0; }
  #latestpost .rl-guide .rl-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--rl-text-dim);
  }
}

/* Screenshot: fixed ratio from width/height, never wider than the column. */
#latestpost .rl-guide .rl-act-img { max-width: 100%; height: auto; }
#latestpost .rl-guide .rl-img-caption { font-size: 14px; }

/* FAQ: same rhythm as the sections. */
#latestpost .rl-guide .rl-faq .rl-faq-a { font-size: 15px; }

/* CTA card at the end of a guide (theme .rl-blog-link card + theme button). */
#latestpost .rl-guide .rl-guide-cta { justify-content: space-between; gap: 16px 24px; margin-top: 8px; padding: 20px 22px; border-inline-start-color: var(--rl-crimson-500); }
#latestpost .rl-guide .rl-guide-cta .bl-text { flex: 1 1 280px; font-size: 15px; }
#latestpost .rl-guide .rl-guide-cta .bl-text strong { font-family: 'Rajdhani', sans-serif; font-size: 20px; line-height: 1.2; }

@media (max-width: 575.98px) {
  #latestpost .rl-banner .rl-btn,
  #latestpost .rl-guide .rl-guide-cta .rl-btn { width: 100%; }
  #latestpost .rl-guide .rl-p-section { margin-bottom: 32px; }
}
