/* AI-W5.1-B battery page (v8.202). The page uses inverter-page.css for the
   shared long-form layout; this adds the battery calculator's stack drawing,
   the stack power note, the scene's AI-W5.1-B stack and the parts' Add button. */
.bat-page .bat-lede{font-size:14px;line-height:1.7;color:#4d606c;margin:-2px 0 14px;max-width:520px}

/* The stack drawing, one per module count (battery-page.js shows one). */
.bat-page .bat-stack-view{margin:12px 0 4px;padding:10px 12px 10px;background:linear-gradient(180deg,#eaf3f9 0%,#f7fafc 62%,#fff 100%);border:1px solid #e3ebf0;border-radius:14px;text-align:center}
.bat-page .bat-stack-svg{display:block;width:100%;max-width:200px;height:auto;margin:0 auto}
.bat-page .bat-stack-svg[hidden]{display:none}
.bat-page .bat-stack-view figcaption{font-size:12.5px;line-height:1.5;color:#4d606c;margin-top:8px}
.bat-page .bat-ghost{fill:rgba(255,255,255,.5);stroke:#b8c6cf;stroke-width:1.4;stroke-dasharray:5 5}

/* Stack parts drawn in code, here and in the wall-mount scene. */
.bat-page .sc-pdu{fill:#f3f5f7;stroke:#c9d3da;stroke-width:1}
.bat-page .sc-pdu-leds{stroke:#3f8f5f;stroke-width:2.6;stroke-linecap:round}
.bat-page .sc-base{fill:#5b6770}

/* Can the stack supply it? */
.bat-page .bat-power{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.55;margin-top:12px;padding:11px 13px;border-radius:10px;background:#eef6f0;color:#25583a}
.bat-page .bat-power svg{width:18px;height:18px;flex-shrink:0;margin-top:1px}
.bat-page .bat-power.is-short{background:#fdf1e6;color:#8a4b10}
.bat-page .bat-power.is-idle{background:var(--surface);color:#4d606c}

/* Life and safety: four facts in one row on desktop (inverter pages use three). */
.bat-page .inv-safety{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1100px){.bat-page .inv-safety{grid-template-columns:1fr 1fr}}

/* Stack table: the columns in use follow the calculator. */
.bat-page .bat-stack-table td,.bat-page .bat-stack-table th{transition:background .15s}
.bat-page .bat-peer-table td small,.bat-page .bat-stack-table th small{display:block}

/* Parts: same look as the inverter pages' Add button, its own class (the
   battery page's "Pairs with" panel carries no Add buttons). */
.bat-page .inv-battery .bat-part-add{display:inline-flex;align-items:center;gap:5px;border:1px solid #becbd3;border-radius:20px;padding:8px 12px;font-size:12px;background:#fff;cursor:pointer}
.bat-page .inv-battery .bat-part-add:hover{background:var(--blue);border-color:var(--blue);color:#fff}
.bat-page .inv-battery .bat-part-add svg{width:14px;height:14px}
.bat-page .bat-aio-card .inv-battery-buy .text-button{white-space:nowrap}

/* The other batteries (v8.203). Their calculator drawings are wider than the
   AI-W5.1-B stack: wall units in rows, rack modules on brackets, high-voltage
   stacks drawn in code. */
.bat-page .bat-bank-svg{max-width:280px}
.bat-page .bat-cable{fill:none;stroke:#9aa8b2;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.bat-page .bat-bracket{fill:#e3e8ec;stroke:#c4ced6;stroke-width:.8}
.bat-page .bat-rack{fill:#e6ecf0;stroke:#c4ced6;stroke-width:1}
.bat-page .bat-hv-box{fill:#f3f5f7;stroke:#c9d3da;stroke-width:.8}
.bat-page .bat-hv-screen{fill:#2b3640}
.bat-page .bat-hv-alarm{fill:#e8b931}
.bat-page .bat-hv-module{fill:#fff;stroke:#c9d3da;stroke-width:.8}
.bat-page .bat-hv-plug{fill:#e07b24}
.bat-page .bat-hv-plug.is-neg{fill:#3b4650}
.bat-page .sc-gbl-module{fill:#fbfcfd;stroke:#cdd6dd;stroke-width:1}
.bat-page .sc-gbl-box{fill:#f1f4f6;stroke:#cdd6dd;stroke-width:1}
.bat-page .sc-gbl-screen{fill:#26323b}
.bat-page .sc-gbl-line{fill:none;stroke:#2f5fb3;stroke-width:1.6;stroke-linecap:round}

/* "Add 2 batteries to your cart": the Designer link's look, as a button. */
.bat-page button.inv-designer{width:100%;font-family:inherit;line-height:1.4;text-align:left;cursor:pointer}
.bat-page .bat-cta-note{margin-top:8px}
.bat-page .bat-cta-note a{color:var(--blue);text-decoration:underline;text-underline-offset:2px}

/* Bank tables: one row per count; the calculator's count is highlighted. */
.bat-page .bat-bank-table.is-narrow{min-width:0}
.bat-page .bat-bank-table tbody th{width:auto;color:var(--ink);font-weight:500}
.bat-page .bat-bank-table tr.is-current th,.bat-page .bat-bank-table tr.is-current td{background:#eef4f8}
.bat-page .bat-bank-table tr.is-current th{box-shadow:inset 3px 0 0 var(--blue)}
.bat-page .bat-bank-table td,.bat-page .bat-bank-table th{transition:background .15s}
.bat-page .bat-bank-table td small,.bat-page .bat-expansion-table td small,.bat-page .bat-expansion-table th small{display:block}
.bat-page .bat-expansion-table tbody th{width:auto;color:var(--ink);font-weight:500}

/* Deye's accessories, listed from the datasheet. */
.bat-page .bat-box-list{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.bat-page .bat-box-list li{display:flex;flex-direction:column;gap:3px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:13px;line-height:1.5;color:#4d606c}
.bat-page .bat-box-list strong{font-size:12px;font-weight:600;color:var(--ink)}
@media(max-width:700px){.bat-page .bat-box-list{grid-template-columns:1fr}}

@media (prefers-reduced-motion:reduce){.bat-page .bat-stack-table td,.bat-page .bat-stack-table th,.bat-page .bat-bank-table td,.bat-page .bat-bank-table th{transition:none}}
@media(max-width:700px){
 .bat-page .bat-lede{font-size:13px}
 .bat-page .bat-stack-svg{max-width:180px}
 /* Seven and five columns do not fit a phone: the tables scroll inside their
    frame, with the row labels pinned on the left. */
 .bat-page .bat-stack-table{min-width:600px;table-layout:auto}
 .bat-page .bat-peer-table{min-width:560px;table-layout:auto}
 .bat-page .bat-stack-table th,.bat-page .bat-stack-table td,.bat-page .bat-peer-table th,.bat-page .bat-peer-table td{overflow-wrap:normal}
 .bat-page .bat-stack-table tbody th,.bat-page .bat-peer-table tbody th{position:sticky;left:0;z-index:1;background:#fff;width:124px;min-width:124px;box-shadow:1px 0 0 var(--line)}
 .bat-page .bat-stack-table thead th:first-child,.bat-page .bat-peer-table thead th:first-child{position:sticky;left:0;z-index:2;background:#edf2f5}
}
