/* ============================================================
   Palette bridge — Tailwind colour utilities on the dark palettes
   ============================================================
   The contact and gallery pages are built with fixed Tailwind colour
   utilities (bg-white, text-gray-900 …). Those utilities resolve to
   constant values and break against the dark surface of the "modern" and
   "obsidian" palettes, where the palette tokens switch to dark surfaces
   and light ink.

   This file remaps exactly those utilities onto the palette tokens, and
   only for the dark palettes — the light palettes keep the Tailwind
   values they were designed with.
   ============================================================ */

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page {
    color: var(--color-text);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page :is(h1, h2, h3) {
    color: var(--color-text);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page .bg-white {
    background-color: var(--color-bg-card);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page :is(
    .text-gray-700,
    .text-gray-600,
    .text-gray-500
) {
    color: var(--color-text-secondary);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page :is(
    .bg-teal-50,
    .bg-blue-50,
    .bg-green-50,
    .bg-purple-50,
    .bg-orange-50,
    .bg-gray-100
) {
    background-color: var(--color-bg-secondary);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page :is(
    .text-teal-600,
    .text-teal-700
) {
    color: var(--clinical-icon);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .contact-page :is(
    .border-gray-100,
    .border-gray-200
) {
    border-color: var(--color-border);
}

/* Gallery page */
body:is([data-palette="modern"], [data-palette="obsidian"]) .gallery-page .text-gray-900 {
    color: var(--color-text);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .gallery-page .text-teal-700 {
    color: var(--clinical-icon);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .gallery-type-btn {
    color: var(--clinical-icon);
    border-color: var(--color-border);
    background-color: var(--color-bg-card);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .gallery-type-btn.active {
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-fg);
    border-color: var(--btn-primary-bg);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .gallery-page-empty-title {
    color: var(--color-text);
}

body:is([data-palette="modern"], [data-palette="obsidian"]) .gallery-page-empty-sub {
    color: var(--color-text-secondary);
}
