/**
 * Free shipping progress bar — cart and checkout.
 */

.thb-shipping-progress-wrapper {
  margin: 0 0 24px 0;
}

.thb-shipping-progress-wrapper[data-state="empty"],
.thb-shipping-progress-wrapper[data-state="none"] {
  display: none;
}

.thb-shipping-progress {
  background: linear-gradient(160deg, #f4f8ee 0%, #ffffff 100%);
  border: 1px solid #d8e4c4;
  border-radius: 10px;
  padding: 16px 20px 18px 20px;
  box-shadow: 0 1px 2px rgba(51, 64, 16, 0.04);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.thb-shipping-progress-wrapper[data-state="qualified"] .thb-shipping-progress {
  background: linear-gradient(160deg, #e8f5e9 0%, #f4faf0 100%);
  border-color: #b8d8a8;
}

.thb-shipping-progress-message {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #1a2e05;
  font-size: 15px;
  line-height: 1.4;
}

.thb-shipping-progress-text {
  flex: 1 1 auto;
}

.thb-shipping-progress-text strong {
  color: #334010;
  font-weight: 700;
}

.thb-shipping-progress-text .woocommerce-Price-amount,
.thb-shipping-progress-text .amount {
  color: #334010;
  font-weight: 700;
  white-space: nowrap;
}

.thb-shipping-progress-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #d8e4c4;
  color: #334010;
}

.thb-shipping-progress-icon--check {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.thb-shipping-progress-bar {
  position: relative;
  height: 8px;
  background: #e6ecdc;
  border-radius: 999px;
  overflow: hidden;
}

.thb-shipping-progress-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6b8e23 0%, #334010 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.thb-shipping-progress-wrapper[data-state="qualified"] .thb-shipping-progress-bar-fill {
  background: linear-gradient(90deg, #2e7d32 0%, #1b5e20 100%);
  width: 100% !important;
}

.thb-shipping-progress-wrapper[data-state="qualified"] .thb-shipping-progress-bar {
  background: #cfe6cf;
}

/* Subtle shimmer on the in-progress fill */
.thb-shipping-progress-wrapper[data-state="progress"] .thb-shipping-progress-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: thb-shipping-progress-shimmer 2.2s ease-in-out infinite;
}

@keyframes thb-shipping-progress-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.thb-shipping-progress-continue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid #d8e4c4;
  border-radius: 999px;
  background: #fff;
  color: #334010;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.thb-shipping-progress-continue:hover,
.thb-shipping-progress-continue:focus {
  background: #334010;
  border-color: #334010;
  color: #fff;
  text-decoration: none;
}

.thb-shipping-progress-continue:hover .thb-shipping-progress-continue-arrow,
.thb-shipping-progress-continue:focus .thb-shipping-progress-continue-arrow {
  transform: translateX(2px);
}

.thb-shipping-progress-continue-arrow {
  transition: transform 0.2s ease;
}

/* Checkout column — match the order review card spacing */
.woocommerce-checkout .thb-shipping-progress-wrapper {
  margin-top: 0;
  margin-bottom: 20px;
}

/* Mobile */
@media (max-width: 640px) {
  .thb-shipping-progress {
    padding: 14px 16px 16px 16px;
  }
  .thb-shipping-progress-message {
    font-size: 14px;
    gap: 8px;
  }
  .thb-shipping-progress-icon {
    width: 26px;
    height: 26px;
  }
}
