/* Battery schedule for the main PowerBreak page. */
.battery-schedule {
  --battery-tip-space: 18px;
  border-top: 0;
  padding-top: clamp(100px, 12.25vw, 180px);
  padding-bottom: 40px;
}

.battery-schedule + .past-events { padding-top: clamp(48px, 5vw, 72px); }

.battery-schedule .schedule-heading {
  max-width: 960px;
  margin-bottom: clamp(28px, 3vw, 44px);
}

.battery-schedule .experience-intro {
  max-width: 760px;
  margin-inline: auto;
  font-size: clamp(16px, 1.225vw, 20px);
}

.battery-scroll-anchor { height: 0; }
.battery-scroll-stage { position: relative; display: flow-root; }
.battery-schedule.is-scroll-driven .battery-scroll-track { height: calc(var(--battery-stage-height) + var(--battery-scroll-distance)); }
.battery-schedule.is-scroll-driven .battery-scroll-stage { position: sticky; top: var(--battery-sticky-top); }

.battery-shell {
  position: relative;
  margin-right: var(--battery-tip-space);
  padding: 9px;
  border: 2px solid #ffffff1f;
  border-radius: 26px;
}

.battery-shell::after {
  content: "";
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  width: 12px;
  height: 40px;
  border-radius: 0 8px 8px 0;
  background: #ffffff1f;
  transform: translateY(-50%);
}

.battery-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.battery-cell {
  min-width: 0;
  min-height: clamp(140px, 10.9vw, 180px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 36px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 18px 15px 15px;
  border: 0;
  border-radius: 16px;
  background: #0d0816;
  color: #f0ecf7;
  text-align: left;
  cursor: pointer;
  transition: color .32s ease, box-shadow .2s ease;
}

.battery-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--purple);
  transform: scaleX(var(--cell-charge, 0));
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}

.battery-cell.is-charged { color: #100a20; }
.battery-cell.is-charged::before { transform: scaleX(var(--cell-charge, 1)); }
.battery-schedule.is-scroll-driven .battery-cell::before { transition: none; }
.battery-cell:hover { box-shadow: inset 0 0 0 2px #c6acff80; }
.battery-cell:focus-visible { outline: 2px solid #e2d5ff; outline-offset: -5px; }
.battery-cell strong { font-size: 20px; font-weight: 600; line-height: 1.2; }
.battery-cell time,
.battery-detail-meta {
  font-family: Albert Sans, Arial, sans-serif;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 2px;
}
.battery-cell time { color: #a19aaf; }
.battery-cell.is-charged time { color: #201237; }

.battery-details { margin-top: 36px; margin-right: var(--battery-tip-space); display: grid; }
.battery-panel {
  grid-area: 1 / 1;
  min-height: 176px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 36px;
  align-items: center;
  gap: 36px;
  padding: 36px;
  border: 1px solid #a987ff24;
  border-radius: 22px;
  background: #0d0816;
  color: #f0ecf7;
}
/* Reserve the tallest day's height so scroll progress stays stable. */
.battery-panel[hidden] { display: grid; visibility: hidden; pointer-events: none; }
.battery-panel:focus-visible { outline: 2px solid var(--purple); outline-offset: 6px; }
.battery-detail-day {
  min-width: 2.4em;
  white-space: nowrap;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-right: 30px;
  border-right: 1px solid #aca6c240;
  font-family: Albert Closing, Albert Sans, Arial, sans-serif;
  font-size: 92px;
  font-weight: 700;
  line-height: .95;
  letter-spacing: -5px;
}
.battery-detail-meta { margin: 0 0 12px; color: #a19aaf; }
.battery-detail-copy { min-width: 0; overflow-wrap: break-word; }
.battery-detail-copy h3 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; font-weight: 600; letter-spacing: -.5px; }
.battery-detail-description { margin: 0; color: #a19aaf; font-size: 14px; line-height: 1.6; }
.battery-detail-icon { display: block; width: 36px; height: 36px; color: #c9afff; }
.battery-panel.is-entering .battery-detail-copy,
.battery-panel.is-entering .battery-detail-icon { animation: battery-detail-in .3s ease both; }
@keyframes battery-detail-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1000px) {
  .battery-panel { grid-template-columns: max-content minmax(0, 1fr) 32px; gap: 24px; padding: 28px; }
  .battery-detail-day { font-size: 68px; padding-right: 24px; letter-spacing: -3px; }
  .battery-detail-icon { width: 32px; height: 32px; }
}
@media (max-width: 700px) {
  .battery-schedule { --battery-tip-space: 12px; }
  .battery-shell { padding: 6px; border-radius: 18px; }
  .battery-shell::after { left: calc(100% + 5px); width: 8px; height: 30px; border-radius: 0 5px 5px 0; }
  .battery-tabs { gap: 5px; }
  .battery-cell { min-height: 116px; padding: 14px 9px; border-radius: 11px; }
  .battery-cell strong { font-size: 16px; }
  .battery-cell time { font-size: 8px; letter-spacing: 1px; }
  .battery-details { margin-top: 24px; }
  .battery-panel { grid-template-columns: minmax(0, 1fr) 32px; gap: 20px 12px; padding: 24px; min-height: 260px; }
  .battery-detail-day { grid-column: 1; grid-row: 1; min-width: 0; border: 0; padding: 0; font-size: 56px; }
  .battery-detail-icon { grid-column: 2; grid-row: 1; }
  .battery-detail-copy { grid-column: 1 / -1; grid-row: 2; padding-top: 20px; border-top: 1px solid #aca6c230; }
  .battery-detail-copy h3 { font-size: 21px; }
  .battery-detail-meta { letter-spacing: 1.4px; }
}
/* Keep the heading, cells and detail together on shorter screens. */
@media (max-height: 740px) {
  .battery-schedule .schedule-heading { margin-bottom: 24px; }
  .battery-schedule .section-label { margin-bottom: 12px; }
  .battery-schedule .schedule-heading h2 { font-size: clamp(30px, 4.63vw, 52px); margin-bottom: 14px; }
  .battery-schedule .experience-intro { font-size: 14px; }
  .battery-cell { min-height: 88px; gap: 20px; }
  .battery-details { margin-top: 20px; }
  .battery-panel { min-height: 0; padding: 20px; gap: 12px 20px; }
  .battery-detail-day { font-size: 48px; }
  .battery-detail-description { font-size: 13px; }
}
@media (max-height: 740px) and (max-width: 700px) {
  .battery-detail-copy { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .battery-cell, .battery-cell::before { transition: none; }
  .battery-panel.is-entering .battery-detail-copy,
  .battery-panel.is-entering .battery-detail-icon { animation: none; }
}
