/**
 * YouPI-PG V2 — The Creative Invites Gateway Styles
 * Compatible with YouPI-PG Universal Checkout Specification
 * Responsive Desktop Modal & Mobile Drawer UI
 */

/* ============================================================
   1. DIALOG OVERLAY & BACKDROP
   ============================================================ */
.youpi-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 460px;
  width: 92%;
  border-radius: 24px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 175, 55, 0.35);
  overflow: hidden;
  z-index: 1000000;
}

.youpi-dialog::backdrop {
  background: rgba(8, 11, 18, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Mobile Slide-Up Bottom Drawer */
@media (max-width: 640px) {
  .youpi-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto auto 0 auto;
    border-radius: 28px 28px 0 0;
    max-height: 94vh;
  }
}

/* ============================================================
   2. CHECKOUT MODAL CONTAINER
   ============================================================ */
.youpi-modal-card {
  background: linear-gradient(168deg, #1a1c26 0%, #10121a 50%, #0a0b10 100%);
  color: #f7df96;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top Decorative Header */
.youpi-header {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.youpi-brand-stack {
  display: flex;
  align-items: center;
  gap: 10px;
}

.youpi-badge {
  background: linear-gradient(135deg, #d4af37, #f7df96);
  color: #10121a;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.youpi-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.youpi-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #bbb;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.youpi-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.05);
}

/* ============================================================
   3. BODY CONTENT & ORDER SUMMARY
   ============================================================ */
.youpi-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

/* Order Summary Box */
.youpi-order-summary {
  width: 100%;
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.youpi-order-info {
  text-align: left;
}

.youpi-product-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.youpi-order-id {
  font-size: 11px;
  color: #9ea4b4;
  letter-spacing: 0.04em;
}

.youpi-amount-display {
  text-align: right;
}

.youpi-amount-val {
  font-size: 22px;
  font-weight: 800;
  color: #f7df96;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.youpi-amount-fee {
  font-size: 10px;
  color: #25d366;
  font-weight: 600;
}

/* ============================================================
   3b. CUSTOMER WHATSAPP NUMBER INPUT SECTION
   ============================================================ */
.youpi-customer-phone-wrap {
  width: 100%;
  background: rgba(37, 211, 102, 0.06);
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.youpi-customer-phone-wrap.has-error {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  animation: youpiShake 0.4s ease;
}

.youpi-customer-phone-wrap.is-valid {
  border-color: #25d366;
  background: rgba(37, 211, 102, 0.12);
}

@keyframes youpiShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.youpi-phone-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #25d366;
  margin-bottom: 8px;
}

.youpi-phone-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 7px 12px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.youpi-phone-input-row:focus-within {
  border-color: #25d366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
  background: rgba(0, 0, 0, 0.6);
}

.youpi-phone-prefix {
  font-weight: 700;
  font-size: 13px;
  color: #f7df96;
  user-select: none;
}

.youpi-phone-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  width: 100%;
  font-family: inherit;
  letter-spacing: 0.05em;
}

.youpi-phone-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  font-size: 12px;
}

.youpi-phone-helper {
  font-size: 10.5px;
  color: #9ea4b4;
  margin-top: 6px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.youpi-phone-helper.is-success {
  color: #4ade80;
  font-weight: 600;
}

.youpi-phone-helper.is-error {
  color: #f87171;
  font-weight: 600;
}

/* ============================================================
   4. DYNAMIC QR CODE CONTAINER
   ============================================================ */
.youpi-qr-container {
  background: #ffffff;
  padding: 14px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  margin-bottom: 14px;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.youpi-qr-container svg {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

/* Live Timer & Pulse */
.youpi-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #d1d5db;
  margin-bottom: 14px;
}

.youpi-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 10px #25d366;
  animation: youpiPulse 1.5s infinite;
}

@keyframes youpiPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.youpi-timer-val {
  font-weight: 700;
  color: #f7df96;
  font-variant-numeric: tabular-nums;
}

/* UPI ID Copy Pill */
.youpi-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 18px;
}

.youpi-copy-pill:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.4);
  color: #fff;
}

/* ============================================================
   5. MOBILE 1-TAP UPI APP INTENT SWITCHER
   ============================================================ */
.youpi-mobile-apps {
  width: 100%;
  margin-bottom: 18px;
}

.youpi-mobile-apps-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ea4b4;
  margin-bottom: 10px;
}

.youpi-apps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

/* ============================================================
   5b. OFFICIAL STUDIO BANK ACCOUNT DETAILS (NEFT/IMPS)
   ============================================================ */
.youpi-bank-details {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
}

.youpi-bank-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f7df96;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.youpi-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 11px;
}

@media (max-width: 400px) {
  .youpi-bank-grid {
    grid-template-columns: 1fr;
  }
}

.youpi-bank-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.youpi-bank-label {
  color: #9ea4b4;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.youpi-bank-value {
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  word-break: break-all;
}

.youpi-bank-copyable {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f7df96;
  cursor: pointer;
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  width: fit-content;
}

.youpi-bank-copyable:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  color: #fff;
}

.youpi-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 4px;
  border-radius: 12px;
  text-decoration: none;
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.youpi-app-btn:hover,
.youpi-app-btn:active {
  background: rgba(212, 175, 55, 0.18);
  border-color: #d4af37;
  color: #fff;
  transform: translateY(-2px);
}

.youpi-app-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.youpi-app-icon--gpay { background: #fff; color: #4285f4; }
.youpi-app-icon--phonepe { background: #5f259f; color: #fff; }
.youpi-app-icon--paytm { background: #00b9f5; color: #fff; }
.youpi-app-icon--bhim { background: #005a9c; color: #fff; }

/* ============================================================
   6. VERIFICATION & UTR SUBMISSION
   ============================================================ */
.youpi-verify-card {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.youpi-verify-label {
  font-size: 12px;
  color: #d1d5db;
  text-align: left;
}

.youpi-utr-input-group {
  display: flex;
  gap: 8px;
  width: 100%;
}

.youpi-utr-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.youpi-utr-input:focus {
  border-color: #d4af37;
}

.youpi-submit-utr-btn {
  background: linear-gradient(135deg, #d4af37, #f7df96);
  color: #111;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.youpi-submit-utr-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.youpi-wa-fallback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
}

.youpi-wa-fallback-btn:hover {
  background: #20ba59;
  transform: translateY(-1px);
}

/* ============================================================
   7. STOREFRONT "BUY NOW" BUTTON STYLES
   ============================================================ */
.btn--youpi-buy {
  background: linear-gradient(135deg, #d4af37 0%, #f7df96 100%) !important;
  color: #12131a !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none !important;
}

.btn--youpi-buy:hover {
  background: linear-gradient(135deg, #dfbc45 0%, #fff1b8 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.5);
  color: #000 !important;
}

.btn--youpi-buy.btn--sm {
  padding: 6px 14px !important;
  font-size: 0.8rem !important;
  border-radius: 999px !important;
}

.btn--youpi-buy svg {
  flex-shrink: 0;
}

.btn-live-preview--buy {
  background: linear-gradient(135deg, #d4af37, #f7df96) !important;
  color: #12131a !important;
  border-color: #d4af37 !important;
  font-weight: 700 !important;
  padding: 5px 12px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.btn-live-preview--buy:hover {
  background: linear-gradient(135deg, #dfbc45, #fff1b8) !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
  color: #000 !important;
}

