/* ==========================================================================
   TechKalaA - Shared Inline Placement Materials Payment Modal Styles
   ========================================================================== */

/* Prevent background body scroll when modal is active */
.tkpay-lock {
  overflow: hidden !important;
  touch-action: none;
}

/* Modal Overlay & Backdrop */
.tkpay-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: tkpayFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tkpay-overlay.tkpay-closing {
  animation: tkpayFadeOut 0.16s ease forwards;
}

/* Modal Dialog Container */
.tkpay-modal {
  background: #ffffff;
  width: min(720px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
  animation: tkpaySlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Header */
.tkpay-head {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 55%, #9333ea 100%);
  color: #ffffff;
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  flex-shrink: 0;
}

.tkpay-head-info {
  flex: 1;
  min-width: 0;
}

.tkpay-badge-instant {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: #fef08a;
}

.tkpay-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.tkpay-subtitle {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.tkpay-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.tkpay-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}

/* Modal Body */
.tkpay-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 2-Column Responsive Layout */
.tkpay-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 20px;
  align-items: start;
}

.tkpay-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: #64748b;
  margin-bottom: 8px;
}

/* Package Options */
.tkpay-packages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.tkpay-pkg-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.tkpay-pkg-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.tkpay-pkg-card.selected {
  border-color: #7c3aed;
  background: #faf5ff;
  box-shadow: 0 0 0 1px #7c3aed, 0 4px 14px rgba(124, 58, 237, 0.12);
}

.tkpay-pkg-radio {
  flex-shrink: 0;
  position: relative;
}

.tkpay-pkg-radio-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  pointer-events: none;
}

.tkpay-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-sizing: border-box;
}

.tkpay-radio-circle.active {
  border-color: #7c3aed;
  background: #7c3aed;
}

.tkpay-radio-circle.active::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.tkpay-pkg-details {
  flex: 1;
  min-width: 0;
}

.tkpay-pkg-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tkpay-pkg-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.tkpay-tag {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.tkpay-pkg-sub {
  margin: 3px 0 0 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.35;
}

.tkpay-pkg-price {
  font-size: 17px;
  font-weight: 800;
  color: #7c3aed;
  white-space: nowrap;
  flex-shrink: 0;
}

.tkpay-currency {
  font-size: 13px;
  font-weight: 700;
}

/* Selected Summary Box */
.tkpay-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.tkpay-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}

.tkpay-summary-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.4px;
}

.tkpay-summary-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.tkpay-summary-total {
  text-align: right;
  flex-shrink: 0;
}

.tkpay-total-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

.tkpay-total-amount {
  font-size: 19px;
  font-weight: 900;
  color: #059669;
}

.tkpay-summary-features {
  font-size: 11.5px;
  color: #475569;
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.tkpay-summary-features i {
  color: #10b981;
  margin-top: 2px;
  flex-shrink: 0;
}

/* 3-Step Process Box */
.tkpay-steps-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.tkpay-steps-title {
  color: #166534;
  font-weight: 800;
  font-size: 12px;
  display: block;
  margin-bottom: 6px;
}

.tkpay-steps-title i {
  margin-right: 4px;
}

.tkpay-steps-list {
  margin: 0;
  padding-left: 18px;
  color: #15803d;
  font-size: 12px;
  line-height: 1.55;
}

.tkpay-steps-list li span {
  color: #166534;
}

.tkpay-steps-list strong {
  color: #0f172a;
}

.tkpay-guarantee-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

.tkpay-guarantee-badge i {
  color: #059669;
  font-size: 13px;
  flex-shrink: 0;
}

/* Right Column: QR Card & Actions */
.tkpay-qr-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.tkpay-qr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tkpay-qr-title {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.tkpay-qr-title i {
  color: #7c3aed;
  margin-right: 4px;
}

.tkpay-qr-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
}

.tkpay-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: tkpayPulse 1.5s ease-in-out 3;
}

