/* =========================================================
   ProHosty — dark mode for the WEBSITE (every public page)

   Loaded by every website page (ph-inc/layout/head.php) while the owner has dark mode switched on in WHMCS
   (Shiv27 Theme Options → "Website: dark mode button"), and active only while <html data-theme="dark">,
   which the visitor switches on with the moon button in the header (remembered in the browser; the site
   opens light for everyone else). Nothing here applies to the client area, which never loads this file.

   The design is the same one: same layout, type, spacing, radius, brand blue, hero and footer. Only the
   neutral colours are swapped through the design tokens of tokens.css, so every component that is built
   on the tokens follows by itself; the rules further down fix the few places that need more than a token.

   Everything sits inside "@media screen": a printed page (the legal pages have a Print / save as PDF
   button) is always the light one, because light text would not show on paper.
   ========================================================= */
@media screen {

/* ---------- 1. Tokens ---------- */
html[data-theme="dark"] {
  color-scheme: dark;

  /* neutrals: text light, surfaces dark navy (taken from the brand navy, not from grey) */
  --ink-900: #f1f5f9;
  --ink-700: #cbd5e1;
  --ink-500: #94a3b8;
  --ink-300: #5d6c88;
  --line: #1f2b47;
  --surface: #111a33;       /* cards, inputs, tables, menus: one step up from the page */
  --surface-2: #0d152b;     /* alternate sections, quiet fills */
  --page: #0a1124;          /* the page itself */

  /* brand tints become see-through blue; the solid brand blues stay exactly as they are */
  --brand-50: rgba(59, 130, 246, 0.10);
  --brand-100: rgba(59, 130, 246, 0.18);
  --brand-200: rgba(96, 150, 255, 0.36);
  --brand-text: #7fb0ff;        /* brand blue as TEXT on dark (the solid #035ded is too dim to read there) */
  --brand-text-hover: #a9c9ff;

  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.14);
  --warning-bg: rgba(245, 158, 11, 0.14);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.6);
  --ring: 0 0 0 3px rgba(96, 150, 255, 0.45);
}
html[data-theme="dark"] body { background: var(--page); }

/* a soft cross-fade while the visitor flips the switch (class set for a moment by chrome.js) */
html.ph-theme-switching, html.ph-theme-switching *, html.ph-theme-switching *::before, html.ph-theme-switching *::after {
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease !important;
}

/* ---------- 2. Brand blue used as text ---------- */
/* Plain links. :where() keeps these two rules exactly as weak as the light ones ("a" in app.css), so every
   block that colours its own links (buttons, header, top bar, footer, hero) keeps doing so untouched. */
