/* Colour contrast (Chris, 4 Nov 2026: "colours have to work"). Every pair below reaches WCAG AA (4.5 to 1 for text).
   Loaded last on the staff pages and the member app. tests/Feature/A11ySeo/ContrastGuardTest.php keeps the rules in place. */

/* White text on a mid colour badge or button: use the darker shade of the same colour. */
.bg-red-500.text-white,.bg-red-500 .text-white{background-color:#dc2626}
.bg-amber-500.text-white,.bg-amber-600.text-white{background-color:#b45309}
.bg-orange-500.text-white,.bg-orange-600.text-white{background-color:#c2410c}
.bg-emerald-500.text-white,.bg-emerald-600.text-white,.bg-green-500.text-white,.bg-green-600.text-white{background-color:#047857}
.bg-blue-500.text-white{background-color:#2563eb}
.bg-sky-500.text-white,.bg-sky-600.text-white{background-color:#0369a1}

/* Dim text on the dark staff sidebar: lift it to a readable lilac. */
#vsidebar .text-vibe-500,#vsidebar .text-vibe-600{color:#c9c0e0}

/* A theme (Bonfire Night, Halloween, Christmas and so on) paints cards with the theme accent. The text inside takes the theme's own
   readable ink, whatever light colour the card was written with, so light text never lands on a light or orange accent. */
.th-takeover :is(.bg-vibe-500,.bg-vibe-600,.bg-vibe-700) :is(.text-white,.text-vibe-50,.text-vibe-100,.text-vibe-200,.text-vibe-300,.text-vibe-400),
.th-takeover :is(.bg-vibe-500,.bg-vibe-600,.bg-vibe-700) [class*="text-white/"]{color:var(--th-accent-ink) !important}
.th-takeover :is(.bg-vibe-500,.bg-vibe-600,.bg-vibe-700) [class*="border-white/"]{border-color:var(--th-accent-ink) !important}

/* Faded amber labels on amber and light grey: the full strength brown. */
[class*="text-amber-800/"],[class*="text-amber-900/"]{color:#78350f}

/* Dark mode, member app: the collapsible home sections (Your membership and the rest) were a white card with light text. */
html.gs-dark .gs-fold{background-color:var(--d-surface);border-color:var(--d-border);color:var(--d-text)}
html.gs-dark .gs-fold[open]>summary{border-bottom-color:var(--d-border)}
html.gs-dark .bg-emerald-400.text-emerald-950{color:#022c22 !important}
html.gs-dark .th-banner-x{color:var(--d-text,#efeef2)}

/* Brand purple text on the pale page is 4.44 to 1, just under 4.5. A little darker on light surfaces only. */
html:not(.gs-dark) main .text-vibe-500:not([class*="bg-vibe-9"] *):not([class*="bg-vibe-8"] *):not([class*="bg-vibe-7"] *):not([class*="bg-vibe-6"]){color:#6d5d91}

/* The staff top bar runs out of room below 1536px wide once the button words show, and the last words land outside the dark bar on the pale page. Icons only until there is room. */
@media (max-width:1535px){#gs-topbar .xl\:inline{display:none !important}}

/* ---- Full page contrast audit (5 Dec 2026): every rule below came from a real failing pair found by rendering each page. ---- */

/* The brand purple carries white text on cards and buttons at 4.42 to 1. Just under AA, so the fill is 10% darker wherever it is used as a background. */
.bg-vibe-500{background-color:color-mix(in srgb,rgb(var(--vibe-500)) 90%,#000)}

/* Dimmed rows and panels (a section that is switched off, an inactive row) keep a clear dim, but never below AA. */
.opacity-80,.opacity-90{opacity:1}
.opacity-50,.opacity-60,.opacity-70{opacity:.85}

/* Pale purple text on white or the pale page (empty states, placeholders, table heads, small notes): the 600 shade. Not inside dark panels. */
html:not(.gs-dark) :is(.text-vibe-300,.text-vibe-400):not(#vsidebar *):not([class*="bg-vibe-9"] *):not([class*="bg-vibe-8"] *):not([class*="bg-vibe-7"] *):not(.bg-black *):not([class*="bg-vibe-500"] *):not([class*="bg-vibe-600"] *):not([class*="th-"] *){color:rgb(var(--vibe-600))}
.text-gray-500{color:#4b5563}
.text-gray-400{color:#6b7280}

/* Green fills carry white text: the darker green on every green fill, not only when the text class sits on the same element. */
.bg-emerald-500,.bg-emerald-600,.bg-green-500,.bg-green-600{background-color:#047857}

/* Heat map cells (busy times, occupancy): dark ink on the pale cells, white only on the strong ones. */
.bg-vibe-100 .text-white,.bg-vibe-200.text-white,.bg-vibe-300.text-white,.bg-vibe-400.text-white{color:rgb(var(--vibe-950))}

/* The footer divider and other dim marks on the dark staff chrome. */
#vsidebar .text-vibe-700,#vsidebar .text-vibe-800,footer .text-vibe-700{color:#c9c0e0}

/* Member app, dark mode: the amber "read only" banner and the theme banner close button keep dark ink on their light fill. */
html.gs-dark .bg-amber-400,html.gs-dark .bg-amber-400 *{color:#451a03 !important}
html.gs-dark .th-banner-x{color:#efeef2 !important}

html.gs-dark .th-banner button.th-banner-x,html.gs-dark .th-banner .th-banner-x{color:#efeef2 !important}
