/* "Change look" popup (templates/fragments/theme_picker.html, static/theme_picker.js).
   Shared core file. Docked at the bottom so the page behind it stays visible
   as the preview. Colours all come from the theme. */
.tp-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tp-summary-text { font-size: 14px; }
.tp-summary .tp-result { flex-basis: 100%; }
.tp-wrap.tp-compact .tp-summary .tp-chips,
.tp-wrap.tp-compact .tp-summary-text { display: none; }
.tp-chips { display: inline-flex; width: 56px; height: 22px; flex: none; border-radius: 7px; overflow: hidden; box-sizing: border-box;
            border: 1px solid color-mix(in srgb, var(--text-main) 30%, transparent); }
.tp-chips span { flex: 1; }
.tp-sheet { position: fixed; z-index: 1200; left: 50%; bottom: 14px; transform: translateX(-50%);
            width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 28px); overflow-y: auto; box-sizing: border-box;
            margin: 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px;
            background: var(--bg-panel); color: var(--text-main); border: 1px solid var(--border-hairline);
            border-radius: var(--radius-lg, 16px); box-shadow: var(--shadow-pop, 0 16px 40px rgba(0, 0, 0, .5)); }
.tp-sheet[hidden] { display: none; }
.tp-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.tp-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-muted); }
.tp-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
            border-radius: 50%; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.tp-close:hover { background: var(--bg-panel-raised); color: var(--text-main); }
/* Family tabs: one short row (scrolls sideways on a phone instead of wrapping into a pile). */
.tp-families { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tp-families::-webkit-scrollbar { display: none; }
.tp-fam { flex: none; font-size: 12px; padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap;
          border: 1px solid var(--border-hairline); background: transparent; color: var(--text-muted); }
.tp-fam:hover { color: var(--text-main); border-color: var(--text-muted); }
.tp-fam.is-on { background: var(--accent, var(--rust)); border-color: var(--accent, var(--rust)); color: var(--on-accent); }
.tp-stage { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; touch-action: pan-y; }
.tp-step { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
           border-radius: 50%; border: 1px solid var(--border-hairline); background: var(--bg-panel-raised); color: var(--text-main);
           transition: border-color var(--t-fast, .14s) var(--ease, ease); }
.tp-step:hover { border-color: var(--accent, var(--rust)); color: var(--accent-bright, var(--rust-bright)); }
.tp-show { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.tp-chips-big { width: 100%; max-width: 260px; height: 34px; border-radius: 10px; margin-bottom: 6px; }
.tp-show-name { font-size: 22px; font-weight: 700; line-height: 1.15; }
.tp-show-family { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.tp-show-desc { font-size: 13px; color: var(--text-muted); min-height: 2.6em; }
.tp-fine { border-top: 1px solid var(--border-hairline); padding-top: 10px; }
.tp-fine summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.tp-fine[open] summary { margin-bottom: 8px; }
.tp-wheels { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; }
.tp-wheel { display: flex; flex-direction: column; gap: 6px; }
.tp-own { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.tp-own input { accent-color: var(--accent, var(--rust)); }
.tp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tp-actions .tp-reset { margin-left: auto; }
/* The colour wheel opens above the popup. */
.cw-pop { z-index: 1300; }
/* Room at the foot of the page so the popup never hides the last lines. */
body.tp-sheet-open { padding-bottom: 340px; }

/* Event pictures (static/event_fx.js). Never in the way of a click. */
.event-fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.event-fx-behind { z-index: -1; }
.event-fx-front { z-index: 900; }
.event-fx img { position: absolute; left: 0; top: 0; height: auto; opacity: .9; will-change: transform; user-select: none; }

/* Admin -> Theme -> Events (templates/fragments/events_admin.html). */
.ev-master { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 8px; }
.ev-num { width: 80px; padding: 4px 8px; }
.ev-help code { font-size: 12px; }
.ev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 12px 0; }
.ev-card { border: 1px solid var(--border-hairline); border-radius: var(--radius-md, 12px); padding: 12px; background: var(--bg-panel-raised);
           display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-card.is-showing { border-color: var(--accent, var(--rust)); }
.ev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-name { font-size: 16px; margin-right: auto; }
.ev-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border-hairline); color: var(--text-muted); white-space: nowrap; }
.ev-chip.ev-on { border-color: var(--good, #4caf50); color: var(--good, #4caf50); }
.ev-chip.ev-showing { background: var(--accent, var(--rust)); border-color: var(--accent, var(--rust)); color: var(--on-accent); }
.ev-thumbs { display: flex; flex-wrap: wrap; gap: 6px; min-height: 40px; align-items: center; }
.ev-thumbs img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: var(--bg-base); padding: 3px; }
.ev-warn { color: var(--warn, #e8b13a); cursor: help; }
.ev-edit summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ev-edit[open] summary { margin-bottom: 8px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ev-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.ev-field select, .ev-field input[type=range] { width: 100%; }
.ev-master .ev-field { flex-direction: row; align-items: center; gap: 6px; }
.ev-md { display: flex; gap: 4px; }
.ev-md select { width: auto; flex: 1; }
.ev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
