/**
 * Single battery page.
 *
 * Loaded after device.css, whose tokens, breadcrumbs, hero heading, document cards and device
 * cards this page reuses as-is - the page's root carries both `.calamp-device` and
 * `.calamp-battery`. Only what the battery page has and the device page does not lives here: the
 * label/value groups, free text, and the disposal symbol.
 *
 * Every selector is scoped under `.calamp-battery`, for the same reason device.css scopes under
 * `.calamp-device`. Sizes keep device.css's 1rem floor.
 */

.calamp-battery__hero {
  padding-bottom: clamp(24px, 4vw, 40px);
}

.calamp-battery__eyebrow {
  margin: 0 0 8px;
  color: var(--calamp-muted);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* On the surface tint, like the device page's specifications, so the regulatory data reads as
   one block between the heading and the device cards. */
.calamp-battery__sections {
  background: var(--calamp-surface);
}

.calamp-battery__section {
  width: min(var(--calamp-max), 100%);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) var(--calamp-gutter);
}

.calamp-battery__section + .calamp-battery__section {
  border-top: 1px solid var(--calamp-divider);
}

.calamp-battery__section > h2 {
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
}

/* Label/value rows as a two-column list: a fixed label column on wide screens, stacked on narrow
   ones. A <dl> because that is what this is - and it reads as pairs to a screen reader. */
.calamp-battery__fields {
  display: grid;
  margin: 0;
  border: 1px solid var(--calamp-divider);
  border-radius: var(--calamp-radius);
  background: var(--calamp-canvas);
  overflow: hidden;
}

.calamp-battery__field {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 8px 24px;
  padding: 14px 20px;
}

.calamp-battery__field + .calamp-battery__field {
  border-top: 1px solid var(--calamp-divider);
}

.calamp-battery__field dt {
  color: var(--calamp-muted);
  font-weight: 700;
}

.calamp-battery__field dd {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Free text sits under the rows, or alone when a group has nothing else. */
.calamp-battery__text {
  max-width: 820px;
  color: var(--calamp-ink);
  line-height: 1.6;
}

.calamp-battery__fields + .calamp-battery__body,
.calamp-device__certification-document-list + .calamp-battery__body {
  margin-top: 20px;
}

/* Free text with the disposal symbol beside it, on the right. The symbol column only exists when
   the symbol does, so text alone keeps its full width. Stacked below 640px (see the end). */
.calamp-battery__body--symbol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px clamp(24px, 4vw, 48px);
  align-items: start;
}

.calamp-battery__body--symbol .calamp-battery__symbol {
  grid-column: 2;
}

.calamp-battery__text p {
  margin: 0 0 12px;
}

.calamp-battery__text p:last-child {
  margin-bottom: 0;
}

.calamp-battery__symbol-icon {
  display: inline-flex;
  width: 48px;
  height: 60px;
  color: var(--calamp-navy);
}

.calamp-battery__symbol-icon svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .calamp-battery__field {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .calamp-battery__body--symbol {
    grid-template-columns: minmax(0, 1fr);
  }

  .calamp-battery__body--symbol .calamp-battery__symbol {
    grid-column: 1;
  }
}
