/**
 * BW PM Client — Inventory Tool (Phase 13)
 * Shortcode: [bw_inventory_tool]
 */

/* Palette, font stack, button reset, and :focus-visible live in pmc-theme.css. */

.bwit-root {
  box-sizing: border-box;
}
.bwit-root *, .bwit-root *::before, .bwit-root *::after { box-sizing: inherit; }

/* ── Toolbar ────────────────────────────────────────────── */

.bwit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bwit-bg);
  border: 1px solid var(--bwit-border);
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 12px;
}

.bwit-toggle-group {
  display: inline-flex;
  border: 1px solid var(--bwit-border);
  overflow: hidden;
}

.bwit-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bwit-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-width: 46px;
}
.bwit-toggle:hover:not(.active) { background: var(--bwit-bg-alt); color: var(--bwit-text); }
.bwit-toggle.active {
  background: var(--bwit-text);
  color: #fff;
}

/* ── Filter bar ─────────────────────────────────────────── */

.bwit-filter-bar {
  background: var(--bwit-bg);
  border: 1px solid var(--bwit-border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bwit-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.bwit-facet-row { gap: 24px; }

.bwit-facet {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bwit-facet > label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bwit-text-muted);
}

.bwit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bwit-chip {
  appearance: none;
  border: 1px solid var(--bwit-border);
  background: var(--bwit-bg);
  color: var(--bwit-text);
  padding: 4px 12px;
  border-radius: 999px !important;  /* pill — override the button reset above */
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.bwit-chip:hover {
  background: var(--bwit-bg-alt);
  border-color: var(--bwit-border-dark);
  color: var(--bwit-border-dark);
}
.bwit-chip.active {
  background: var(--bwit-text);
  border-color: var(--bwit-text);
  color: #fff;
}

/* ── Price slider (dual range) ──────────────────────────── */

.bwit-facet-price {
  flex: 1 1 320px;
  min-width: 260px;
}

.bwit-price-slider {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.bwit-price-track {
  position: relative;
  height: 4px;
  background: var(--bwit-border);
  border-radius: 2px;
  margin: 10px 8px;
}

.bwit-price-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--bwit-text);
  border-radius: 2px;
  pointer-events: none;
}

/* Two overlapping range inputs stacked on top of the same track */
.bwit-price-track .bwit-range {
  position: absolute;
  top: 50%;
  left: -8px;
  right: -8px;
  width: calc(100% + 16px);
  height: 24px;
  margin: 0;
  transform: translateY(-50%);
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.bwit-price-track .bwit-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bwit-text);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.bwit-price-track .bwit-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--bwit-text);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.bwit-price-track .bwit-range::-webkit-slider-runnable-track {
  background: transparent;
  border: 0;
}
.bwit-price-track .bwit-range::-moz-range-track {
  background: transparent;
  border: 0;
}

.bwit-price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--bwit-text);
  padding: 0 4px;
}

/* ── Filter actions row ─────────────────────────────────── */

.bwit-filter-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bwit-result-count {
  font-size: 12px;
  color: var(--bwit-text-muted);
  font-weight: 500;
}

.bwit-clear-filters {
  appearance: none;
  background: transparent;
  border: 1px solid var(--bwit-border);
  color: var(--bwit-text-muted);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.bwit-clear-filters:hover,
.bwit-clear-filters:focus {
  color: var(--bwit-border-dark) !important;
  border-color: var(--bwit-border-dark);
  background: var(--bwit-bg-alt);
}

/* ── Table ──────────────────────────────────────────────── */

.bwit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--bwit-border);
  border-radius: 8px;
  background: var(--bwit-bg);
}

.bwit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 900px;
}

.bwit-table thead th {
  background: var(--bwit-bg-alt);
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bwit-text-muted);
  border-bottom: 2px solid var(--bwit-border-dark);
  white-space: nowrap;
  position: relative;
}

.bwit-table thead th[data-sort-col] {
  cursor: pointer;
  user-select: none;
  padding-right: 18px;  /* room for sort arrow */
}
.bwit-table thead th[data-sort-col]:hover {
  color: var(--bwit-text);
}
.bwit-table thead th[data-sort-col]::after {
  content: '↕';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.25;
  font-size: 10px;
}
.bwit-table thead th.bwit-sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--bwit-text);
}
.bwit-table thead th.bwit-sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--bwit-text);
}

