/* Leave the page header and footer to the WordPress theme/Elementor. */
html {
  /* The surrounding WordPress page owns scrolling. Explicit navigation
     buttons still request smooth scrolling themselves. */
  scroll-behavior: auto;
  scroll-padding-top: 0;
}

body {
  min-height: 0;
  display: flow-root;
}

.layout {
  margin-top: 0 !important;
}

/* Preserve the results' footprint while replacing their values. */
.results[data-calculation-state] > :not(.results-head) {
  opacity: .5;
}

.results[data-calculation-state] .results-lead {
  color: var(--pop-navy);
  font-weight: 600;
}

.live-result.has-previous-values {
  position: relative;
}

.live-result.has-previous-values #live-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 16px;
  border-radius: inherit;
  background: rgba(245, 249, 252, .95);
  color: var(--pop-navy);
  text-align: center;
}

.live-result.has-previous-values #live-status[hidden] {
  display: none;
}

/* Focus the invisible checkbox at the position of its visible series chip. */
.advanced-body .series-chips label {
  position: relative;
}

.advanced-body .series-chips input {
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  clip-path: inset(50%);
}

/* Enclose the whole breakdown, including its first and last cells. */
.winner-breakdown-items {
  border: 1px solid var(--pop-border);
}

/* Keep editable fields consistent, including their currency/percent suffixes. */
.money-input,
.custom-date input,
.family-count input,
.family-date-field input,
.annual-rate {
  background: #F5F9FC;
}

/* Use the same stacked label and control layout for both assumptions. */
.advanced-basic-settings > .custom-date,
.advanced-basic-settings > .field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.advanced-basic-settings > label > span:first-child {
  margin: 0;
}

.advanced-basic-settings .custom-date input,
.advanced-basic-settings .money-input {
  width: 100%;
  min-height: 44px;
}

.advanced-basic-settings .custom-date input {
  padding: 9px 11px;
}

.advanced-basic-settings .money-input input {
  align-self: stretch;
  min-height: 42px;
}

@media (max-width: 760px) {
  .winner-breakdown-items p:nth-child(even) {
    border-right: 0;
  }

  .winner-breakdown-items p:last-child {
    border-bottom: 0;
  }
}
