/* Native controls, scrollbars and the page canvas follow the theme */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark; } }

/* ════════════════════════════════════════════
   badges.css  (v1.1.0)
   Live status badges. The images come from status.tempfile.org, so they always
   show the current state. Every class starts with "sb-" so nothing can clash with
   the existing .version-badge / .recommended-badge.

   Named "badges.css" on purpose: sw.js never caches paths containing "status".
════════════════════════════════════════════ */

/* A badge image inside a link (works for pills and for dots) */
.sb-chip {
    display: inline-flex;
    line-height: 0;
    vertical-align: middle;
    text-decoration: none;
    border: 0;
    transition: opacity 0.2s ease;
}
.sb-chip:hover { opacity: 0.85; }
.sb-chip img { display: block; height: 20px; width: auto; }

/* ── Header: "Status ●" after the tagline ──
   The tagline and the link are inline-blocks, so they follow each page's own
   text-align (left on desktop, centred on mobile) without any extra rules. */
.tagline-row .tagline { display: inline-block; vertical-align: middle; }
.sb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #dddddd;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.2;
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}
.sb-link:hover { color: #000000; }
.sb-link img { display: block; width: 14px; height: 14px; }

/* ── Footer Navigation card: "System status" row with the dot on the right ── */
.nav-links a .sb-end { display: block; flex: none; width: 20px; height: 20px; margin-left: auto; }

/* ── Footer trust line: "Files auto-delete • No signup • Secure hosting • {pill}" ──
   The separator and pill live INSIDE the footer <p>, so the bullet always takes the
   same colour/size as the text next to it. One row on desktop; on phones the pill drops
   under the text, centred, with space around it. */
/* desktop: plain inline text, so the bullet is the very same glyph/spacing as the other two */
@media (max-width: 768px) {
    .sb-pill-wrap { display: flex; justify-content: center; margin: 12px 0 4px; }
    .sb-sep { display: none; }
}

/* ── API page ── */
.sb-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: -6px 0 18px;
    font-size: 0.9rem;
    color: #666666;
}
.sb-meta a:not(.sb-chip) { color: inherit; text-decoration: underline; }
.sb-meta .sb-dotsep { color: inherit; }
.sb-meta a:not(.sb-chip):hover { color: #000000; }

/* Endpoint heading with the badge on the right. On phones the markup swaps the wide
   pill for the small dot (<picture>), so the heading never has to wrap. */
.legal-content h2.sb-h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.legal-content h2.sb-h2 > span { min-width: 0; }
.legal-content h2.sb-h2 > .sb-chip { flex: none; }

/* ── Help FAQ: "Is it us?" line at the top of an answer ── */
.sb-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0 0 10px;
    font-weight: 500;
}
/* beat ".faq-answer a" (underline) from help.css, light and dark */
.faq-answer a.sb-chip,
:root[data-theme="dark"] body .faq-answer a.sb-chip { border-bottom: 0; padding-bottom: 0; font-weight: 400; }

/* ── Download page: shown with the Retry button ── */
.sb-retry {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #666666;
}
.sb-retry[hidden] { display: none; }

/* Short explainer next to a status pill in the Help FAQ */
.sb-note { font-weight: 400; font-size: 0.9rem; color: #666666; flex-basis: 100%; }
:root[data-theme="dark"] body .sb-note { color: #aaaaaa; }

/* ── Dark theme ── */
:root[data-theme="dark"] body .sb-link { color: #aaaaaa; border-left-color: #444444; }
:root[data-theme="dark"] body .sb-link:hover { color: #ffffff; }
:root[data-theme="dark"] body .sb-meta,
:root[data-theme="dark"] body .sb-retry { color: #aaaaaa; }
:root[data-theme="dark"] body .sb-meta a:not(.sb-chip):hover { color: #ffffff; }

/* Very narrow phones: if the link wraps onto its own line, drop the divider */
@media (max-width: 360px) {
    .sb-link { margin-left: 0; padding-left: 0; border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .sb-chip, .sb-link { transition: none; }
}

/* ── No-JavaScript fallback ──────────────────────────────────
   :root[data-theme="dark"] above is set by the inline script in <head> before
   first paint. This block only applies when JavaScript is disabled (data-theme
   never set) and the visitor's system is dark. Keep it identical to the dark rules above. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) body .faq-answer a.sb-chip { border-bottom: 0; padding-bottom: 0; font-weight: 400; }
  :root:not([data-theme]) body .sb-note { color: #aaaaaa; }
  :root:not([data-theme]) body .sb-link { color: #aaaaaa; border-left-color: #444444; }
  :root:not([data-theme]) body .sb-link:hover { color: #ffffff; }
  :root:not([data-theme]) body .sb-meta, :root:not([data-theme]) body .sb-retry { color: #aaaaaa; }
  :root:not([data-theme]) body .sb-meta a:not(.sb-chip):hover { color: #ffffff; }
}