:where(html[data-theme="dark"]) a { color: var(--brand-text); }
:where(html[data-theme="dark"]) a:hover { color: var(--brand-text-hover); }
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .tld-card .price,
html[data-theme="dark"] .stat strong,
html[data-theme="dark"] .pricing-card .plan-more:hover,
html[data-theme="dark"] .legal-toc a:hover,
html[data-theme="dark"] .accordion summary:hover,
html[data-theme="dark"] .save-pill,
html[data-theme="dark"] .badge-brand,
html[data-theme="dark"] .addon-toggle b { color: var(--brand-text); }
html[data-theme="dark"] .badge-warning { color: #fbbf24; }
html[data-theme="dark"] .icon-tile,
html[data-theme="dark"] .social a,
html[data-theme="dark"] .accordion .faq-toggle { color: var(--brand-text); }
html[data-theme="dark"] .social-link,
html[data-theme="dark"] .step-card .step-num,
html[data-theme="dark"] .deal-discount b,
html[data-theme="dark"] .coupon-light { color: var(--brand-text); }
html[data-theme="dark"] .social-link:hover { color: #fff; }
/* the sitemap page sets the icon colour inline, so only !important reaches it */
html[data-theme="dark"] .social a[style] { color: var(--brand-text) !important; }
html[data-theme="dark"] .card-hover:hover > .icon-tile,
html[data-theme="dark"] .feature-row:hover > .icon-tile,
html[data-theme="dark"] .social a:hover,
html[data-theme="dark"] .accordion details[open] .faq-toggle { color: #fff; }

/* ---------- 3. Buttons (solid ones are untouched; the outlined and quiet ones need readable text) ---------- */
html[data-theme="dark"] .btn-secondary { color: var(--brand-text); }
html[data-theme="dark"] .btn-secondary:hover { color: var(--brand-text-hover); border-color: var(--brand-text); }
html[data-theme="dark"] .btn-ghost { color: var(--ink-700); }
html[data-theme="dark"] .btn-ghost:hover { background: rgba(148, 163, 184, 0.12); color: var(--ink-900); }
html[data-theme="dark"] .btn-white, html[data-theme="dark"] .btn-white:hover { color: var(--brand-900); }
html[data-theme="dark"] .btn-white:hover { background: #e8efff; }

/* ---------- 4. Blocks that sit on the brand gradient (hero, blue bands) ----------
   They are already white-on-blue in the light design and stay that way: the link rule in section 2 is too
   weak to override them. Only their small label keeps its own light pill instead of the dark-surface one. */
html[data-theme="dark"] .on-dark .badge-warning { background: #fffbeb; color: #b45309; }
html[data-theme="dark"] .price-panel .save-pill { color: #1f2937; }   /* amber pill in the product-page hero: dark text as in light */

/* ---------- 5. Cards, pricing, tables, accordion ---------- */
html[data-theme="dark"] .pricing-card.is-popular { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6, var(--shadow-md); }
html[data-theme="dark"] .pricing-card.is-popular:hover { border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6, var(--shadow-lg); }
html[data-theme="dark"] .feature-row:hover { background: rgba(148, 163, 184, 0.07); }
html[data-theme="dark"] .table tbody tr:hover > *,
html[data-theme="dark"] .compare-table tbody tr:hover > * { background: #17223f; }
html[data-theme="dark"] .table thead th { background: #17223f; }
html[data-theme="dark"] .compare-table thead th { background: var(--surface); }
/* our column in the comparison: same highlighted block, with light text on the blue tint */
html[data-theme="dark"] .compare-table .is-us { background: rgba(59, 130, 246, 0.14); color: #e6eeff; }
html[data-theme="dark"] .compare-table thead .is-us { background: var(--gradient-brand); color: #fff; }
html[data-theme="dark"] .compare-table tbody tr:hover > .is-us { background: rgba(59, 130, 246, 0.24); }
html[data-theme="dark"] .compare-table tfoot .is-us { background: rgba(59, 130, 246, 0.14); }
html[data-theme="dark"] .compare-table .is-us .cmp-price { color: var(--brand-text); }
html[data-theme="dark"] .compare-table .is-us small { color: #9dbcff; }
html[data-theme="dark"] .compare-table .cmp-no { color: #4b5a76; }
html[data-theme="dark"] .accordion details[open] { border-color: var(--brand-200); }
/* WHOIS result: a terminal-style box that is dark in the light design too (its background is the text token) */
html[data-theme="dark"] .whois-output { background: #060b18; border: 1px solid var(--line); }

/* ---------- 6. Pictures ---------- */
/* app logos and the cPanel screenshot are drawn for a light page: they keep a light plate behind them */
html[data-theme="dark"] .app-tile img { background: #fff; border-radius: 12px; padding: 6px; box-sizing: border-box; }
html[data-theme="dark"] .cpanel-shot { filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.5)); }
html[data-theme="dark"] .badges-grid a { background: #f8fafc; }

/* ---------- 7. Forms + modal ---------- */
html[data-theme="dark"] .input::placeholder, html[data-theme="dark"] .textarea::placeholder { color: #64748b; }
html[data-theme="dark"] .modal-backdrop { background: rgba(2, 6, 18, 0.72); }
html[data-theme="dark"] .modal-close:hover { background: #1f2b47; }

/* ---------- 8. Header + mobile menu ----------
   The dark colours of the shared site header live in chrome.css (end of the file), because the client area
   shows the same header and has its own dark mode. Top bar and footer are already dark navy: unchanged. */

}   /* end of @media screen */
