/**
 * PBC Discount Callout, First Order Banner, Volume Nudge, Volume Tier Active
 *
 * Styles for mobile CRO improvements: discount callout bar (P1-4),
 * volume tier highlighting (P1-6), first order inline banner (P1-7),
 * and volume nudge (P2-8).
 *
 * @package PBC_Core
 * @since 1.3.0
 */

/* ==========================================================================
   P1-4: Discount Callout Bar
   ========================================================================== */

.pbc-discount-callout {
  margin: 0 0 12px;
  border-radius: 4px;
  overflow: hidden;
}

.pbc-discount-callout:empty {
  display: none;
}

.pbc-discount-callout__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

.pbc-discount-callout--first-order .pbc-discount-callout__inner {
  background: linear-gradient(135deg, #ecfeff, #cffafe);
  border: 1px solid #67e8f9;
  color: #0e7490;
}

.pbc-discount-callout--backorder .pbc-discount-callout__inner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid #f59e0b;
  color: #92400e;
}

.pbc-discount-callout--volume .pbc-discount-callout__inner {
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #86efac;
  color: #166534;
}

.pbc-discount-callout__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

@keyframes pbc-callout-fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pbc-discount-callout--animate {
  animation: pbc-callout-fade 250ms ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .pbc-discount-callout--animate {
    animation: none;
  }
}

/* ==========================================================================
   P1-7: First Order Inline Banner
   ========================================================================== */

.pbc-first-order-banner {
  margin: 0 0 16px;
  border-radius: 8px;
  overflow: hidden;
}

.pbc-first-order-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #ecfeff, #cffafe);
  border: 1px solid #67e8f9;
  border-radius: 8px;
}

.pbc-first-order-banner__content {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pbc-first-order-banner__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #078A94;
  padding: 4px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.pbc-first-order-banner__text {
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  color: #0e7490;
}

.pbc-first-order-banner__dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: rgba(14, 116, 144, 0.1);
  border: none;
  border-radius: 50%;
  color: #0e7490;
  cursor: pointer;
  padding: 0;
}

.pbc-first-order-banner__dismiss:hover {
  background: rgba(14, 116, 144, 0.2);
}

.pbc-first-order-banner--dismissing {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: opacity 200ms ease, max-height 300ms ease 100ms, margin 300ms ease 100ms;
}

/* ==========================================================================
   P2-8: Volume Nudge
   ========================================================================== */

.pbc-volume-nudge {
  margin: 16px 0 4px;
  padding: 6px 10px;
  background: #F5F7FA;
  border: 1px dashed #C9D1DB;
  border-radius: 4px;
  font-size: 12px;
  line-height: 18px;
  color: #2B3642;
  text-align: center;
}

.pbc-volume-nudge strong {
  color: #078A94;
  font-weight: 700;
}

/* ==========================================================================
   P1-6: Volume Tier Active Highlighting
   ========================================================================== */

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

.pbc-volume-pricing__row--active td {
  font-weight: 600;
  color: #0E1720;
}

.pbc-volume-pricing__table tr {
  transition: background-color 200ms ease;
}

.pbc-volume-pricing__your-price {
  display: none;
  font-size: 10px;
  font-weight: 700;
  color: #078A94;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.pbc-volume-pricing__row--active .pbc-volume-pricing__your-price {
  display: block;
}

.pbc-volume-pricing__row--active .pbc-volume-pricing__unit-price {
  font-weight: 700;
  color: #078A94;
}
