/* ISM POS — Violeta (ism-pos-apps/brand). Tokens first; the floor-plan rules below follow. */
:root {
	--trx-brand: #7C3AED;
	--trx-brand-hover: #6D28D9;
	--trx-nav-active: #7C3AED;
	--bs-link-color: #7C3AED;
	--bs-link-color-rgb: 124, 58, 237;
	--bs-link-hover-color: #6D28D9;
	--bs-link-hover-color-rgb: 109, 40, 217;
}

[data-bs-theme="dark"] {
	--trx-nav-active: #A78BFA;
	--bs-link-color: #A78BFA;
	--bs-link-color-rgb: 167, 139, 250;
	--bs-link-hover-color: #C4B5FD;
	--bs-link-hover-color-rgb: 196, 181, 253;
}

/* ISM POS — visual rules for the live floor plan on Salón only, so no other console changes.
   Like copropietarios.css, this file carries a few rules besides tokens (`npm run brand-check pos-app`
   reports them; that is expected). Every rule is visual and nothing here changes what a control does.
   The server (pos-register api/floorPlan.mjs) names each box's class by lens:
     Estado   free_<shape> · open_<shape>
     Consumo  open_spend_low|mid|high · free_muted        (thirds of the largest open check)
     Tiempo   open_time_fresh|mid|long · free_muted       (under 45 min · 45–90 · over 90) */
/* (The doubled class outranks the renderer's scoped default whatever the load order.) */

/* Estado — free is green, a taken table the brand colour. */
.trx-gallery-box.trx-gallery-box[class*="cls-free_"] { --box: var(--bs-success); background: color-mix(in srgb, var(--box) 14%, transparent); }
.trx-gallery-box.trx-gallery-box.cls-open_round, .trx-gallery-box.trx-gallery-box.cls-open_square, .trx-gallery-box.trx-gallery-box.cls-open_rect, .trx-gallery-box.trx-gallery-box.cls-open_bar,
.trx-gallery-box.trx-gallery-box[class*="cls-open_spend_"], .trx-gallery-box.trx-gallery-box.cls-open_time_fresh {
	--box: var(--trx-brand, #466e89);
	background: color-mix(in srgb, var(--box) 30%, transparent);
}

/* Consumo — the tint grows with the check: about 12 %, 35 %, 70 % of the accent, white text on the darkest.
   The side list's swatches carry the same fills (below). */
.trx-gallery-box.trx-gallery-box.cls-open_spend_low { background: color-mix(in srgb, var(--box) 12%, transparent); }
.trx-gallery-box.trx-gallery-box.cls-open_spend_mid { background: color-mix(in srgb, var(--box) 35%, transparent); }
.trx-gallery-box.trx-gallery-box.cls-open_spend_high { --box: var(--trx-brand-hover, #314d60); background: color-mix(in srgb, var(--box) 72%, transparent); border-width: 3px; color: #fff; }

/* Tiempo — normal, then amber, then red. */
.trx-gallery-box.trx-gallery-box.cls-open_time_mid { --box: #b45309; background: color-mix(in srgb, var(--box) 32%, transparent); }
.trx-gallery-box.trx-gallery-box.cls-open_time_long { --box: var(--bs-danger); background: color-mix(in srgb, var(--box) 40%, transparent); border-width: 3px; }

/* A free table in the Consumo and Tiempo lenses steps back. */
.trx-gallery-box.trx-gallery-box.cls-free_muted { --box: var(--bs-secondary-color); background: transparent; opacity: 0.6; }

/* The floor's text sits inside its box. */
.trx-gallery-box.trx-gallery-box.cls-open_spend_high .trx-gallery-inside { color: #fff; }

/* Swatches in the side list: the same colour and fill as the box they stand for. */
.trx-gallery-swatch.trx-gallery-swatch[class*="cls-free_"] { border-color: var(--bs-success); background: color-mix(in srgb, var(--bs-success) 14%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-open_round, .trx-gallery-swatch.trx-gallery-swatch.cls-open_square, .trx-gallery-swatch.trx-gallery-swatch.cls-open_rect, .trx-gallery-swatch.trx-gallery-swatch.cls-open_bar,
.trx-gallery-swatch.trx-gallery-swatch.cls-open_time_fresh { border-color: var(--trx-brand, #466e89); background: color-mix(in srgb, var(--trx-brand, #466e89) 30%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-open_spend_low { border-color: var(--trx-brand, #466e89); background: color-mix(in srgb, var(--trx-brand, #466e89) 12%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-open_spend_mid { border-color: var(--trx-brand, #466e89); background: color-mix(in srgb, var(--trx-brand, #466e89) 35%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-open_spend_high { border-color: var(--trx-brand-hover, #314d60); background: color-mix(in srgb, var(--trx-brand-hover, #314d60) 72%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-open_time_mid { border-color: #b45309; background: color-mix(in srgb, #b45309 32%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-open_time_long { border-color: var(--bs-danger); background: color-mix(in srgb, var(--bs-danger) 40%, transparent); }
.trx-gallery-swatch.trx-gallery-swatch.cls-free_muted { border-color: var(--bs-secondary-color); background: transparent; opacity: 0.6; }