/* Plan column headers: name on top, structure below (matches PDF layout) */
.bwit-table thead th.bwit-col-plan {
  line-height: 1.2;
  padding-top: 6px;
  padding-bottom: 6px;
}
.bwit-plan-name {
  display: block;
  font-weight: 700;
  color: var(--bwit-text);
  font-size: 11px;
}
.bwit-plan-struct {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--bwit-text);
  letter-spacing: 0;
  text-transform: none;
  margin-top: 2px;
}

.bwit-table tbody td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--bwit-border);
  vertical-align: middle;
}

.bwit-table tbody tr:hover {
  background: var(--bwit-bg-alt);
}

.bwit-cell-sel input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--bwit-text);
}
.bwit-cell-sel input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.bwit-row.bwit-row-selected {
  background: rgba(54, 175, 98, 0.08);
}
.bwit-row.bwit-row-selected:hover {
  background: rgba(54, 175, 98, 0.14);
}

.bwit-cell-unit    { font-weight: 700; }
.bwit-unit-link {
  color: var(--bwit-text);
  text-decoration: none;
  transition: color 0.15s;
}
.bwit-unit-link:hover {
  color: var(--bwit-accent);
  text-decoration: underline;
}
.bwit-cell-type    { font-weight: 600; color: var(--bwit-text-muted); }
.bwit-cell-area    { text-align: right; white-space: nowrap; }
.bwit-cell-price   { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bwit-price-blank  { color: var(--bwit-text-muted); }
.bwit-cell-status  { text-align: center; }

.bwit-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.bwit-status-available .bwit-badge,
.bwit-badge.bwit-status-available   { background: var(--bwit-accent); }
.bwit-status-sold .bwit-badge,
.bwit-badge.bwit-status-sold        { background: var(--bwit-sold); }
.bwit-status-reserved .bwit-badge,
.bwit-badge.bwit-status-reserved    { background: var(--bwit-reserved); color: #1a1a1a; }

/* Subtle row tint based on status */
.bwit-row.bwit-status-sold     td:not(.bwit-cell-sel):not(.bwit-cell-status) { opacity: 0.55; }
.bwit-row.bwit-status-reserved td:not(.bwit-cell-sel):not(.bwit-cell-status) { opacity: 0.75; }

/* ── States ─────────────────────────────────────────────── */

.bwit-loading,
.bwit-empty,
.bwit-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--bwit-text-muted);
  font-style: italic;
}
.bwit-error { color: var(--bwit-sold); }

.bwit-footer-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--bwit-text-muted);
  text-align: right;
}

/* ── Selection bar (fixed bottom) ───────────────────────── */

.bwit-selection-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #1a1a1a;
  color: #fff;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.18);
  animation: bwit-slide-up 0.2s ease-out;
}

/* Inner wrapper constrained to the inventory tool's width. The width
   + left offset are set by JS (updateSelectionBarWidth) so the info
   and actions line up with the table edges on wide monitors instead
   of sticking to the viewport edges. */
