:root {
  --ms-accent: #2fd07f;
  --ms-black: #1a1a1a;
  --ms-dark: #4f4f4f;
  --ms-smoke: #f5f3f0;
  --ms-gold: #ffd00f;
  --ms-radius: 14px;
}

.msbd-pricing-accelerator,
.msbd-pricing-accelerator * {
  box-sizing: border-box;
}

.dynamic-pricing-table.msbd-pricing-display-hidden {
  display: none !important;
}

.msbd-pricing-accelerator {
  width: 100%;
  margin: 20px 0;
  border: 1px solid #e5e2dc;
  border-radius: var(--ms-radius);
  background: #fff;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ms-dark);
}

.msbd-pa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 20px;
  background: var(--ms-black);
}

.msbd-pa-header-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
}

.msbd-pa-header-spacer {
  flex: 1 1 auto;
}

.msbd-pa-savings-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--ms-accent);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.msbd-pa-savings-badge.visible {
  opacity: 1;
}

.msbd-pa-tiers {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 14px 10px;
}

.msbd-pa-tier {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 10px;
  background: var(--ms-smoke);
  color: inherit;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.msbd-pa-tier:hover,
.msbd-pa-tier:focus-visible {
  background: #efebe5;
  transform: translateY(-1px);
  outline: none;
}

.msbd-pa-tier.active {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--ms-accent);
}

.msbd-pa-tier-qty {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ms-black);
}

.msbd-pa-tier-price {
  flex-shrink: 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ms-black);
  transition: color 0.18s ease;
}

.msbd-pa-tier.active .msbd-pa-tier-price {
  color: var(--ms-accent);
}

.msbd-pa-tier-save {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgb(46, 208, 127);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.msbd-pa-nudge {
  display: none;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-top: 1px solid #30d07f;
  border-right: 5px solid #30d07f;
  border-bottom: 1px solid #30d07f;
  border-left: 5px solid #30d07f;
  border-radius: 10px;
  background: #fafcf7;
}

.msbd-pa-nudge.visible {
  display: flex;
}

.msbd-pa-nudge-icon {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 40px;
}

.msbd-pa-nudge-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ms-black);
  line-height: 40px;
}

.msbd-pa-nudge-btn {
  flex-shrink: 0;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: #30d07f;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.msbd-pa-nudge-btn:hover,
.msbd-pa-nudge-btn:focus-visible {
  background: #26bc6d;
  transform: translateY(-1px);
  outline: none;
}

.msbd-pa-footer {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border-top: 1px solid #d3d3d3;
  background: var(--ms-smoke);
}

.msbd-pa-footer.visible {
  display: flex;
}

.msbd-pa-footer-label {
  font-size: 12px;
  font-weight: 400;
  color: #888;
}

.msbd-pa-footer-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--ms-accent);
  white-space: nowrap;
}

.price.product-page-price,
.price-wrapper .price.product-page-price .woocommerce-Price-amount bdi {
  transform-origin: center;
  transition: transform 0.18s ease;
  will-change: transform;
}

.price-wrapper .price.product-page-price .woocommerce-Price-amount bdi {
  display: inline-block;
}

.msbd-price-flash {
  animation: msbd-price-flash 0.32s ease;
}

@keyframes msbd-price-flash {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

@media (max-width: 767px) {
  .msbd-pricing-accelerator {
    max-width: none;
    margin: 12px 0;
  }

  .msbd-pa-header {
    min-height: 44px;
    padding: 0 14px;
  }

  .msbd-pa-header-title,
  .msbd-pa-savings-badge {
    font-size: 11px;
    letter-spacing: 1.1px;
  }

  .msbd-pa-tiers {
    gap: 6px;
    padding: 12px 10px 8px;
  }

  .msbd-pa-tier,
  .msbd-pa-nudge {
    min-height: 36px;
    padding: 0 12px;
  }

  .msbd-pa-tier {
    gap: 8px;
  }

  .msbd-pa-tier-qty,
  .msbd-pa-nudge-text {
    font-size: 12px;
  }

  .msbd-pa-tier-price {
    font-size: 16px;
  }

  .msbd-pa-tier-save,
  .msbd-pa-nudge-btn {
    font-size: 9px;
  }

  .msbd-pa-footer {
    min-height: 42px;
    padding: 0 14px;
  }

  .msbd-pa-footer-label {
    font-size: 11px;
  }

  .msbd-pa-footer-amount {
    font-size: 14px;
  }
}
