/**
 * PBC Volume Pricing, Trust Signals, Payment Methods, and Sticky Cart Styles
 *
 * @package PBC_Core
 * @since 1.0.0
 */

/* ==========================================================================
   Volume Pricing Table
   ========================================================================== */

.pbc-volume-pricing {
  margin: 16px 0;
  padding: 16px;
  background-color: #F5F7FA;
  border: 1px solid #E6EAF0;
  border-radius: 8px;
}

.pbc-volume-pricing__title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: #0E1720;
  margin: 0 0 12px;
}

.pbc-volume-pricing__table {
  width: 100%;
  border-collapse: collapse;
}

.pbc-volume-pricing__table th,
.pbc-volume-pricing__table td {
  padding: 8px 12px;
  text-align: left;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  line-height: 20px;
  border-bottom: 1px solid #E6EAF0;
}

.pbc-volume-pricing__table th {
  font-weight: 600;
  color: #2B3642;
  background-color: transparent;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pbc-volume-pricing__table td {
  color: #2B3642;
}

.pbc-volume-pricing__table tr:last-child td {
  border-bottom: none;
}

.pbc-volume-pricing__row--best {
  background-color: rgba(7, 138, 148, 0.06);
}

.pbc-volume-pricing__row--best td {
  font-weight: 600;
}

.pbc-volume-pricing__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #078A94;
  background-color: rgba(7, 138, 148, 0.10);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Trust Signals
   ========================================================================== */

.pbc-trust-signals {
  margin: 20px 0 12px;
  padding: 16px;
  background-color: #F5F7FA;
  border: 1px solid #E6EAF0;
  border-radius: 8px;
}

.pbc-trust-signals__title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  color: #0E1720;
  margin: 0 0 8px;
}

.pbc-trust-signals__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pbc-trust-signals__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  line-height: 20px;
  color: #2B3642;
  padding: 3px 0;
}

.pbc-trust-signals__icon {
  flex-shrink: 0;
  color: #078A94;
}

/* ==========================================================================
   Payment Method Badges
   ========================================================================== */

.pbc-payment-methods {
  margin: 12px 0 0;
}

.pbc-payment-methods__title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  color: #C9D1DB;
  margin: 0 0 6px;
}

.pbc-payment-methods__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pbc-payment-methods__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: #2B3642;
  background-color: #FFFFFF;
  border: 1px solid #E6EAF0;
  border-radius: 4px;
  padding: 5px 10px;
  white-space: nowrap;
}

.pbc-payment-methods__badge--interac {
  color: #F7A600;
  border-color: #F7A600;
}

.pbc-payment-methods__badge--visa {
  color: #1A1F71;
  border-color: #1A1F71;
}

.pbc-payment-methods__badge--mc {
  color: #EB001B;
  border-color: #EB001B;
}

.pbc-payment-methods__badge--crypto {
  color: #078A94;
  border-color: #078A94;
}

/* ==========================================================================
   Sticky Add-to-Cart Bar
   ========================================================================== */

.pbc-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: #FFFFFF;
  border-top: 1px solid #E6EAF0;
  box-shadow: 0 -2px 8px rgba(14, 23, 32, 0.08);
  transform: translateY(100%);
  transition: transform 250ms ease-in-out;
  padding: 0;
}

.pbc-sticky-bar--visible {
  transform: translateY(0);
}

.pbc-sticky-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  gap: 16px;
}

.pbc-sticky-bar__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.pbc-sticky-bar__name {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: #0E1720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pbc-sticky-bar__price {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #0E1720;
  white-space: nowrap;
}

.pbc-sticky-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pbc-sticky-bar__qty-label {
  display: block;
}

.pbc-sticky-bar__qty {
  width: 56px;
  padding: 8px;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 13px;
  line-height: 18px;
  color: #2B3642;
  text-align: center;
  background-color: #FFFFFF;
  border: 1px solid #E6EAF0;
  border-radius: 8px;
  -moz-appearance: textfield;
}

.pbc-sticky-bar__qty::-webkit-inner-spin-button,
.pbc-sticky-bar__qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pbc-sticky-bar__qty:focus {
  border-color: #078A94;
  outline: 2px solid #078A94;
  outline-offset: 2px;
}

.pbc-sticky-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: #FFFFFF;
  background-color: #0B1F33;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 200ms ease-in-out;
}

.pbc-sticky-bar__btn:hover {
  background-color: #0d2740;
}

.pbc-sticky-bar__btn:focus-visible {
  outline: 2px solid #078A94;
  outline-offset: 2px;
}

/* Screen reader only utility */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */

@media (max-width: 768px) {
  .pbc-sticky-bar__inner {
    padding: 10px 16px;
  }

  /* Hide product name and qty on mobile — show price + button only */
  .pbc-sticky-bar__name,
  .pbc-sticky-bar__qty-label {
    display: none;
  }

  .pbc-sticky-bar__info {
    flex: 0;
  }

  .pbc-sticky-bar__price {
    font-size: 14px;
  }

  .pbc-sticky-bar__btn {
    flex: 1;
    padding: 12px 16px;
  }

  .pbc-volume-pricing__table th,
  .pbc-volume-pricing__table td {
    padding: 6px 8px;
    font-size: 12px;
  }
}
