/* ═══════════════════════════════════════════════════════
   INDIAGRAM.IN — Buy Flow / UPI Checkout
   Inline CSS overlay — bypasses popup blockers
   ═══════════════════════════════════════════════════════ */

#ig-buy-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000000;
}

#ig-buy-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#ig-buy-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  background: #13131f;
  border: 1px solid rgba(255, 103, 31, 0.28);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
  color: #eee;
  font-family: 'Lato', sans-serif;
  -webkit-overflow-scrolling: touch;
}

#ig-buy-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: #555;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  padding: 4px 8px;
  transition: color 0.2s;
}
#ig-buy-close:hover { color: #ccc; }

/* ── Header ── */
.ig-buy-header {
  background: linear-gradient(135deg, #0d0d1a 0%, #16213e 100%);
  border-bottom: 1px solid rgba(255, 103, 31, 0.15);
  padding: 22px 22px 18px;
  text-align: center;
  border-radius: 16px 16px 0 0;
}
.ig-buy-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: rgba(255, 103, 31, 0.12);
  color: #ff671f;
  border: 1px solid rgba(255, 103, 31, 0.28);
  border-radius: 4px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.ig-buy-pkg-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.4;
  padding: 0 28px;
}
.ig-buy-price {
  font-size: 30px;
  font-weight: 800;
  color: #ff671f;
  letter-spacing: -0.5px;
}
.ig-buy-ref {
  font-size: 10.5px;
  color: #444;
  margin-top: 5px;
  letter-spacing: 0.5px;
}
.ig-buy-pay-icon {
  font-size: 40px;
  margin-bottom: 6px;
}

/* ── Body ── */
.ig-buy-body { padding: 22px; }

.ig-buy-notice {
  background: rgba(255, 103, 31, 0.06);
  border: 1px solid rgba(255, 103, 31, 0.15);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 12px;
  color: #999;
  margin-bottom: 18px;
  text-align: center;
}
.ig-buy-notice i { color: #ff671f; margin-right: 5px; }

.ig-buy-label {
  display: block;
  font-size: 11.5px;
  color: #777;
  font-weight: 700;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.ig-req { color: #ff671f; }

.ig-buy-input {
  display: block;
  width: 100%;
  background: #0c0b14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 14px;
  color: #eee;
  margin-bottom: 6px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.ig-buy-input:focus { border-color: rgba(255, 103, 31, 0.5); }
.ig-buy-input::placeholder { color: #3a3a4a; }

.ig-buy-hint {
  font-size: 11.5px;
  color: #4a4a5a;
  margin-bottom: 16px;
  line-height: 1.45;
}
.ig-buy-hint strong { color: #666; }

.ig-buy-error {
  background: rgba(255, 60, 60, 0.1);
  border: 1px solid rgba(255, 60, 60, 0.25);
  border-radius: 6px;
  color: #ff6b6b;
  font-size: 12px;
  min-height: 0;
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s, padding 0.25s;
}
.ig-buy-error.ig-buy-error--show {
  max-height: 60px;
  padding: 8px 12px;
}

/* ── Buttons ── */
.ig-buy-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, #ff671f 0%, #e0531a 100%);
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 20px rgba(255, 103, 31, 0.38);
  font-family: 'Lato', sans-serif;
}
.ig-buy-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
}
.ig-buy-btn:active { transform: translateY(0); }

.ig-buy-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #888 !important;
  font-size: 13px;
  box-shadow: none;
}
.ig-buy-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.22);
  color: #aaa !important;
}

/* ── Screen visibility ── */
.ig-buy-screen--hidden { display: none !important; }

/* ── Payment screens ── */
.ig-pay-mobile,
.ig-pay-desktop,
.ig-pay-free { text-align: center; }

.ig-pay-instr {
  font-size: 13px;
  color: #999;
  margin-bottom: 18px;
  line-height: 1.55;
}

.ig-pay-upi-btn {
  font-size: 16px;
  padding: 15px;
  margin-bottom: 10px;
}

.ig-pay-apps {
  font-size: 11px;
  color: #4a4a5a;
  margin-bottom: 16px;
}

.ig-pay-divider {
  font-size: 11px;
  color: #333;
  margin: 14px 0;
}

/* ── Manual UPI ID row ── */
.ig-pay-manual {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0c0b14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 10px 14px;
  justify-content: center;
  text-align: left;
}
.ig-pay-manual-label {
  font-size: 10px;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  flex-shrink: 0;
}
.ig-pay-upiid {
  font-size: 13px;
  font-weight: 700;
  color: #ff671f;
  font-family: 'Courier New', monospace;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ig-pay-copy-btn {
  background: rgba(255, 103, 31, 0.1);
  border: 1px solid rgba(255, 103, 31, 0.22);
  color: #ff671f;
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  letter-spacing: 0.3px;
}
.ig-pay-copy-btn:hover { background: rgba(255, 103, 31, 0.2); }

.ig-pay-ref {
  font-size: 11.5px;
  color: #555;
  margin-top: 12px;
  line-height: 1.55;
}
.ig-pay-ref strong { color: #888; }

/* ── QR wrapper ── */
.ig-qr-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 auto 8px;
}
.ig-qr-wrapper img {
  border-radius: 10px;
  border: 3px solid rgba(255, 103, 31, 0.25);
  display: block;
  background: #fff;
}

/* ── Confirmed screen ── */
.ig-buy-confirm-wrap {
  text-align: center;
  padding: 36px 20px;
}
.ig-buy-confirm-icon { font-size: 54px; margin-bottom: 14px; }
.ig-buy-confirm-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.ig-buy-confirm-msg {
  font-size: 13px;
  color: #888;
  line-height: 1.65;
  margin-bottom: 18px;
}
.ig-buy-confirm-ref {
  display: inline-block;
  background: rgba(255, 103, 31, 0.1);
  border: 1px solid rgba(255, 103, 31, 0.25);
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #ff671f;
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.ig-buy-confirm-support {
  font-size: 11.5px;
  color: #444;
  line-height: 1.5;
}
.ig-buy-confirm-support a { color: #ff671f; text-decoration: none; }

/* ── Responsive (mobile sheet) ── */
@media (max-width: 479px) {
  #ig-buy-dialog {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
  }
  .ig-buy-pkg-name { padding: 0 32px; }
}
