/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * Copyright © 2026 Marcel Rymenhout and IniqDash contributors */
/* Live Activity Widget V1 — widget-specific CSS only (tokens from assets/css/tokens.css). Namespace: iq-act. */
.iq-act { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; height: 100%; box-sizing: border-box; padding: 12px; overflow: hidden;
  border-radius: var(--radius-device); color: var(--text-primary); font-family: var(--font); background: var(--device-surface); box-shadow: var(--device-shadow); }
.iq-act [hidden] { display: none !important; }
.iq-act__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.iq-act__ids { min-width: 0; }
.iq-act__name { margin: 0; font-size: 14px; font-weight: var(--iq-fw-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-act__sub { margin: 0; font-size: 11.5px; color: var(--text-muted); }
.iq-act__count { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); }
.iq-act__list { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.iq-act__list[data-iqx="closed"] { flex: 0 1 auto; }
.iq-act__empty { margin: auto 0; font-size: 12.5px; color: var(--text-muted); text-align: center; }
/* the ACTIVITY ENTRY (MaisonActivity.entry): its colour from the entity / its type / the default — a token or #rrggbb */
.iq-act__entry { --iq-act-c: var(--accent); flex: none; }
.iq-act__btn { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; cursor: default;
  background: color-mix(in srgb, var(--iq-act-c) 14%, var(--surface-tertiary)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--iq-act-c) 30%, transparent); }
button.iq-act__btn { cursor: pointer; }
button.iq-act__btn:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.iq-act__entry[data-bg="solid"] .iq-act__btn { color: var(--accent-on, #1a0e04); background: var(--iq-act-c); box-shadow: none; }
.iq-act__entry[data-bg="surface"] .iq-act__btn { background: var(--surface-tertiary); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.iq-act__entry[data-active="false"] .iq-act__btn { background: var(--surface-secondary); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.iq-act__ic { flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; color: #fff; background: var(--iq-act-c); }
.iq-act__entry[data-bg="solid"] .iq-act__ic { color: var(--iq-act-c); background: color-mix(in srgb, #fff 85%, transparent); }
.iq-act__entry[data-active="false"] .iq-act__ic { color: var(--text-muted); background: var(--control-well); }
.iq-act__ic svg { width: 22px; height: 22px; }
.iq-act__tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.iq-act__title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-act__status { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-act__entry[data-bg="solid"] :is(.iq-act__status, .iq-act__detail) { color: inherit; opacity: .85; }
.iq-act__detail { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-act__badge { flex: none; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--text-primary); background: var(--surface-interactive, var(--surface-tertiary)); }
.iq-act[data-fit-arr="narrow"] .iq-act__btn { padding: 10px; gap: 10px; }
.iq-act[data-fit-arr="narrow"] .iq-act__ic { width: 34px; height: 34px; }

/* ================================================================ PANEL (variant 'panel') — the home's live activity: feature · running · lights · alerts */
.iq-actp { box-sizing: border-box; height: 100%; min-width: 0; display: flex; flex-direction: column; padding: 16px 12px 12px; border-radius: 20px; color: #fff; font-family: var(--mai-font, var(--font));
  background: linear-gradient(180deg, #1f2028 0%, #1c1d24 100%); }
.iq-actp .iqap-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px 0 10px; }
.iq-actp .iqap-title { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .01em; line-height: 14px; }
.iq-actp .iqap-count { display: inline-flex; align-items: center; gap: 4px; padding: 2.5px 8px; border-radius: 99px; font-size: 7.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; line-height: 10px;
  color: #ffcf7a; background: rgba(255, 170, 60, .12); border: 1px solid rgba(255, 170, 60, .3); }
.iq-actp .iqap-count::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 5px #ffb347; }
.iq-actp .iqap-count[hidden] { display: none; }
.iq-actp .iqap-list { margin-top: 11px; flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 2px 2px 4px; scrollbar-width: none; }
.iq-actp .iqap-list::-webkit-scrollbar { display: none; }
.iq-actp .iqap-item { --accent: #ffc83d; position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; column-gap: 11px; padding: 10px 12px 10px 10px; border-radius: 18px;
  background: linear-gradient(180deg, #282a33 0%, #23252d 100%); border: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 6px 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .04); min-width: 0; text-align: left; color: inherit; flex: none; }
.iq-actp button.iqap-item { font: inherit; cursor: pointer; width: 100%; transition: transform .15s; }
.iq-actp button.iqap-item:hover { transform: translateY(-2px); }
.iq-actp .iqap-orb { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 72%, #000) 100%); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 45%, transparent); }
.iq-actp .iqap-orb .bi { line-height: 1; }
.iq-actp .iqap-text { min-width: 0; display: block; }
.iq-actp .iqap-text > span { display: block; }
.iq-actp .iqap-t { font-size: 11.2px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-actp .iqap-s { font-size: 8px; line-height: 11px; color: #8b909c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-actp .iqap-v { font-size: 14.5px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.iq-actp .iqap-v small { font-size: 8.5px; color: #8b909c; margin-left: 1.5px; }
.iq-actp .iqap-item.is-feature { border-color: transparent; padding: 13px 14px 13px 12px; row-gap: 10px; background: linear-gradient(160deg, #ffa244 0%, #ff8a2b 50%, #f5751f 100%); box-shadow: 0 8px 20px rgba(255, 128, 30, .35); }
.iq-actp .iqap-item.is-feature .iqap-orb { background: rgba(255, 255, 255, .22); box-shadow: 0 0 0 4px rgba(255, 255, 255, .1); }
.iq-actp .iqap-item.is-feature .iqap-s, .iq-actp .iqap-item.is-feature .iqap-v small { color: rgba(255, 255, 255, .82); }
.iq-actp .iqap-meta { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; font-size: 8px; color: rgba(255, 255, 255, .85); }
.iq-actp .iqap-flame { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 18px; }
.iq-actp .iqap-flame i { width: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.iq-actp .iqap-flame i.is-on { background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .6); }
.iq-actp .iqap-sep { width: 1px; height: 16px; background: rgba(255, 255, 255, .3); }
.iq-actp .iqap-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.iq-actp .iqap-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px 0 9px; border: 0; border-radius: 99px; background: #1a1c23; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45);
  color: #e3e5ea; font: inherit; font-size: 9.2px; font-weight: 500; cursor: pointer; }
.iq-actp .iqap-chip .bi { color: #ffc83d; filter: drop-shadow(0 0 5px rgba(255, 200, 61, .55)); }
.iq-actp .iqap-chip:hover { color: #fff; }
.iq-actp .iqap-chip:disabled { opacity: .5; cursor: progress; }
.iq-actp .iqap-badge { font: inherit; font-size: 7.2px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 2px 6.5px; border-radius: 99px; background: rgba(255, 255, 255, .08); color: #c9ccd4; border: 0; cursor: pointer; line-height: 10px; }
.iq-actp .iqap-item.is-alert { --accent: #f13c3c; }
.iq-actp .iqap-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; padding: 20px 10px; }
.iq-actp .iqap-eorb { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: #8ee4ff; background: #1a1c23; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45), 0 0 0 6px rgba(47, 192, 255, .06); }
.iq-actp .iqap-empty strong { font-size: 12px; font-weight: 600; }
.iq-actp .iqap-empty span { font-size: 8.5px; color: #8b909c; max-width: 22ch; }
