/* ═══════════════════════════════════════════════════════
   Woo Advanced Discount Rules – Public Stylesheet
   ═══════════════════════════════════════════════════════ */

/* ── Pricing Table ───────────────────────────────────── */
.wadr-pricing-table {
  margin: 18px 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  font-family: inherit;
  font-size: 14px;
}

.wadr-pricing-table__title {
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  color: #222;
}

.wadr-pricing-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.wadr-pricing-table thead th {
  padding: 9px 16px;
  background: #f9f9f9;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #555;
  border-bottom: 1px solid #e0e0e0;
}

.wadr-pricing-table tbody td {
  padding: 9px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.wadr-pricing-table tbody tr:last-child td { border-bottom: none; }

.wadr-pricing-table tbody tr:hover td {
  background: #faf7ff;
}

/* ── Offer Widget (Discount Bar) ──────────────────────── */
.wadr-offer-widget {
  margin: 14px 0 18px;
  border: 1px solid #e8dfc0;
  border-radius: 8px;
  overflow: hidden;
  background: #fdf8ee;
  font-size: 14px;
  font-family: inherit;
  animation: wadr-fadein .35s ease;
}

.wadr-offer-widget__body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 10px;
}

.wadr-offer-widget__icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.wadr-offer-widget__content {
  flex: 1;
}

.wadr-offer-widget__price-line {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.4;
  color: #2e7d32;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.wadr-offer-widget__price-line strong {
  font-size: 16px;
  font-weight: 700;
}

.wadr-offer-widget__price-line .woocommerce-Price-amount {
  color: inherit;
}

.wadr-offer-widget__original-price {
  color: #888;
  font-size: 13px;
  text-decoration: line-through;
}

.wadr-offer-widget__original-price .woocommerce-Price-amount {
  color: inherit;
}

.wadr-offer-widget__text {
  margin: 0;
  color: #444;
  font-size: 13px;
  line-height: 1.5;
}

.wadr-offer-widget__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px dashed #e0d5b0;
  background: transparent;
}

.wadr-offer-widget__auto-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #333;
}

.wadr-offer-widget__auto-icon {
  font-size: 14px;
}

.wadr-offer-widget__tandc {
  font-size: 12px;
  color: #1a73e8;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid #1a73e8;
  line-height: 1.2;
}

.wadr-offer-widget__tandc:hover {
  opacity: 0.75;
}

@keyframes wadr-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── You Saved row ───────────────────────────────────── */
.wadr-you-saved th,
.wadr-you-saved td {
  color: #00a32a;
  font-weight: 700;
}

/* ── Cart Applied Messages ───────────────────────────── */
.wadr-applied-messages {
  border-left: 4px solid #6c47ff !important;
  background: #faf7ff !important;
}

.wadr-applied-messages ul { margin: 0; padding: 0 0 0 18px; }
.wadr-applied-messages li { font-size: 13px; margin-bottom: 4px; color: #333; }

/* ── Promotional Nudge Card ─────────────────────────── */
.wadr-nudge-card {
  margin: 18px 0;
  padding: 16px;
  background: #fdfaf0; /* Light beige */
  border: 1px solid #efe3c9;
  border-radius: 4px;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.wadr-nudge-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.wadr-nudge-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wadr-nudge-card__badge {
  background: #fccd2a; /* Yellow icon */
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  flex-shrink: 0;
}

.wadr-nudge-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #000;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.wadr-nudge-card__savings {
  color: #1a8917; /* Green savings */
  font-weight: 600;
  margin-left: 5px;
}

.wadr-nudge-card__shop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.wadr-nudge-card__shop-btn:hover {
  background: #fcfcfc;
  color: #000;
}

.wadr-nudge-card__progress-text {
  margin: 0;
  font-size: 14px;
  color: #333;
  font-weight: 400;
}

.wadr-nudge-card__footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 10px;
  margin-top: 4px;
}

