/* PayKit Drop-In Dark-Mode Checkout Modal — Zero Dependencies */

.pk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: #e6edf3;
  animation: pkFadeIn 0.16s ease-out;
}

.pk-backdrop[hidden] {
  display: none !important;
}

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

.pk-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #111622 0%, #0b0f18 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.08) inset;
  padding: 22px 22px 20px;
  box-sizing: border-box;
}

.pk-modal *, .pk-modal *::before, .pk-modal *::after {
  box-sizing: border-box;
}

.pk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.pk-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.pk-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #94a3b8;
}

.pk-price-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.pk-close {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.pk-close:hover {
  background: rgba(148, 163, 184, 0.22);
  color: #fff;
}

.pk-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  margin-bottom: 16px;
}

.pk-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 6px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.pk-tab:hover {
  color: #e2e8f0;
}

.pk-tab.pk-active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(16, 185, 129, 0.18));
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35) inset;
}

.pk-rec-dot {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #34d399;
  margin-top: 2px;
}

.pk-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 14px;
}

.pk-pay-grid {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 14px;
  align-items: center;
}

@media (max-width: 440px) {
  .pk-pay-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.pk-qr-box {
  width: 124px;
  height: 124px;
  padding: 8px;
  background: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pk-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.pk-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.pk-amount-big {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.pk-fee-note {
  font-size: 12px;
  color: #34d399;
  margin-bottom: 10px;
}

.pk-addr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  padding: 7px 9px;
}

.pk-addr-code {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-btn-copy {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.pk-btn-copy:hover {
  background: rgba(56, 189, 248, 0.25);
}

.pk-btn-primary {
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #03151e;
  background: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  cursor: pointer;
  transition: transform 0.12s, filter 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.pk-btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.pk-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pk-btn-secondary {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.6);
  cursor: pointer;
  transition: background 0.15s;
}

.pk-btn-secondary:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.8);
}

.pk-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pk-divider::before,
.pk-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.15);
}

.pk-input-row {
  display: flex;
  gap: 8px;
}

.pk-input {
  width: 100%;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  color: #f8fafc;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  outline: none;
}

.pk-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.16);
}

.pk-input-text {
  font-family: inherit;
  margin-bottom: 8px;
}

.pk-btn-verify {
  flex-shrink: 0;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.pk-btn-verify:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.3);
}

.pk-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  display: none;
}

.pk-status.pk-show {
  display: block;
}

.pk-status.pk-info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #bae6fd;
}

.pk-status.pk-ok {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.pk-status.pk-err {
  background: rgba(244, 63, 94, 0.13);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

.pk-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
}

.pk-trust {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
