/* Body Battery detail sheet (energy-ui.js). Shares the sheet header, coaching
   card, day heading and footer styles with stress.css (.st-*). */

.en-batt { position: relative; display: flex; align-items: center; justify-content: center; margin: 18px auto 8px; width: 210px; }
.en-batt-body { position: relative; flex: 1; height: 104px; border-radius: 26px; padding: 7px; background: var(--panel); box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--c) 28%, var(--border)), 0 10px 26px color-mix(in srgb, var(--c) 22%, transparent); overflow: hidden; }
.en-batt-fill { position: absolute; left: 7px; top: 7px; bottom: 7px; width: calc((100% - 14px) * var(--p) / 100%); border-radius: 19px 6px 6px 19px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c)); }
.en-batt-rest { position: absolute; top: 7px; bottom: 7px; right: 7px; left: calc(7px + (100% - 14px) * var(--p) / 100%); border-radius: 6px 19px 19px 6px; background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, transparent) 0 2px, transparent 2px 9px); }
.en-batt-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; font-size: 52px; font-weight: 700; letter-spacing: -0.03em; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.22); font-variant-numeric: tabular-nums; }
.en-batt.low .en-batt-val { color: var(--text); text-shadow: 0 0 10px var(--panel), 0 0 2px var(--panel); }
.en-batt-val small { font-size: 24px; font-weight: 700; align-self: center; margin-top: 14px; }
.en-batt-bolt { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 18px; height: 18px; }
.en-batt-bolt svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, 0.85); }
.en-batt-cap { width: 9px; height: 38px; margin-left: 4px; border-radius: 0 6px 6px 0; background: color-mix(in srgb, var(--c) 28%, var(--border)); }
.en-charge { text-align: center; margin: 4px 0 16px; font-size: 16px; }
.en-charge b { color: var(--text); }

.en-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.en-tile { background: var(--panel); border-radius: 20px; padding: 14px; text-align: center; box-shadow: var(--shadow); }
.en-tile b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.en-tile span { color: var(--muted); font-weight: 600; }
.up { color: #34a853; }
.down { color: #e5484d; }

.en-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 2px 0; }
.en-legend i { display: inline-block; width: 14px; height: 6px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.en-legend i.charge { background: #5cc95c; }
.en-legend i.drain { background: color-mix(in srgb, #f59e0b 45%, transparent); }
.en-legend-below { margin-left: auto; }

.en-use-head { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 2px 10px; }
.en-use-head b { font-size: 20px; font-weight: 700; }
.en-use { display: grid; gap: 10px; }
.en-ev { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; background: var(--panel); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow); }
.en-ev-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.en-ev-ico svg { width: 24px; height: 24px; }
.en-ev-ico.sleep { background: rgba(124, 140, 240, 0.16); color: #7c8cf0; }
.en-ev-ico.sleep svg { fill: currentColor; }
.en-ev-ico.act { background: rgba(52, 168, 83, 0.14); color: #34a853; }
.en-ev-ico.act svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.en-ev-ico.act svg circle { fill: currentColor; stroke: none; }
.en-ev-name { font-size: 17px; font-weight: 700; margin: 1px 0; }
.en-ev-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.en-ev-meta span { display: inline-flex; align-items: center; gap: 5px; }
.en-ring { width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid currentColor; }
.en-imp { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 380px) {
  .en-batt { width: 180px; }
  .en-batt-body { height: 92px; }
  .en-batt-val { font-size: 44px; }
}