.bwit-sel-wrap {
  max-width: var(--bwit-sel-max-w, 1400px);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@keyframes bwit-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.bwit-sel-info {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
}
.bwit-sel-count {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.bwit-sel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.bwit-sel-clear {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff !important;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.bwit-sel-clear:hover,
.bwit-sel-clear:focus {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff !important;
}
.bwit-sel-build {
  appearance: none;
  background: var(--bwit-accent) !important;
  border: 0;
  color: #fff !important;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.bwit-sel-build:hover,
.bwit-sel-build:focus {
  background: var(--bwit-accent) !important;
  color: #fff !important;
  filter: brightness(1.08);
}

/* Extra bottom padding on the root when the selection bar is visible
   so the last table row isn't hidden behind the bar */
.bwit-root.bwit-has-selection { padding-bottom: 90px; }

/* ── Quote overlay ─────────────────────────────────────── */

.bwit-quote-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.85);
  overflow-y: auto;
  padding: 40px 20px;
  animation: bwit-fade-in 0.2s ease-out;
}
@keyframes bwit-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bwit-quote-inner {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  padding: 36px 44px 28px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  color: var(--bwit-text);
}

.bwit-quote-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--bwit-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.bwit-quote-close:hover {
  background: var(--bwit-bg-alt);
  color: var(--bwit-text);
}

.bwit-quote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--bwit-border-dark);
}
.bwit-quote-logos {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.bwit-quote-logos img {
  max-height: 52px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.bwit-quote-title {
  text-align: right;
  font-size: 13px;
  color: var(--bwit-text-muted);
  line-height: 1.4;
}
.bwit-quote-title strong {
  display: block;
  font-size: 18px;
  color: var(--bwit-text);
  margin-bottom: 2px;
}

.bwit-quote-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 20px;
}
.bwit-quote-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bwit-text-muted);
  padding: 10px 8px;
  border-bottom: 2px solid var(--bwit-border-dark);
}
.bwit-quote-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--bwit-border);
  vertical-align: middle;
}
.bwit-quote-table .bwit-qt-num  { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bwit-quote-table .bwit-qt-unit { font-weight: 700; }

/* Unit row (main info) — slightly stronger bottom border so the following
   schedule sub-row visually attaches to it */
.bwit-quote-table .bwit-qt-unit-row td {
  border-bottom: 1px solid var(--bwit-border-dark);
}
/* Payment schedule sub-row */
.bwit-quote-table .bwit-qt-schedule-row > td {
  padding: 0 8px 16px;
  background: var(--bwit-bg-alt);
}
.bwit-schedule {
  padding: 12px 14px 10px;
  border: 1px solid var(--bwit-border);
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #fff;
  margin-bottom: 2px;
}
.bwit-schedule-unavailable {
  font-size: 11px;
  color: var(--bwit-text-muted);
  font-style: italic;
  text-align: center;
  padding: 12px;
}
.bwit-schedule-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bwit-border);
}
.bwit-schedule-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bwit-text);
}
.bwit-schedule-plan {
  font-size: 11px;
  font-weight: 500;
  color: var(--bwit-text-muted);
}
.bwit-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.bwit-schedule-table th {
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bwit-text-muted);
  padding: 4px 6px;
  border-bottom: 1px solid var(--bwit-border);
}
.bwit-schedule-table td {
  padding: 5px 6px;
  border: 0;
}
.bwit-schedule-table tr.bwit-schedule-kind-down td,
.bwit-schedule-table tr.bwit-schedule-kind-final td,
.bwit-schedule-table tr.bwit-schedule-kind-full td {
  font-weight: 700;
}
.bwit-schedule-table tr.bwit-schedule-kind-installment td {
  color: var(--bwit-text-muted);
}
.bwit-schedule-table .bwit-schedule-idx {
  font-variant-numeric: tabular-nums;
  color: var(--bwit-text-muted);
  width: 24px;
  font-weight: 500 !important;
}
.bwit-schedule-footnote {
  font-size: 9px;
  color: var(--bwit-text-muted);
  font-style: italic;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed var(--bwit-border);
}

.bwit-qt-plan-picker {
  appearance: none;
  border: 1px solid var(--bwit-border);
  background: var(--bwit-bg);
  padding: 5px 24px 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bwit-text);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236b6b6b' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.bwit-quote-disclaimer {
  font-size: 11px;
  color: var(--bwit-text-muted);
  line-height: 1.5;
  padding: 14px 0 10px;
  border-top: 1px solid var(--bwit-border);
}
.bwit-quote-contact {
  font-size: 11px;
  color: var(--bwit-text-muted);
  line-height: 1.4;
  padding-top: 6px;
}

