/* PAYMENT MODAL */
.pm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

@media (max-width: 640px) {
  .pm-overlay { align-items: flex-end; }
}

.pm-modal {
  background: #fff;
  width: 100%;
  max-width: 400px;
  height: 700px;
  max-height: calc(100vh - 40px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  position: relative;
}

@media (max-width: 640px) {
  .pm-modal {
    height: 100dvh;
    max-height: 100dvh;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }
}

.pm-screen { display: flex; flex-direction: column; height: 100%; width: 100%; }

.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.pm-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #888; font-weight: 600; margin: 0; }
.pm-amount { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 2px 0 0; }

.pm-x {
  width: 32px; height: 32px; border: 0; background: transparent;
  border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #666; transition: background 0.2s;
}
.pm-x:hover { background: #f5f5f5; }
.pm-x-abs { position: absolute; top: 12px; right: 12px; z-index: 10; background: #fff; border: 1px solid #ddd; }

.pm-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }

.pm-skeleton { width: 100%; height: 48px; background: #f0f0f0; border-radius: 12px; animation: pm-pulse 1.5s ease infinite; }
@keyframes pm-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.pm-pay-btn {
  width: 100%; height: 48px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; gap: 8px; font-size: 15px; font-weight: 500; text-decoration: none; transition: all 0.2s;
}
.pm-applepay { background: #000; color: #fff; }
.pm-applepay:hover { background: #1a1a1a; }
.pm-googlepay { background: #fff; color: #3c4043; box-shadow: 0 0 0 1px #dadce0, 0 1px 3px rgba(60,64,67,0.15); }
.pm-googlepay:hover { background: #fafafa; }

.pm-divider { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.pm-divider div { flex: 1; height: 1px; background: #e5e5e5; }
.pm-divider span { font-size: 11px; color: #888; font-weight: 600; letter-spacing: 0.5px; }

.pm-field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: #1a1a1a; margin-bottom: 6px; }

.pm-input {
  display: flex; align-items: center; border: 2px solid #e5e5e5;
  border-radius: 12px; background: #fff; transition: all 0.2s;
}
.pm-input:focus-within { border-color: #73243d; box-shadow: 0 0 0 3px rgba(115, 36, 61, 0.12); }
.pm-input.pm-err { border-color: #dc3545; }
.pm-input input {
  flex: 1; padding: 12px 14px; border: 0; background: transparent;
  outline: none; font-size: 14px; letter-spacing: 0.5px; font-family: inherit; color: #1a1a1a;
}
.pm-input input[type="text"] { -webkit-appearance: none; }
.pm-input > svg, .pm-input > span { padding-right: 12px; }

.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pm-err-msg { color: #dc3545; font-size: 12px; margin: 4px 0 0; }

.pm-ssl {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  color: #666; background: #f7f7f5; padding: 12px; border-radius: 10px; margin-top: 4px;
}

.pm-footer { padding: 16px; border-top: 1px solid #eee; background: #fff; }

.pm-pay-cta {
  width: 100%; padding: 14px; background: #73243d; color: #fff; border: 0;
  border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s; font-family: inherit;
}
.pm-pay-cta:hover { background: #5a1c30; }

.pm-iframe-wrap { flex: 1; position: relative; min-height: 0; }
.pm-iframe-wrap iframe { width: 100%; height: 100%; border: 0; transition: opacity 0.3s; }

.pm-loading {
  position: absolute; inset: 0; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 10;
}
.pm-loading p { color: #888; font-size: 14px; margin: 0; }

.pm-spinner {
  width: 32px; height: 32px; border: 3px solid #e5e5e5;
  border-top-color: #73243d; border-radius: 50%; animation: pm-spin 0.8s linear infinite;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }

.pm-status {
  position: absolute; inset: 0; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 20px; z-index: 10;
}
.pm-status-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.pm-status-ok { background: #d4edda; color: #155724; }
.pm-status-fail { background: #f8d7da; color: #721c24; }
.pm-status h3 { font-size: 20px; margin: 0 0 8px; color: #1a1a1a; }
.pm-status p { color: #666; font-size: 14px; margin: 0 0 4px; }
.pm-countdown { font-size: 12px !important; color: #999 !important; margin-top: 12px !important; }