.wadr-nudge-card__dropdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

/* ── Success State for Nudge Card ────────────────── */
.wadr-nudge-card--success {
  background: #f6fff5 !important;
  border: 1px solid #d4ebd1 !important;
  overflow: hidden;
}

.wadr-nudge-card--success .wadr-nudge-card__badge {
  background: #2e7d32 !important; /* Green for success */
}

.wadr-nudge-card--success .wadr-nudge-card__title {
  color: #1b5e20;
}

.wadr-nudge-card--success .wadr-nudge-card__progress-text {
  color: #2e7d32;
  font-weight: 600;
}

/* ── Sparkle Animation ───────────────────────────── */
.wadr-sparkle-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
}

.wadr-sparkle {
  position: absolute;
  background: #fccd2a;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  animation: wadr-sparkle-pop 1.5s infinite;
}

.wadr-sparkle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0.1s; }
.wadr-sparkle:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.4s; }
.wadr-sparkle:nth-child(3) { bottom: 15%; left: 20%; animation-delay: 0.7s; }
.wadr-sparkle:nth-child(4) { bottom: 10%; right: 10%; animation-delay: 1s; }
.wadr-sparkle:nth-child(5) { top: 50%; left: 5%; animation-delay: 1.2s; }
.wadr-sparkle:nth-child(6) { bottom: 40%; right: 5%; animation-delay: 0.3s; }

@keyframes wadr-sparkle-pop {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  50% { transform: scale(1.5) rotate(180deg); opacity: 1; }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* ── Legacy fallback (if still used) ──────────────── */
.wadr-promotion-nudges {
  border-left: 4px solid #f0a000 !important;
  background: #fffbeb !important;
  padding: 12px;
}
.wadr-promotion-nudges p { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #555; }

/* ── Sale Badge ──────────────────────────────────────── */
.wadr-badge {
  background: linear-gradient(135deg, #6c47ff, #a855f7) !important;
  color: #fff !important;
}

/* ── Shortcode Pro Notice ─────────────────────────────── */
.wadr-pro-notice {
  padding: 12px 16px;
  background: #fff3cd;
  border: 1px solid #f0d080;
  border-radius: 6px;
  font-size: 13px;
  color: #6a4800;
}

/* ── No Sale Empty State ─────────────────────────────── */
.wadr-no-sale { color: #777; font-style: italic; }

/* ── Sale Timer Bar ── */
.wadr-sale-timer {
  background: #d4ffd4 !important; /* Prominent light green */
  border: 1px solid #b2ebb2;
  color: #0b4a1e;
  padding: 12px 16px;
  margin: 18px 0;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.04);
  animation: wadr-timer-pop 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275);
}

.wadr-timer-label {
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.wadr-timer-countdown {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: transparent;
  color: #c62828; /* High urgency red for numbers */
  padding: 0;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

@keyframes wadr-timer-pop {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Mini-cart / Sidebar Adjustments ──────────────────── */
.widget_shopping_cart .wadr-offer-widget,
.mini-cart-slider .wadr-offer-widget {
  margin: 10px 0;
  font-size: 13px;
}

.widget_shopping_cart .wadr-offer-widget__body,
.mini-cart-slider .wadr-offer-widget__body {
  padding: 10px 12px;
}

.widget_shopping_cart .wadr-offer-widget__footer,
.mini-cart-slider .wadr-offer-widget__footer {
  padding: 6px 12px;
}

.widget_shopping_cart .wadr-sale-timer,
.mini-cart-slider .wadr-sale-timer {
  margin: 10px 0;
  padding: 8px 12px;
  font-size: 13px;
  flex-direction: column;
  gap: 4px;
}

.widget_shopping_cart .wadr-timer-label,
.mini-cart-slider .wadr-timer-label {
  font-size: 11px;
}

.widget_shopping_cart .wadr-timer-countdown,
.mini-cart-slider .wadr-timer-countdown {
  font-size: 14px;
}