.bwit-quote-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  margin-top: 10px;
  border-top: 1px solid var(--bwit-border);
}
.bwit-quote-actions button {
  appearance: none;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: filter 0.15s, background 0.15s;
}
.bwit-quote-download {
  background: var(--bwit-accent) !important;
  border: 0;
  color: #fff !important;
}
.bwit-quote-download:hover,
.bwit-quote-download:focus {
  background: var(--bwit-accent) !important;
  color: #fff !important;
  filter: brightness(1.08);
}
.bwit-quote-download[disabled] {
  background: var(--bwit-text-muted) !important;
  cursor: not-allowed;
}

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 768px) {
  .bwit-toolbar {
    gap: 8px;
    padding: 8px;
  }
  .bwit-toggle {
    padding: 5px 10px;
    font-size: 12px;
    min-width: 40px;
  }
  .bwit-filter-bar {
    padding: 10px 12px;
    gap: 10px;
  }
  .bwit-facet-row { gap: 12px; }
  .bwit-facet > label { font-size: 9px; }
  .bwit-chip { font-size: 11px; padding: 3px 10px; }
  .bwit-facet-price { flex: 1 1 100%; min-width: 0; }
  .bwit-filter-actions { margin-left: 0; width: 100%; justify-content: space-between; }
  .bwit-table {
    font-size: 12px;
  }
  .bwit-table thead th { padding: 8px 6px; font-size: 10px; }
  .bwit-table tbody td { padding: 7px 6px; }

  .bwit-sel-wrap {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .bwit-sel-info { gap: 12px; }
  .bwit-sel-build { padding: 8px 16px; }

  /* ── Quote overlay on mobile ────────────────────────── */

  .bwit-quote-overlay {
    padding: 12px 8px;
  }
  .bwit-quote-inner {
    padding: 16px 14px;
    max-width: 100%;
    width: 100%;
  }
  .bwit-quote-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }
  .bwit-quote-title { text-align: left; }
  .bwit-quote-logos { gap: 14px; flex-wrap: wrap; }
  .bwit-quote-logos img { max-height: 36px; max-width: 110px; }

  /* Pivot the 9-column unit table to a card layout. The 375px-ish
     viewport can't fit the desktop grid without ugly horizontal
     scroll, so on mobile each td becomes a label+value row and
     each unit's cells stack into a single card. */
  .bwit-quote-table,
  .bwit-quote-table tbody,
  .bwit-quote-table tr,
  .bwit-quote-table td {
    display: block;
    width: auto;
  }
  .bwit-quote-table thead {
    display: none;
  }

  .bwit-quote-table .bwit-qt-unit-row {
    background: var(--bwit-bg-alt);
    border: 1px solid var(--bwit-border);
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 0;
  }
  .bwit-quote-table .bwit-qt-unit-row td {
    padding: 5px 0;
    border: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
  .bwit-quote-table .bwit-qt-unit-row td[data-label]::before {
    content: attr(data-label);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bwit-text-muted);
    flex-shrink: 0;
    min-width: 76px;
  }

  /* Unit number cell: big and bold, full row, no label prefix */
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-unit {
    display: block;
    font-size: 20px;
    font-weight: 800;
    padding: 0 0 6px;
    margin-bottom: 6px;
    border-bottom: 2px solid var(--bwit-border-dark);
  }
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-unit::before { display: none; }

  /* Price cell: prominent and right-aligned */
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-price {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--bwit-border);
    font-size: 16px;
    font-weight: 800;
  }
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-price::before {
    font-size: 10px;
    min-width: 0;
  }

  /* Plan picker: label on top, picker full-width below */
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-plan {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-plan::before {
    min-width: 0;
  }
  .bwit-quote-table .bwit-qt-unit-row .bwit-qt-plan .bwit-qt-plan-picker {
    width: 100%;
    padding: 8px 28px 8px 12px;
    font-size: 13px;
  }

  /* Schedule sub-row: unwrap the colspan td, let the schedule card
     flow at full width under the unit card */
  .bwit-quote-table .bwit-qt-schedule-row {
    display: block;
    margin-bottom: 14px;
  }
  .bwit-quote-table .bwit-qt-schedule-row > td {
    padding: 0;
    background: transparent;
  }
  .bwit-schedule {
    padding: 10px 12px 8px;
    border-radius: 0 0 6px 6px;
  }
  .bwit-schedule-header {
    gap: 6px;
    flex-wrap: wrap;
  }
  .bwit-schedule-table {
    font-size: 10px;
  }
  .bwit-schedule-table th,
  .bwit-schedule-table td {
    padding: 4px 4px;
  }
  /* Amount column gets priority — hide the % column on narrow screens */
  .bwit-schedule-table th:nth-child(4),
  .bwit-schedule-table td:nth-child(4) {
    display: none;
  }
}

/* ── Accessibility: respect reduced motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
  .bwit-root *,
  .bwit-root *::before,
  .bwit-root *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
