2026-10-14 20:12:23 -04:00
|
|
|
/* Companion Buttons — scoped under its tile via [data-module="companion-buttons"],
|
|
|
|
|
styled with the shell's CSS variables only. The button pictures carry
|
|
|
|
|
Companion's own colours; everything around them follows the theme. */
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-root {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
padding: 6px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
/* ── the chosen buttons ─────────────────────────────────────────────── */
|
|
|
|
|
|
2026-10-14 20:12:23 -04:00
|
|
|
[data-module="companion-buttons"] .cb-grid {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(var(--cb-cols, 1), var(--cb-size, 64px));
|
2026-10-15 12:09:31 -04:00
|
|
|
grid-auto-rows: max-content;
|
2026-10-14 20:12:23 -04:00
|
|
|
gap: 6px;
|
|
|
|
|
align-content: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-cell {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
2026-10-14 20:12:23 -04:00
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-face {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: var(--cb-size, 64px);
|
|
|
|
|
height: var(--cb-size, 64px);
|
|
|
|
|
border-radius: 8%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
background: color-mix(in srgb, var(--text) 6%, transparent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-img {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
object-fit: contain;
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-face.is-waiting {
|
|
|
|
|
animation: cb-wait 1.4s ease-in-out infinite alternate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes cb-wait {
|
|
|
|
|
from { opacity: 0.35; }
|
|
|
|
|
to { opacity: 0.8; }
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-face.is-missing {
|
2026-10-14 20:12:23 -04:00
|
|
|
background: transparent;
|
|
|
|
|
outline: 1px dashed var(--border);
|
|
|
|
|
outline-offset: -1px;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-note {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding: 8%;
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
font-size: clamp(0.6rem, calc(var(--cb-size, 64px) * 0.12), 0.9rem);
|
|
|
|
|
line-height: 1.15;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-note:empty { display: none; }
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-caption {
|
|
|
|
|
display: none;
|
|
|
|
|
width: var(--cb-size, 64px);
|
|
|
|
|
height: 18px;
|
|
|
|
|
padding-top: 3px;
|
|
|
|
|
color: var(--muted);
|
|
|
|
|
font-size: 0.72rem;
|
|
|
|
|
line-height: 15px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-grid.has-captions .cb-caption { display: block; }
|
|
|
|
|
|
2026-10-14 20:12:23 -04:00
|
|
|
/* Companion gone: the last pictures stay, faded, so nobody reads them as live. */
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-grid.is-offline .cb-face {
|
2026-10-14 20:12:23 -04:00
|
|
|
opacity: 0.3;
|
|
|
|
|
filter: grayscale(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-banner {
|
|
|
|
|
flex: none;
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
padding: 3px 8px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
background: color-mix(in srgb, var(--danger) 18%, transparent);
|
|
|
|
|
color: var(--danger);
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
letter-spacing: 0.06em;
|
|
|
|
|
text-align: center;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-banner[hidden] { display: none; }
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
/* ── nothing chosen ─────────────────────────────────────────────────── */
|
|
|
|
|
|
2026-10-14 20:12:23 -04:00
|
|
|
[data-module="companion-buttons"] .cb-empty {
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2026-10-15 12:09:31 -04:00
|
|
|
padding: 12px;
|
2026-10-14 20:12:23 -04:00
|
|
|
color: var(--muted);
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
/* ── choosing: one Companion page, laid out as Companion has it ─────── */
|
2026-10-14 20:12:23 -04:00
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-chooser {
|
|
|
|
|
position: absolute;
|
|
|
|
|
inset: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
padding: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-pick-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(var(--cb-pick-cols, 8), minmax(36px, 1fr));
|
|
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-pick-key {
|
|
|
|
|
position: relative;
|
|
|
|
|
aspect-ratio: 1;
|
|
|
|
|
padding: 0;
|
|
|
|
|
border: 0;
|
|
|
|
|
border-radius: 8%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
background: color-mix(in srgb, var(--text) 6%, transparent);
|
2026-10-14 20:12:23 -04:00
|
|
|
cursor: pointer;
|
2026-10-15 12:09:31 -04:00
|
|
|
-webkit-tap-highlight-color: transparent;
|
2026-10-14 20:12:23 -04:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-pick-img {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
object-fit: contain;
|
|
|
|
|
pointer-events: none;
|
2026-10-14 20:12:23 -04:00
|
|
|
}
|
|
|
|
|
|
2026-10-15 12:09:31 -04:00
|
|
|
[data-module="companion-buttons"] .cb-pick-img.is-broken { visibility: hidden; }
|
|
|
|
|
|
|
|
|
|
/* Chosen: a ring and the place it shows in. Nothing else is ever marked. */
|
|
|
|
|
[data-module="companion-buttons"] .cb-pick-key.is-picked {
|
|
|
|
|
outline: 3px solid var(--accent);
|
|
|
|
|
outline-offset: -3px;
|
2026-10-14 20:12:23 -04:00
|
|
|
}
|
2026-10-15 12:09:31 -04:00
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-pick-badge {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 3px;
|
|
|
|
|
right: 3px;
|
|
|
|
|
min-width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
padding: 0 4px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
background: var(--accent);
|
|
|
|
|
color: var(--accent-text);
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
line-height: 16px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[data-module="companion-buttons"] .cb-pick-badge:empty { display: none; }
|