/* ============================================================
   island.css — Dynamic Island "live activity" mode
   Extends #island (base pill defined in system.css: position,
   background, blur/shadow, radius, .show toggle). This file only
   adds what .live/.multi need — it does not redefine position or
   background so it stays consistent with the base pill look.
   ============================================================ */

#island.live {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
  width: auto;
  max-width: 360px;
  padding: 10px 20px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-radius: 22px;
  transition: width .45s cubic-bezier(.34,1.56,.64,1),
              max-width .45s cubic-bezier(.34,1.56,.64,1),
              opacity .3s ease, padding .35s ease,
              transform .45s cubic-bezier(.34,1.56,.64,1);
  animation: li-appear .45s cubic-bezier(.34,1.56,.64,1);
}

@keyframes li-appear {
  0%   { transform: translateX(-50%) scale(.85); opacity: 0; }
  60%  { transform: translateX(-50%) scale(1.04); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* icon */
#island.live .li-ic {
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
  animation: li-pulse 1.6s ease-in-out infinite;
}

@keyframes li-pulse {
  0%, 100% { opacity: .75; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.12); }
}

/* title + subtitle block */
#island.live .li-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
}

#island.live .li-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#island.live .li-sub {
  font-size: 11px;
  opacity: .65;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* trailing extra: ring / progress bar / score */
#island.live .li-extra {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* circular progress ring — JS sets stroke-dashoffset on .ring-fg
   (pathLength=100, so dashoffset 0-100 = 0%-100%) */
#island.live .li-ring {
  width: 26px;
  height: 26px;
  transform: rotate(-90deg);
  overflow: visible;
}

#island.live .li-ring .ring-bg {
  fill: none;
  stroke: rgba(255,255,255,.22);
  stroke-width: 3;
}

#island.live .li-ring .ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100; /* JS overrides inline per-frame */
  transition: stroke-dashoffset .3s linear;
}

/* linear progress track — JS sets width on inner <i> (0%-100%) */
#island.live .li-prog {
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.2);
  overflow: hidden;
}

#island.live .li-prog i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s ease;
}

/* scoreboard */
#island.live .li-score {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

/* multiple stacked activities */
#island.live.multi {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 6px 20px;
}

#island.live.multi .li-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

#island.live.multi .li-row + .li-row {
  border-top: 1px solid rgba(255,255,255,.14);
}

body.mobile #island.live {
  max-width: 92vw;
}

body.mobile #island.live .li-title {
  font-size: 11.5px;
}

body.mobile #island.live .li-sub {
  font-size: 10px;
}

body.mobile #island.live .li-score {
  font-size: 12px;
}
