/* Consumer unit hub + calculator — extends shared calculator chrome from ../eicr/eicr-page.css */

/* This stylesheet is only loaded on /consumer-unit/ — contain width site-wide on these pages */
html {
  max-width: 100%;
  overflow-x: clip;
}

/* Readout: global eicr rule uses white-space:nowrap; long dynamic HTML was forcing page width */
#cu-calc-readout,
#cu-calc-root .eicr-calc-readout {
  min-width: 0;
  max-width: 100%;
}

#cu-calc-root.eicr-calc-shell,
#cu-calc-root .eicr-calc-shell__bd--fixed {
  min-width: 0;
  max-width: 100%;
}

#cu-calc-root .eicr-calc-readout {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

#cu-calc-root .eicr-calc-micro--sub {
  text-transform: none;
  letter-spacing: 0.05em;
  font-weight: 600;
  line-height: 1.45;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
}

/* Future-proof spec messaging — hub (light) + calculator (dark variant) */
.cu-standards-panel {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 2px solid #0a0a0a;
  border-radius: 0.75rem;
  background: #fafafa;
}

.cu-standards-panel h3 {
  font-family: var(--te-font-hd, ui-sans-serif, system-ui);
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  font-weight: 800;
  color: #0a0a0a;
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.cu-standards-panel p,
.cu-standards-panel li {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #383838;
  margin: 0 0 0.55rem;
}

.cu-standards-panel p:last-child {
  margin-bottom: 0;
}

.cu-standards-panel ul {
  margin: 0.35rem 0 0.55rem;
  padding-left: 1.2rem;
}

.cu-standards-panel li {
  margin-bottom: 0.35rem;
}

.cu-standards-panel strong {
  color: #0a0a0a;
}

.cu-standards-panel--dark {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.7rem 0.75rem;
  border: 1px solid rgba(253, 199, 0, 0.32);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.28);
}

.cu-standards-panel--dark h3 {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 0.45rem;
}

.cu-standards-panel--dark p,
.cu-standards-panel--dark li {
  font-size: 0.52rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
  margin: 0 0 0.45rem;
}

.cu-standards-panel--dark ul {
  margin: 0.25rem 0 0.4rem;
  padding-left: 1rem;
}

.cu-standards-panel--dark li {
  margin-bottom: 0.2rem;
}

.cu-standards-panel--dark strong {
  color: rgba(255, 255, 255, 0.95);
}

#cu-calculator {
  scroll-margin-top: 6rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#cu-calculator .max-w-4xl {
  min-width: 0;
  max-width: min(56rem, 100%);
}

.cu-calc-solo {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  width: 100%;
}

.cu-calc-solo .eicr-calculators-grid {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.eicr-calculators-viewport.cu-calculators-viewport .eicr-calc-shell__bd--fixed {
  overflow: visible;
  min-height: min-content;
}

@media (min-width: 900px) {
  .eicr-calculators-viewport.cu-calculators-viewport {
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .eicr-calculators-viewport.cu-calculators-viewport .eicr-calculators-grid {
    height: auto;
  }

.eicr-calculators-viewport.cu-calculators-viewport .eicr-calc-device {
    height: auto;
    max-height: none;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .eicr-calculators-viewport.cu-calculators-viewport .eicr-calc-device.h-full {
    height: auto;
    align-self: stretch;
  }

  .eicr-calculators-viewport.cu-calculators-viewport .eicr-calc-shell__bd--fixed {
    flex: 1 1 auto;
    min-height: min-content;
  }
}

.cu-cct-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.cu-cct-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.45);
}

#cu-cct-count {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fde047;
  min-width: 2.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.cu-cbreak {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.54rem;
  line-height: 1.35;
  margin: 0.4rem 0 0.35rem;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.7);
}

.cu-cbreak td:first-child,
.cu-cbreak th:first-child {
  width: 66%;
  word-break: break-word;
  hyphens: auto;
}

.cu-cbreak th,
.cu-cbreak td {
  padding: 0.2rem 0.15rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.cu-cbreak th:last-child,
.cu-cbreak td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 800;
  color: #fff;
}

.cu-cbreak .cu-cbreak-sub {
  display: block;
  font-size: 0.47rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.38);
  text-transform: none;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.cu-cbreak tfoot td {
  border-bottom: 0;
  font-size: 0.6rem;
  color: #fde047;
  padding-top: 0.35rem;
}

.cu-disclaimer-panel {
  border: 1px solid rgba(234, 179, 8, 0.35);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.cu-article-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0 0;
}

.cu-article-list li {
  margin-bottom: 0.4rem;
}

.cu-article-list a {
  color: #262626;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.cu-article-list a:hover {
  color: #0a0a0a;
}

.cu-cbreak__total th,
.cu-cbreak__total td {
  font-weight: 800;
  font-size: 0.56rem;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  border-bottom: 0;
  padding-top: 0.45rem;
  padding-bottom: 0.1rem;
  vertical-align: middle;
}

.cu-cbreak__total th {
  text-align: left;
  color: rgba(255, 255, 255, 0.88);
}

.cu-cbreak__total td {
  text-align: right;
  color: #fde047;
  font-variant-numeric: tabular-nums;
}

.cu-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.cu-ctrl-block {
  flex-shrink: 0;
  width: 100%;
  margin: 0.15rem 0 0.35rem;
}

#cu-with-main-wrap:not(.cu-cbreak-row--hidden) {
  display: block;
}

.cu-cbreak-row--hidden {
  display: none !important;
}

#cu-calc-root .eicr-calc-landlord-key--full {
  white-space: normal;
  line-height: 1.3;
  min-width: 0;
  text-align: center;
}

#cu-calc-root .eicr-calc-actions {
  min-width: 0;
  flex-wrap: wrap;
}

#cu-calc-root .eicr-calc-actions__primary,
#cu-calc-root .eicr-calc-actions__secondary {
  min-width: 0;
}
