.wcbp-line-total-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.25rem 1rem;
  width: 100%;
  margin: 0.45rem 0 1.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid #edc9b9;
  border-radius: 14px;
  color: #101a38;
  background: linear-gradient(135deg, #fffaf5 0%, #fff3e9 100%);
  box-shadow: 0 10px 24px rgba(93, 39, 28, 0.08);
  box-sizing: border-box;
}

.wcbp-line-total-price__label {
  align-self: center;
  color: #5f6575;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.3;
  text-transform: uppercase;
}

.wcbp-line-total-price__amount {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.45rem;
  min-width: 0;
  color: #d83a20;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-align: right;
}

.wcbp-line-total-price__amount .woocommerce-price-suffix {
  color: #5f6575;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.3;
}

.wcbp-line-total-price__detail {
  grid-column: 1 / -1;
  color: #5f6575;
  font-size: 0.84rem;
  line-height: 1.45;
}

.wcbp-line-total-price__detail .woocommerce-Price-amount {
  color: #29344c;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.wcbp-line-total-price .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.wcbp-line-total-price.is-loading .wcbp-line-total-price__amount {
  opacity: 0.72;
}

.wcbp-line-total-price.is-error {
  border-color: #efbeb8;
  background: #fff3f2;
}

.wcbp-line-total-price.is-error .wcbp-line-total-price__amount {
  color: #9d2a20;
  font-size: 0.95rem;
  letter-spacing: 0;
}

body.single-product.wcbp-line-total-product .summary.wcbp-line-total-ready > p.price,
body.single-product.wcbp-line-total-product .summary.wcbp-line-total-ready .woocommerce-variation-price {
  display: none !important;
}

body.single-product.wcbp-line-total-product .summary.wcbp-line-total-ready .wapf-product-totals {
  display: none !important;
}

.wcbp-price-table-wrap {
  --wcbp-ink: #172033;
  --wcbp-muted: #647087;
  --wcbp-line: #dbe2ec;
  --wcbp-soft-line: #edf1f6;
  --wcbp-panel: #ffffff;
  --wcbp-head: #f4f7fb;
  --wcbp-accent: #2458c6;
  --wcbp-accent-dark: #173e96;
  --wcbp-accent-soft: #edf3ff;
  --wcbp-success: #08783e;
  --wcbp-warning: #8a4b00;
  --wcbp-danger: #a5271c;
  clear: both;
  width: 100%;
  margin: 1.4rem 0;
  color: var(--wcbp-ink);
  font-size: 0.95rem;
}

.wcbp-price-table-wrap,
.wcbp-price-table-wrap * {
  box-sizing: border-box;
}

.wcbp-price-table-block {
  width: 100%;
  border: 1px solid var(--wcbp-line);
  border-radius: 15px;
  background: var(--wcbp-panel);
  box-shadow: 0 8px 24px rgba(20, 36, 68, 0.07);
  overflow: hidden;
}

