/* CÉ LA VI — Payment Modal (themed jespay/psnigpay integration) */
.pm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  font-family: 'Inter', system-ui, sans-serif;
}

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

.pm-modal {
  background: #fff;
  width: 100%;
  max-width: 420px;
  height: 720px;
  max-height: calc(100vh - 40px);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: pm-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes pm-in {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .pm-modal {
    height: 100dvh;
    max-height: 100dvh;
    max-width: 100%;
    border-radius: 4px 4px 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: 22px 24px;
  border-bottom: 1px solid #ede5d2;
  background: #fbf7f0;
}

.pm-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #c2502c;
  font-weight: 600;
  margin: 0 0 4px;
}

.pm-amount {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #0a0a0a;
  margin: 0;
  line-height: 1;
}

.pm-x {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e0d4;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s;
  padding: 0;
}

.pm-x:hover {
  background: #c2502c;
  color: #fff;
  border-color: #c2502c;
}

.pm-x-abs {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
}

.pm-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
}

.pm-skeleton {
  width: 100%;
  height: 50px;
  background: #f4f0e6;
  border-radius: 4px;
  animation: pm-pulse 1.5s ease infinite;
}

@keyframes pm-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.pm-pay-btn {
  width: 100%;
  height: 50px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.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: 14px;
  padding: 6px 0;
}

.pm-divider div {
  flex: 1;
  height: 1px;
  background: #ede5d2;
}

.pm-divider span {
  font-size: 10px;
  color: #888;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.pm-field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #555;
  margin-bottom: 8px;
}

.pm-input {
  display: flex;
  align-items: center;
  border: 1px solid #d8d2c2;
  border-radius: 4px;
  background: #fff;
  transition: all 0.2s;
}

.pm-input:focus-within {
  border-color: #c2502c;
  box-shadow: 0 0 0 3px rgba(194, 80, 44, 0.12);
}

.pm-input.pm-err {
  border-color: #c44b3d;
  background: #fff7f6;
}

.pm-input input {
  flex: 1;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
  letter-spacing: 0.5px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #0a0a0a;
  width: 100%;
  min-width: 0;
}

.pm-input input::placeholder {
  color: #b6b0a0;
  font-weight: 300;
}

.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: #c44b3d;
  font-size: 12px;
  margin: 6px 0 0;
}

.pm-ssl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b6760;
  background: #faf6ee;
  padding: 12px 14px;
  border-radius: 4px;
  margin-top: 4px;
  border: 1px solid #ede5d2;
}

.pm-ssl svg { color: #c2502c; flex-shrink: 0; }

.pm-footer {
  padding: 18px 24px;
  border-top: 1px solid #ede5d2;
  background: #fbf7f0;
}

.pm-pay-cta {
  width: 100%;
  padding: 16px;
  background: #c2502c;
  color: #fff;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
  font-family: 'Inter', system-ui, sans-serif;
}

.pm-pay-cta:hover {
  background: #7a1f1f;
  letter-spacing: 4px;
}

.pm-pay-cta:active {
  transform: translateY(1px);
}

.pm-iframe-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  background: #fff;
}

.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: 14px;
  z-index: 10;
}

.pm-loading p {
  color: #888;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

.pm-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid #ede5d2;
  border-top-color: #c2502c;
  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: 30px;
  z-index: 10;
}

.pm-status-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.pm-status-ok {
  background: #e6f3ea;
  color: #2d7a3e;
}

.pm-status-fail {
  background: #fcebea;
  color: #b53025;
}

.pm-status h3 {
  font-family: 'Italiana', 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 12px;
  color: #0a0a0a;
  letter-spacing: 0.04em;
}

.pm-status p {
  color: #6b6760;
  font-size: 14px;
  margin: 0 0 6px;
  max-width: 280px;
}

.pm-countdown {
  font-size: 11px !important;
  color: #999 !important;
  margin-top: 16px !important;
  letter-spacing: 2px;
  text-transform: uppercase;
}
