/**
 * G UPI — Front-end checkout styles.
 */

/* ---- Buy button ---- */
.upi-pt-buy-button {
  display: inline-block;
  background: #2d8a4e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  line-height: 1.2;
}

.upi-pt-buy-button:hover {
  background: #24713f;
}

.upi-pt-buy-button:active {
  transform: translateY(1px);
}

.upi-pt-unavailable {
  color: #8a6d3b;
  background: #fcf8e3;
  border: 1px solid #faebcc;
  padding: 8px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* ---- Product grid ---- */
.upi-pt-products {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.upi-pt-cols-1 { grid-template-columns: 1fr; }
.upi-pt-cols-2 { grid-template-columns: repeat(2, 1fr); }
.upi-pt-cols-3 { grid-template-columns: repeat(3, 1fr); }
.upi-pt-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 782px) {
  .upi-pt-products {
    grid-template-columns: 1fr !important;
  }
}

.upi-pt-product-card {
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.upi-pt-product-name {
  margin: 0 0 8px;
  font-size: 18px;
}

.upi-pt-product-desc {
  color: #666;
  font-size: 14px;
  margin: 0 0 12px;
}

.upi-pt-product-price {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 14px;
}

/* ---- Overlay (60% grey) ---- */
.upi-pt-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
  box-sizing: border-box;
}

.upi-pt-overlay.is-open {
  display: flex;
}

/* ---- White centered modal ---- */
.upi-pt-modal {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 450px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 28px 26px 26px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  animation: upi-pt-pop 0.18s ease-out;
}

@keyframes upi-pt-pop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.upi-pt-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
}

.upi-pt-close:hover {
  color: #333;
}

.upi-pt-modal-title {
  margin: 0 0 6px;
  font-size: 20px;
  color: #1a1a1a;
  padding-right: 20px;
}

.upi-pt-modal-price,
.upi-pt-pay-amount {
  font-size: 18px;
  font-weight: 700;
  color: #2d8a4e;
  margin-bottom: 16px;
}

.upi-pt-pay-amount {
  font-size: 24px;
  text-align: center;
}

/* ---- Form ---- */
.upi-pt-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.upi-pt-form label span {
  display: block;
  margin-bottom: 5px;
}

.upi-pt-form input,
.upi-pt-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
  font-family: inherit;
}

.upi-pt-form input:focus,
.upi-pt-form textarea:focus {
  border-color: #2d8a4e;
  outline: none;
  box-shadow: 0 0 0 2px rgba(45, 138, 78, 0.15);
}

/* ---- Buttons ---- */
.upi-pt-primary-btn {
  width: 100%;
  background: #2d8a4e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 13px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s ease;
}

.upi-pt-primary-btn:hover:not(:disabled) {
  background: #24713f;
}

.upi-pt-primary-btn:disabled {
  background: #a9c9b5;
  cursor: not-allowed;
}

/* ---- QR ---- */
.upi-pt-qr {
  display: flex;
  justify-content: center;
  margin: 8px 0 14px;
}

.upi-pt-qr img,
.upi-pt-qr canvas,
.upi-pt-qr table {
  width: 200px;
  height: 200px;
}

.upi-pt-desktop-hint {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin: 4px 0 10px;
}



/* ---- Method buttons ---- */
.upi-pt-methods-label {
  font-weight: 600;
  margin: 12px 0 8px;
  font-size: 14px;
}

.upi-pt-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.upi-pt-method-btn {
  border: 2px solid #d7d7d7;
  background: #fff;
  border-radius: 8px;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upi-pt-method-btn:hover {
  border-color: #2d8a4e;
}

.upi-pt-method-btn.is-selected {
  border-color: #2d8a4e;
  background: #eef7f1;
  color: #24713f;
}

/* ---- Error / success ---- */
.upi-pt-error {
  color: #b32d2e;
  font-size: 14px;
  margin-bottom: 10px;
  min-height: 1px;
}

.upi-pt-success-icon {
  width: 64px;
  height: 64px;
  margin: 4px auto 12px;
  border-radius: 50%;
  background: #2d8a4e;
  color: #fff;
  font-size: 36px;
  line-height: 64px;
  text-align: center;
}

.upi-pt-step[data-step="thankyou"] {
  text-align: center;
}

.upi-pt-thankyou-text {
  color: #444;
  font-size: 15px;
  margin-bottom: 18px;
}

@media (max-width: 480px) {
  .upi-pt-modal {
    padding: 24px 18px 20px;
  }
  .upi-pt-methods {
    grid-template-columns: 1fr;
  }
}

/* G UPI 2.0 additions */
.upi-pt-buy-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.upi-pt-inline-price { display: block; width: 100%; font-size: 22px; line-height: 1.25; font-weight: 700; color: #1a1a1a; text-align: center; }
.upi-pt-field-choice { display: block; margin: 7px 0; }
.upi-pt-custom-label { margin-bottom: 6px; }
.upi-pt-method-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; }
.upi-pt-app-logo { width: 36px !important; height: 36px !important; max-width: 36px !important; object-fit: contain; flex: 0 0 36px; }
.upi-pt-waiting { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; color: #2d6a3f; font-weight: 600; text-align: center; }
.upi-pt-waiting-main { display: flex; align-items: center; justify-content: center; gap: 10px; }
.upi-pt-waiting-note { color: #667085; font-size: 12px; font-weight: 400; line-height: 1.4; }
#upi-pt-waiting-timer { color: #475467; font-variant-numeric: tabular-nums; font-weight: 600; }
.upi-pt-spinner { width: 22px; height: 22px; border: 3px solid #cfe4d6; border-top-color: #2d8a4e; border-radius: 50%; animation: upi-pt-spin .8s linear infinite; }
@keyframes upi-pt-spin { to { transform: rotate(360deg); } }
@media (min-width: 783px) { .upi-pt-mobile-methods { display: none !important; } }
.upi-logo-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.upi-logo-row label { width: 110px; }
.upi-pt-phone-row { display: grid; grid-template-columns: minmax(145px, 42%) 1fr; gap: 8px; }
.upi-pt-form .upi-pt-country-code { width: 100%; min-width: 0; padding: 10px 8px; border: 1px solid #ccc; border-radius: 6px; background: #fff; font: inherit; }
@media (max-width: 420px) { .upi-pt-phone-row { grid-template-columns: 1fr; } }
.upi-pt-buy-button.upi-pt-no-stock,
.upi-pt-buy-button.upi-pt-no-stock:hover,
.upi-pt-buy-button.upi-pt-no-stock:active {
  background: #8c8f94;
  color: #fff;
  cursor: not-allowed;
  transform: none;
  opacity: 1;
}