.wcbp-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem 0.9rem;
  border-bottom: 1px solid var(--wcbp-soft-line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.wcbp-title {
  margin: 0;
  color: var(--wcbp-ink);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.wcbp-scroll-top {
  width: calc(100% - 1.6rem);
  height: 17px;
  margin: 0.55rem 0.8rem 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #d4dce8;
  border-radius: 8px;
  background: #f5f7fb;
  scrollbar-color: #8092ae #e8edf4;
  scrollbar-width: auto;
  touch-action: pan-x;
  overscroll-behavior-inline: contain;
}

.wcbp-scroll-top[hidden] {
  display: none;
}

.wcbp-scroll-top-inner {
  height: 1px;
  min-width: 100%;
}

.wcbp-scroll-top::-webkit-scrollbar,
.wcbp-table-responsive::-webkit-scrollbar {
  height: 11px;
}

.wcbp-scroll-top::-webkit-scrollbar-track,
.wcbp-table-responsive::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e8edf4;
}

.wcbp-scroll-top::-webkit-scrollbar-thumb,
.wcbp-table-responsive::-webkit-scrollbar-thumb {
  border: 2px solid #e8edf4;
  border-radius: 999px;
  background: #8092ae;
}

.wcbp-scroll-top::-webkit-scrollbar-thumb:hover,
.wcbp-table-responsive::-webkit-scrollbar-thumb:hover {
  background: #657894;
}

.wcbp-table-responsive {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #8092ae #e8edf4;
  scrollbar-width: auto;
}

.wcbp-table-responsive:focus-visible {
  outline: 3px solid rgba(36, 88, 198, 0.25);
  outline-offset: -3px;
}

.wcbp-price-table {
  width: 100%;
  min-width: 560px;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  color: var(--wcbp-ink);
  background: #fff;
  font-variant-numeric: tabular-nums;
}

.wcbp-price-table th,
.wcbp-price-table td {
  padding: 0.85rem 0.95rem;
  border: 0;
  border-bottom: 1px solid var(--wcbp-soft-line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.wcbp-price-table thead th {
  position: relative;
  z-index: 1;
  color: #2d3b53;
  background: var(--wcbp-head);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.012em;
}

.wcbp-price-table thead th:first-child {
  position: sticky;
  z-index: 5;
  left: 0;
  min-width: 142px;
  box-shadow: 5px 0 9px -8px rgba(20, 36, 68, 0.65);
}

.wcbp-price-table tbody th {
  position: sticky;
  z-index: 3;
  left: 0;
  min-width: 142px;
  color: var(--wcbp-accent-dark);
  background: #fff;
  font-weight: 750;
  box-shadow: 5px 0 9px -8px rgba(20, 36, 68, 0.65);
}

.wcbp-price-table tbody tr:last-child th,
.wcbp-price-table tbody tr:last-child td {
  border-bottom: 0;
}

.wcbp-column-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.wcbp-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  margin: 0;
  padding: 0;
  border: 1px solid #94a5bd;
  border-radius: 50%;
  color: #35547f;
  background: #fff;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  cursor: help;
  box-shadow: none;
}

.wcbp-help:hover,
.wcbp-help:focus-visible,
.wcbp-help[aria-expanded="true"] {
  border-color: var(--wcbp-accent);
  color: #fff;
  background: var(--wcbp-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(36, 88, 198, 0.16);
}

.wcbp-tier-row {
  cursor: pointer;
  outline: none;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.wcbp-tier-row th,
.wcbp-tier-row td {
  background: #fff;
  transition: background 140ms ease;
}

.wcbp-tier-row:hover th,
.wcbp-tier-row:hover td,
.wcbp-tier-row:focus-visible th,
.wcbp-tier-row:focus-visible td {
  background: #f7f9fd;
}

.wcbp-tier-row:focus-visible {
  box-shadow: inset 0 0 0 2px var(--wcbp-accent);
}

.wcbp-tier-row.is-selected th,
.wcbp-tier-row.is-selected td {
  background: var(--wcbp-accent-soft);
}

.wcbp-tier-row.is-selected th:first-child {
  box-shadow: inset 4px 0 0 var(--wcbp-accent), 5px 0 9px -8px rgba(20, 36, 68, 0.65);
}

.wcbp-tier-row.is-unavailable {
  cursor: not-allowed;
  opacity: 0.56;
}

.wcbp-tier-row.is-unavailable:hover th,
.wcbp-tier-row.is-unavailable:hover td {
  background: #fff;
}

.wcbp-quantity-value {
  display: block;
  color: var(--wcbp-accent-dark);
  font-size: 1rem;
  font-weight: 800;
}

.wcbp-price-table tbody th small {
  display: block;
  margin-top: 0.15rem;
  color: var(--wcbp-muted);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.wcbp-price-table tbody td strong {
  color: #152b56;
  font-weight: 800;
}

.wcbp-notes {
  margin: 0;
  padding: 0.85rem 1.1rem 0.9rem 2.15rem;
  border-top: 1px solid var(--wcbp-soft-line);
  color: var(--wcbp-muted);
  background: #fbfcfe;
  font-size: 0.86rem;
  line-height: 1.5;
}

.wcbp-notes li + li {
  margin-top: 0.25rem;
}

.wcbp-availability-note {
  margin: 0;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid #efd4ad;
  color: var(--wcbp-warning);
  background: #fff8ec;
  font-size: 0.84rem;
  line-height: 1.45;
}

.wcbp-variable-status {
  padding: 0.9rem 1rem;
  border: 1px solid var(--wcbp-line);
  border-radius: 10px;
  color: var(--wcbp-muted);
  background: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.45;
}

.wcbp-variable-status.is-loading {
  color: #294b87;
  border-color: #c9d7ee;
  background: #f2f6fd;
}

.wcbp-variable-status.is-error {
  color: var(--wcbp-danger);
  border-color: #efbeb8;
  background: #fff3f2;
}

.wcbp-variable-status.is-empty {
  color: #59667b;
}

.wcbp-variable-table-content:not(:empty) {
  margin-top: 0;
}

.wcbp-tooltip-popover {
  position: fixed;
  z-index: 100000;
  width: min(260px, calc(100vw - 20px));
  padding: 0.68rem 0.76rem;
  border-radius: 8px;
  color: #fff;
  background: #17233a;
  box-shadow: 0 12px 28px rgba(9, 20, 40, 0.26);
  font-size: 0.78rem;
  font-weight: 550;
  line-height: 1.45;
  pointer-events: none;
}

.wcbp-tooltip-popover::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #17233a;
  transform: translateX(-50%) rotate(45deg);
}

.wcbp-tooltip-popover.is-above::before {
  top: auto;
  bottom: -5px;
}

.wcbp-price-table-wrap .screen-reader-text,
.wcbp-tooltip-popover[hidden] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.wcbp-tooltip-popover[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .wcbp-price-table-wrap {
    margin: 1.1rem 0;
    font-size: 0.91rem;
  }

  .wcbp-price-table-block {
    border-radius: 12px;
  }

  .wcbp-table-heading {
    padding: 0.9rem 0.85rem 0.8rem;
  }

  .wcbp-scroll-top {
    width: calc(100% - 1rem);
    margin-right: 0.5rem;
    margin-left: 0.5rem;
  }

  .wcbp-price-table {
    min-width: 520px;
  }

  .wcbp-price-table th,
  .wcbp-price-table td {
    padding: 0.78rem 0.8rem;
  }

  .wcbp-price-table thead th:first-child,
  .wcbp-price-table tbody th {
    min-width: 128px;
  }
}

@media (max-width: 560px) {
  .wcbp-line-total-price {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0.35rem;
    padding: 0.85rem 0.9rem;
  }

  .wcbp-line-total-price__amount {
    justify-content: flex-start;
    flex-wrap: wrap;
    text-align: left;
  }
}

@media (max-width: 420px) {

  .wcbp-price-table {
    min-width: 500px;
  }

  .wcbp-title {
    font-size: 1.02rem;
  }

  .wcbp-scroll-top {
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wcbp-price-table-wrap *,
  .wcbp-price-table-wrap *::before,
  .wcbp-price-table-wrap *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
