/* WooCommerce Bundle Discounts - Simple Clean Design */

.woo-bundle-offer-container {
  max-width: 600px;
  margin: 30px auto;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Bundle Tiers - Simple Card Layout */
.woo-bundle-tiers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.woo-bundle-tier {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.woo-bundle-tier:hover {
  border-color: #d1d5db;
}

/* Tier Image */
.tier-image {
  width: 80px;
  height: 80px;
  margin-right: 20px;
  border-radius: 8px;
  overflow: visible;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.tier-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.quantity-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: white;
  font-size: 14px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}

/* Tier Right Section - Contains everything after the image */
.tier-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Title spans full width */
.tier-title {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
  width: 100%;
}

/* Bottom section with subtitle and price side by side */
.tier-bottom-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Tier Content - Left side of bottom section */
.tier-content {
  flex: 1;
}

.tier-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.tier-badge.red {
  background: #ef4444;
  color: white;
}

.tier-badge.green {
  background: #22c55e;
  color: white;
}

.tier-badge.gray {
  background: #6b7280;
  color: white;
}

.tier-description {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

/* Tier Pricing - Right side of bottom section */
.tier-pricing {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.tier-price {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
}

.tier-price .currency {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.tier-price .amount {
  font-size: 22px;
  font-weight: 800;
  color: #1f2937;
  margin-left: 2px;
}

.tier-savings {
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.original-price {
  font-size: 12px;
  color: #6b7280 !important;
  text-decoration: line-through;
}

.original-price * {
  color: #6b7280 !important;
}

.save-amount {
  font-size: 10px;
  color: #16a34a !important;
  font-weight: 600;
}

.save-amount * {
  color: #16a34a !important;
}

/* Tier Selection - Hidden completely */
.tier-select {
  display: none;
}

/* Timer Section */
.woo-bundle-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #dbeafe;
  border: 2px dashed #3b82f6;
  border-radius: 8px;
  margin-bottom: 16px;
  color: #1f2937;
  font-weight: 600;
}

.timer-icon {
  font-size: 18px;
}

.timer-text {
  font-size: 14px;
  color: #ef4444;
  font-weight: 700;
}

.timer-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.timer-time {
  font-size: 14px;
  font-weight: 700;
  font-family: "Courier New", monospace;
  color: #1f2937;
}

.timer-label {
  font-size: 12px;
  color: #6b7280;
}

/* Upsells Section */
.woo-bundle-upsells {
  margin-bottom: 20px;
}

.upsell-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.upsell-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: #f59e0b;
  cursor: pointer;
}

.upsell-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
  color: #1f2937;
}

.upsell-icon {
  font-size: 18px;
  margin-right: 12px;
}

.upsell-text {
  flex: 1;
  font-size: 13px;
}

.upsell-price {
  font-weight: 700;
  color: #f59e0b;
  font-size: 14px;
}

.upsell-subtitle {
  font-size: 10px;
  color: #6b7280;
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

/* Order Button */
.woo-bundle-actions {
  text-align: center;
}

.woo-bundle-order-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  max-width: 400px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.woo-bundle-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-text {
  margin-right: 8px;
}

.btn-price {
  font-weight: 800;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .woo-bundle-offer-container {
    margin: 20px 10px;
    padding: 0;
  }

  .woo-bundle-tier {
    padding: 12px;
    align-items: flex-start;
  }

  .tier-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
  }

  .tier-right-section {
    flex: 1;
  }

  .tier-title {
    font-size: 14px;
    line-height: 1.3;
  }

  .tier-bottom-section {
    gap: 12px;
    align-items: flex-end;
  }

  .tier-content {
    flex: 1;
  }

  .tier-badge {
    font-size: 8px;
    padding: 2px 6px;
    margin-bottom: 4px;
  }

  .tier-description {
    font-size: 10px;
  }

  .tier-pricing {
    text-align: right;
    align-items: flex-end;
  }

  .tier-price .currency {
    font-size: 13px;
  }

  .tier-price .amount {
    font-size: 19px;
  }

  .tier-savings {
    font-size: 11px;
    justify-content: flex-end;
    margin-top: 2px;
  }

  .original-price {
    font-size: 11px;
    color: #6b7280 !important;
    text-decoration: line-through;
  }

  .original-price * {
    color: #6b7280 !important;
  }

  .save-amount {
    font-size: 11px;
    color: #16a34a !important;
    font-weight: 600;
  }

  .save-amount * {
    color: #16a34a !important;
  }

  .quantity-badge {
    font-size: 12px;
    padding: 2px 5px;
    top: -6px;
    right: -6px;
    min-width: 16px;
  }

  .woo-bundle-timer {
    flex-wrap: wrap;
    gap: 8px;
    text-align: center;
    padding: 10px 12px;
  }

  .timer-text {
    font-size: 14px;
  }

  .timer-time {
    font-size: 14px;
  }

  .timer-label {
    font-size: 12px;
  }

  .woo-bundle-order-btn {
    font-size: 16px;
    padding: 16px 24px;
  }

  .upsell-item {
    padding: 10px 12px;
  }

  .upsell-item label {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .upsell-icon {
    font-size: 14px;
  }

  .upsell-price {
    font-size: 12px;
  }

  .upsell-text {
    font-size: 13px;
  }
}

/* Simple animations */
.tier-selected-animation {
  animation: simpleSelect 0.2s ease;
}

@keyframes simpleSelect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.price-updated {
  animation: priceUpdate 0.3s ease;
}

@keyframes priceUpdate {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.woo-bundle-order-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.woo-bundle-order-btn.success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
}

.upsell-item.selected {
  background: #fef3c7;
  border-color: #f59e0b;
}

.woo-bundle-tier.selected {
  border-color: #3b82f6 !important;
}

.urgent {
  animation: urgentBlink 1s infinite;
}

@keyframes urgentBlink {
  0% {
    background: #dbeafe;
  }
  50% {
    background: #fecaca;
  }
  100% {
    background: #dbeafe;
  }
}

/* Hide default quantity input when bundles are active */
.woo-bundle-offer-container ~ form.cart .quantity {
  display: none;
}
