/* /back-pay. One narrow column on the site tokens in style.css
   (--card-bg, --card-border), so it follows the light/dark theme. */

/* Hero: the image URL arrives as --bp-hero-img from the page, which
   versions it (load_asset) and preloads the same URL. */
.hero-section.bg-back-pay {
  background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65)), var(--bp-hero-img) center 42%/cover no-repeat;
}

.bp-wrap {
  max-width: 620px;
}

.bp-intro {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text-color);
}

.bp-panel {
  --bp-accent: #146c43;
  --bp-accent-border: rgba(20, 108, 67, 0.35);
  --bp-accent-soft: rgba(25, 135, 84, 0.08);
  --bp-accent-soft-hover: rgba(25, 135, 84, 0.13);
  --bp-surface: rgba(0, 0, 0, 0.025);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--bp-accent);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}
[data-bs-theme="dark"] .bp-panel {
  --bp-accent: #6edba0;
  --bp-accent-border: rgba(110, 219, 160, 0.35);
  --bp-accent-soft: rgba(110, 219, 160, 0.09);
  --bp-accent-soft-hover: rgba(110, 219, 160, 0.15);
  --bp-surface: rgba(255, 255, 255, 0.035);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
@media (min-width: 768px) {
  .bp-panel { padding: 2rem; }
}

.bp-panel-head {
  padding-bottom: 0.85rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--card-border);
}

/* Form inputs: tighter label-to-input proximity and tabular currency figures */
#bp-form .form-label {
  margin-bottom: 0.3rem;
}
#bp-form .input-group-text {
  background: var(--bp-surface);
  color: var(--bs-secondary-color);
  font-weight: 600;
}
#bp-form .form-control {
  font-variant-numeric: tabular-nums;
}
#bp-form .form-text {
  margin-top: 0.25rem;
}

.bp-need {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px dashed var(--bs-border-color);
  text-align: center;
  color: var(--bs-secondary-color);
  background: var(--bp-surface);
  font-size: 0.95rem;
}

.bp-total {
  padding: 1.35rem 1.25rem;
  border: 1.5px solid var(--bp-accent-border);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bp-accent-soft) 0%, rgba(25, 135, 84, 0.02) 100%);
  text-align: center;
}
.bp-total-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-secondary-color);
}
.bp-total-num {
  font-size: clamp(2.35rem, 8vw, 3.1rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0.2rem 0 0.35rem;
  color: var(--bp-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.bp-total-new {
  font-weight: 600;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.bp-note {
  padding: 0.75rem 1rem;
  border-left: 4px solid #ffc107;
  border-radius: 8px;
  background: rgba(255, 193, 7, 0.12);
  font-size: 0.92rem;
}

/* Collapsible disclosures below the total: calculation first, take-home second */
.bp-folds {
  display: grid;
  gap: 0.6rem;
}
.bp-fold {
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bp-surface);
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.bp-fold:hover {
  border-color: var(--bp-accent-border);
}
.bp-fold[open] {
  background: var(--card-bg);
  border-color: var(--bp-accent-border);
}
.bp-fold summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease;
}
.bp-fold summary::-webkit-details-marker { display: none; }
.bp-fold summary:hover,
.bp-fold summary:focus-visible {
  background: var(--bp-accent-soft);
}
/* Inset so the fold's overflow: hidden doesn't clip it. */
.bp-fold summary:focus-visible {
  outline: 2px solid var(--bp-accent);
  outline-offset: -2px;
  border-radius: 11px;
}
.bp-fold-icon {
  color: var(--bp-accent);
  flex-shrink: 0;
}
.bp-fold .bp-chev {
  margin-left: auto;
  color: var(--bs-secondary-color);
  transition: transform 0.2s ease, color 0.15s ease;
}
.bp-fold summary:hover .bp-chev,
.bp-fold[open] .bp-chev {
  color: var(--bp-accent);
}
.bp-fold[open] .bp-chev {
  transform: rotate(180deg);
}
.bp-fold-body {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--card-border);
}

@media (prefers-reduced-motion: reduce) {
  .bp-fold,
  .bp-fold summary,
  .bp-fold .bp-chev {
    transition: none !important;
  }
}

/* The arithmetic tables inside disclosures: label left, figure right */
.bp-math {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.bp-math tbody th,
.bp-math tbody td {
  background: transparent;
  padding: 0.45rem 0;
  border-bottom-color: var(--card-border);
}
.bp-math th {
  font-weight: 400;
}
.bp-math td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bp-math .bp-sub > * {
  font-weight: 600;
}
.bp-math .bp-total-row > * {
  font-weight: 800;
  border-bottom: 0;
  border-top: 2px solid var(--bs-border-color);
  padding-top: 0.55rem;
}
.bp-math .bp-total-row td {
  color: var(--bp-accent);
}

/* How It Works notes */
.bp-how-list {
  padding-left: 1.15rem;
  color: var(--text-color);
}
.bp-how-list li::marker {
  color: var(--bs-secondary-color);
}
