/* Bridge for the older Tailwind app pages (docs, developer dashboard, portal, admin, web chat) — html.gw-legacy.
   Goal: same header, same tones and type as the new site without rewriting each page. Loaded after Tailwind. */

html.gw-legacy, html.gw-legacy body { background: var(--ms-bg) !important; }
html.gw-legacy body { font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ms-ink); }
html.gw-legacy .mesh-gradient { display: none !important; }
html.gw-legacy main { margin-top: 0 !important; }
html.gw-legacy h1, html.gw-legacy h2, html.gw-legacy h3 { font-family: Outfit, Inter, sans-serif; letter-spacing: -.015em; }

/* surfaces: glass/white cards and gray panels → site tones */
html.gw-legacy.dark .glass,
html.gw-legacy.dark [class*="dark:bg-gray-800"],
html.gw-legacy.dark [class*="dark:bg-gray-900"],
html.gw-legacy.dark [class*="dark:bg-slate-800"],
html.gw-legacy.dark [class*="dark:bg-slate-900"],
html.gw-legacy.dark [class*="dark:bg-dark-"] { background-color: var(--ms-bg-3) !important; backdrop-filter: none !important; }
html.gw-legacy.dark [class*="dark:bg-gray-700"],
html.gw-legacy.dark [class*="dark:bg-slate-700"] { background-color: var(--ms-card-2) !important; }
html.gw-legacy:not(.dark) .glass { background-color: var(--ms-bg-2) !important; backdrop-filter: none !important; }

/* text */
html.gw-legacy.dark [class*="dark:text-white"] { color: var(--ms-ink) !important; }
html.gw-legacy.dark [class*="dark:text-gray-300"], html.gw-legacy.dark [class*="dark:text-gray-400"] { color: var(--ms-ink-2) !important; }

/* brand: the old talivio sky/blue gradients → MOSA blue (button) and blue ink (links) */
html.gw-legacy [class*="bg-talivio-600"], html.gw-legacy [class*="bg-talivio-500"]:not([class*="/"]),
html.gw-legacy [class*="from-talivio-600"] { background: var(--ms-btn) !important; color: #fff !important; }
html.gw-legacy [class*="hover:bg-talivio-700"]:hover { background: var(--ms-btn-h) !important; }
html.gw-legacy [class*="text-talivio-600"], html.gw-legacy.dark [class*="dark:text-talivio-400"] { color: var(--ms-blue-ink) !important; }

/* form fields */
html.gw-legacy.dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
html.gw-legacy.dark select, html.gw-legacy.dark textarea { background-color: var(--ms-bg) !important; color: var(--ms-ink) !important; }

/* tables */
html.gw-legacy.dark table thead { background-color: var(--ms-card-2) !important; }
html.gw-legacy.dark table tr { border-color: var(--ms-faint) !important; }

/* header sits in the page flow (sticky), the old pages expected a fixed bar */
html.gw-legacy .ms-hdr { position: sticky; }

/* developer docs: main had w-full plus md:ml-64 (sidebar), so it ran 256 px past the viewport at 768–1024 */
@media (min-width: 768px) { html.gw-legacy main[class*="md:ml-64"] { width: auto !important; min-width: 0; } }
