:root {
  --razorpay-red: #ea2c3d;
  --primary-blue: #4D6BFE;
  --shadow-color: rgba(77, 107, 254, 0.3);
  --cloud-color: #e0f2ff;
  --dark-blue: #1a2b6d;
  --phonepe-blue: #6739b6;
  --google-pay-green: #0f9d58;
  --paytm-blue: #002e6e;
  --bhim-upi-orange: #ff6e00;
}

/* ===================== */
/* ANIMATIONS */
/* ===================== */
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.7); }
  80% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes neonGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes countdown {
  from { width: 100%; }
  to { width: 0%; }
}

/* ===================== */
/* BASE PAYMENT CONTAINER */
/* ===================== */
#custom-upi-payment-container {
  margin: 20px 0;
  padding: 20px;
  background: var(--cloud-color);
  border: 1px solid #b3d9ff;
  border-radius: 12px;
  position: relative;
  z-index: 50;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* WooCommerce payment method fix */
.payment_method_custom_upi {
  margin-bottom: 20px;
  position: relative;
}
.payment_method_custom_upi .payment_box {
  padding: 0;
  background: transparent;
  border: none;
  position: relative;
  z-index: 100;
}

/* ===================== */
/* PAYMENT INSTRUCTIONS */
/* ===================== */
.custom-upi-payment-instructions {
  margin: 20px 0;
  padding: 25px;
  background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
  border-radius: 12px;
  border: none;
  color: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.custom-upi-payment-instructions h3 {
  color: white;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.upi-id-display {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  margin: 10px 0;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.4);
  display: inline-block;
  backdrop-filter: blur(5px);
}

.payment-waiting {
  text-align: center;
  margin: 20px 0;
}

.loading-animation {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

.note {
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-top: 15px;
}

/* ===================== */
/* QR CONTAINER (DEFAULT) */
/* ===================== */
.upi-qr-container {
  position: relative;
  background: linear-gradient(135deg, #4cd964, #2ecc71);
  padding: 25px 30px 30px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(76, 217, 100, 0.3);
  max-width: 380px;
  margin: 30px auto;
  text-align: center;
  animation: popIn 0.4s ease forwards;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: white;
  overflow: hidden;
}

/* QR Box (Default) */
#upi-thankyou-qr {
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: inline-block;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  margin-bottom: 15px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
#upi-thankyou-qr:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
}

/* Headings & Instructions */
.upi-qr-container h4 {
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 12px;
  letter-spacing: 0.03em;
  margin: 0 0 15px 0;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.upi-qr-container p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  margin: 0;
  letter-spacing: 0.02em;
  user-select: none;
  margin-top: 10px;
}

/* QR Download Button */
.qr-download-container {
  margin-top: 15px;
}
.qr-download-container button {
  background: #fff;
  color: #4cd964;
  border: 2px solid #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.qr-download-container button:hover {
  background: #4cd964;
  color: #fff;
}

/* ===================== */
/* UPI BUTTONS CONTAINER (MOBILE ONLY) */
/* ===================== */
.upi-buttons-container {
  display: none; /* Hidden by default, shown via JS for mobile */
  margin: 25px 0;
  text-align: center;
}

.upi-buttons-title {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 15px;
  font-weight: 600;
}

.upi-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.upi-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  border-radius: 10px;
  border: none;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.upi-button:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.upi-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.upi-button:active {
  transform: translateY(0);
}

.upi-button-phonepe {
  background: var(--phonepe-blue);
}

.upi-button-googlepay {
  background: var(--google-pay-green);
}

.upi-button-paytm {
  background: var(--paytm-blue);
}

.upi-button-bhim {
  background: var(--bhim-upi-orange);
}

.upi-button-icon {
  margin-right: 8px;
  font-size: 1.2rem;
}

/* ===================== */
/* COUNTDOWN TIMER */
/* ===================== */
.countdown-container {
  margin: 20px 0;
  text-align: center;
}

.countdown-text {
  font-size: 1rem;
  color: white;
  margin-bottom: 8px;
  font-weight: 500;
}

.countdown-timer {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-bar {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
  max-width: 300px;
}

.countdown-progress {
  height: 100%;
  width: 0%; /* Start at 0% */
  background: linear-gradient(90deg, #4cd964, #2ecc71);
  transition: width 1s linear;
}

/* ===================== */
/* QR CONTAINER (NEON STYLE MODIFIER) */
/* ===================== */
.upi-qr-container.neon-style {
  background: linear-gradient(145deg, #0a0f2d, #1a2555);
  box-shadow: 0 0 25px rgba(255, 200, 0, 0.25), 0 0 45px rgba(255, 0, 100, 0.25);
}
.upi-qr-container.neon-style::before {
  content: "";
  position: absolute;
  top: -3px; 
  left: -3px; 
  right: -3px; 
  bottom: -3px;
  border-radius: 24px;
  background: linear-gradient(45deg, #ffcc00, #ff0099, #ffcc00);
  background-size: 400% 400%;
  animation: neonGlow 8s linear infinite;
  z-index: 0;
  filter: blur(12px);
}
.upi-qr-container.neon-style h4 {
  color: #ffcc66;
  z-index: 1;
  position: relative;
}
.upi-qr-container.neon-style #upi-thankyou-qr {
  background: #0e153a;
  border: 2px solid #ffcc00;
  box-shadow: 0 0 15px rgba(255, 200, 0, 0.8), 0 0 25px rgba(255, 0, 100, 0.6);
}
.upi-qr-container.neon-style #upi-thankyou-qr:hover {
  transform: scale(1.06);
  box-shadow: 0 0 30px rgba(255, 200, 0, 0.9), 0 0 45px rgba(255, 0, 100, 0.8);
}
.upi-qr-container.neon-style p {
  color: #cfd8ff;
  z-index: 1;
  position: relative;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .upi-buttons-grid {
    grid-template-columns: 1fr;
  }
  
  .upi-button {
    padding: 14px 20px;
    font-size: 1rem;
  }
}














/* QR Download Button */
.qr-download-container {
  margin-top: 15px;
  text-align: center;
}
.qr-download-container button {
  background: #fff;
  color: #4cd964;
  border: 2px solid #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.qr-download-container button:hover {
  background: #4cd964;
  color: #fff;
}

/* Loading indicator for download */
.download-loading {
  display: none;
  margin-top: 10px;
  color: white;
  font-size: 14px;
}