/**
 * Cart Countdown Timer Styles
 * Minimalist Shopify-style design
 */

.cart-countdown {
  background: #f7f7f7;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-countdown__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-countdown__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-countdown__icon svg {
  width: 100%;
  height: 100%;
}

.cart-countdown__content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 767px) {
  .cart-countdown__content {
    font-size: 12px;
  }
}

.cart-countdown__text {
  font-weight: 400;
}

.cart-countdown__text strong {
  font-weight: 600;
  color: #000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
}

.cart-countdown__info {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  margin-left: auto;
}

.cart-countdown__info:hover {
  color: #000;
}

.cart-countdown__info svg {
  display: block;
}

.cart-countdown__tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  animation: tooltipFadeIn 0.2s ease-out;
}

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

@media (max-width: 767px) {
  .cart-countdown__tooltip {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  }
}

.cart-countdown__tooltip-content {
  font-size: 13px;
  line-height: 1.6;
  color: #666;
}

.cart-countdown__tooltip-content p {
  margin: 0 0 12px;
}

.cart-countdown__tooltip-content p:last-child {
  margin-bottom: 0;
}

.cart-countdown__wishlist-link {
  color: #000;
  text-decoration: underline;
  font-weight: 500;
}

.cart-countdown__wishlist-link:hover {
  color: #666;
}

/* Urgent state when time is running low (under 5 minutes) */
.cart-countdown.cart-countdown--urgent {
  background: #fff3cd;
  border-color: #ffc107;
}

.cart-countdown.cart-countdown--urgent .cart-countdown__icon {
  color: #856404;
}

.cart-countdown.cart-countdown--urgent .cart-countdown__text {
  color: #856404;
}

.cart-countdown.cart-countdown--urgent .cart-countdown__text strong {
  color: #856404;
}

/* Integration with add-to-cart popup */
.woocommerce-cart-popup .cart-countdown {
  margin-top: 16px;
}

/* Integration with cart page */
.woocommerce-cart-form .cart-countdown + .shop_table {
  margin-top: 0;
}

/* Integration with CheckoutWC */
body.checkout-wc .cart-countdown--checkout-sidebar {
  margin-bottom: 12px;
}

/* Expiration notice */
.cart-countdown-notice {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  padding: 16px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  max-width: 500px;
  width: 90%;
  display: none;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  text-align: center;
}

@media (max-width: 767px) {
  .cart-countdown-notice {
    top: 10px;
    font-size: 13px;
    padding: 12px 16px;
  }
}

.cart-countdown-notice p {
  margin: 0 0 12px;
}

.cart-countdown-notice p:last-child {
  margin-bottom: 0;
}

.cart-countdown-notice__link {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.cart-countdown-notice__link:hover {
  background: #333;
  color: #fff;
}