.tkpay-qr-frame {
  display: inline-block;
  background: #ffffff;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tkpay-qr-img {
  width: 175px;
  height: 175px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

.tkpay-upi-apps {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tkpay-dot {
  color: #cbd5e1;
}

/* UPI ID Bar */
.tkpay-upi-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  gap: 8px;
}

.tkpay-upi-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tkpay-upi-lbl {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.5px;
}

.tkpay-upi-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.tkpay-copy-btn {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tkpay-copy-btn:hover {
  background: #ddd6fe;
  color: #5b21b6;
}

.tkpay-copy-btn.tkpay-copied {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

/* WhatsApp Primary Action Button */
.tkpay-action-shell {
  margin-bottom: 10px;
}

.tkpay-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 800;
  padding: 13px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
  border: 0;
}

.tkpay-wa-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  box-shadow: 0 6px 20px rgba(4, 120, 87, 0.45);
}

.tkpay-wa-btn i {
  font-size: 20px;
}

.tkpay-action-sub {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  margin: 5px 0 0 0;
}

.tkpay-action-sub i {
  color: #059669;
}

/* Help Wrap */
.tkpay-help-wrap {
  text-align: center;
  margin: 8px 0;
}

.tkpay-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #047857;
  text-decoration: none;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.tkpay-help-link:hover {
  background: #d1fae5;
  color: #065f46;
}

/* Policies Footer */
.tkpay-policies {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 10px;
  line-height: 1.45;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
}

.tkpay-policies p {
  margin: 0 0 4px 0;
  color: #64748b;
  font-weight: 500;
}

.tkpay-policy-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tkpay-policy-links a {
  color: #6d28d9;
  text-decoration: none;
  font-weight: 600;
}

.tkpay-policy-links a:hover {
  text-decoration: underline;
}

/* ---- QR Blur / Reveal ---- */
.tkpay-qr-frame {
  position: relative;
  display: flex;
  justify-content: center;
}

.tkpay-qr-blurred {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.tkpay-qr-reveal-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.tkpay-qr-reveal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45);
  transition: transform 0.18s, box-shadow 0.18s;
}

.tkpay-qr-reveal-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.6);
}

.tkpay-qr-hide-row {
  text-align: center;
  margin: 4px 0 2px;
}

.tkpay-qr-hide-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.tkpay-qr-hide-btn:hover {
  background: #e2e8f0;
}

/* ---- Terms & Conditions Checkbox ---- */
.tkpay-terms-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 4px;
}

.tkpay-terms-label:hover {
  border-color: #a78bfa;
}

.tkpay-terms-label.tkpay-terms-checked {
  border-color: #7c3aed;
  background: #faf5ff;
}

.tkpay-terms-cb {
  flex-shrink: 0;
  margin-top: 2px;
  width: 15px;
  height: 15px;
  accent-color: #7c3aed;
  cursor: pointer;
}

.tkpay-terms-label a {
  color: #6d28d9;
  font-weight: 600;
  text-decoration: none;
}

.tkpay-terms-label a:hover {
  text-decoration: underline;
}

.tkpay-terms-error {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #dc2626;
  padding: 3px 2px;
  margin-bottom: 4px;
}

.tkpay-terms-error.tkpay-terms-err--show {
  display: flex;
}

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

.tkpay-terms-label.tkpay-terms-shake {
  animation: tkpayShake 0.5s ease;
}

/* ---- WhatsApp button locked state ---- */
.tkpay-wa-btn.tkpay-wa-locked {
  background: #94a3b8 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
  filter: none !important;
  opacity: 0.75;
}

/* Mobile Screens */
@media (max-width: 679px) {
  .tkpay-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .tkpay-modal {
    border-radius: 20px 20px 0 0;
    max-height: 94vh;
    width: 100%;
  }

  .tkpay-head {
    padding: 16px 18px;
  }

  .tkpay-title {
    font-size: 18px;
  }

  .tkpay-body {
    padding: 14px;
  }

  .tkpay-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tkpay-qr-card {
    padding: 10px;
    margin-bottom: 10px;
  }

  .tkpay-qr-img {
    width: 160px;
    height: 160px;
  }

  .tkpay-pkg-card {
    padding: 10px 12px;
    gap: 10px;
  }

  .tkpay-pkg-title {
    font-size: 13px;
  }

  .tkpay-pkg-price {
    font-size: 16px;
  }

  .tkpay-wa-btn {
    font-size: 14px;
    padding: 12px 14px;
  }
}

/* Animations */
@keyframes tkpayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tkpayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes tkpaySlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tkpayPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}
