/* Shared 39-yuan checkout presentation. */
.service-payment-modal-card { --muted: #aab7ca; --cta-purple: #6f4dff; --text: #f4f7fb; --cyan: #6ee7ff; --green: #33d69f; --line: rgba(170,183,202,.24); color: #f4f7fb; }
.service-payment-modal {
  position: fixed;
  z-index: 1600;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.72);
  padding: 24px;
  backdrop-filter: blur(8px);
}

.service-payment-modal[hidden] {
  display: none;
}

.service-payment-modal-open {
  overflow: hidden;
}

.service-payment-modal-card {
  position: relative;
  width: min(480px, 100%);
  border: 1px solid rgba(110, 231, 255, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(110, 231, 255, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(111, 77, 255, 0.14), transparent 44%),
    #080d16;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
  padding: 24px;
  text-align: center;
}

.service-payment-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.service-payment-eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-payment-modal-card h2 {
  margin: 0 0 16px;
  padding: 0 36px;
  color: #fff;
  font-size: 28px;
  letter-spacing: 0;
}

.service-payment-modal-qr {
  position: relative;
  display: grid;
  width: 260px;
  height: 260px;
  place-items: center;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 12px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.service-payment-modal-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-payment-modal-loader {
  display: grid;
  gap: 12px;
  place-items: center;
  color: #1d2635;
  font-size: 13px;
  font-weight: 900;
}

.service-payment-modal-loader i {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  background: conic-gradient(from 0deg, transparent, var(--cta-purple), var(--cyan), transparent 78%);
  animation: service-payment-spin 1.05s linear infinite;
}

.service-payment-modal-loader i::before,
.service-payment-modal-loader i::after {
  position: absolute;
  content: "";
  opacity: 0;
}

.service-payment-modal-qr.is-success .service-payment-modal-loader i {
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(51, 214, 159, 0.16);
  animation: service-payment-status-pop 0.34s ease-out;
}

.service-payment-modal-qr.is-success .service-payment-modal-loader i::before {
  top: 19px;
  left: 16px;
  width: 25px;
  height: 13px;
  border-bottom: 5px solid #fff;
  border-left: 5px solid #fff;
  border-radius: 2px;
  opacity: 1;
  transform: rotate(-45deg);
  animation: service-payment-mark-pop 0.22s ease-out 0.08s both;
}

.service-payment-modal-qr.is-error .service-payment-modal-loader i {
  background: #ff4e6f;
  box-shadow: 0 0 0 8px rgba(255, 78, 111, 0.16);
  animation: service-payment-status-pop 0.34s ease-out;
}

.service-payment-modal-qr.is-error .service-payment-modal-loader i::before,
.service-payment-modal-qr.is-error .service-payment-modal-loader i::after {
  top: 27px;
  left: 15px;
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
  opacity: 1;
  animation: service-payment-mark-pop 0.22s ease-out 0.08s both;
}

.service-payment-modal-qr.is-error .service-payment-modal-loader i::before {
  transform: rotate(45deg);
}

.service-payment-modal-qr.is-error .service-payment-modal-loader i::after {
  transform: rotate(-45deg);
}

.service-payment-modal-qr.is-link-only .service-payment-modal-loader i {
  background: linear-gradient(135deg, var(--cyan), var(--cta-purple));
  animation: none;
}

.service-payment-modal-meta strong {
  display: block;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.service-payment-modal-meta p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.service-payment-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.service-payment-modal-actions[data-visible-actions="1"] {
  grid-template-columns: 1fr;
}

.service-payment-modal-actions[data-visible-actions="2"],
.service-payment-modal-actions[data-visible-actions="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-payment-modal-actions[data-visible-actions="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-payment-modal-actions [hidden] {
  display: none;
}

.service-payment-modal-actions a,
.service-payment-modal-actions button {
  display: grid;
  min-height: 44px;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  padding: 0 10px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.service-payment-primary {
  border: 0;
  background: linear-gradient(135deg, var(--cta-purple), #4f8dff);
  color: #fff;
}

.service-payment-secondary {
  border: 1px solid rgba(110, 231, 255, 0.28);
  background: rgba(110, 231, 255, 0.09);
  color: #fff;
}

@keyframes service-payment-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes service-payment-status-pop {
  0% {
    transform: scale(0.84);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes service-payment-mark-pop {
  0% {
    transform: scale(0.72) rotate(-45deg);
  }
}

@media (max-width: 560px) {
  .service-payment-modal {
    align-items: end;
    padding: 12px;
  }

  .service-payment-modal-card {
    padding: 22px 16px 16px;
  }

  .service-payment-modal-card h2 {
    font-size: 24px;
  }

  .service-payment-modal-qr {
    width: min(232px, calc(100vw - 74px));
    height: min(232px, calc(100vw - 74px));
  }

  .service-payment-modal-actions,
  .service-payment-modal-actions[data-visible-actions] {
    grid-template-columns: 1fr;
  }

  .service-result-actions,
  .service-result-actions[data-visible-actions] {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="light"] .service-payment-modal {
  background: rgba(16, 32, 51, 0.42) !important;
  backdrop-filter: blur(10px);
}

:root[data-theme="light"] .service-payment-modal-card {
  border-color: rgba(101, 84, 255, 0.22) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(47, 120, 255, 0.1), transparent 42%),
    linear-gradient(135deg, rgba(101, 84, 255, 0.08), transparent 46%),
    #ffffff !important;
  color: #102033 !important;
  box-shadow: 0 28px 90px rgba(22, 38, 67, 0.24) !important;
}

:root[data-theme="light"] .service-payment-modal-close {
  border-color: rgba(31, 51, 83, 0.14) !important;
  background: #f4f6fb !important;
  color: #102033 !important;
}

:root[data-theme="light"] .service-payment-modal-close:hover {
  background: #e9eef7 !important;
}

:root[data-theme="light"] .service-payment-eyebrow {
  color: #135f9c !important;
}

:root[data-theme="light"] .service-payment-modal-card h2,
:root[data-theme="light"] .service-payment-modal-meta strong {
  color: #102033 !important;
}

:root[data-theme="light"] .service-payment-modal-meta p {
  color: #526178 !important;
}

:root[data-theme="light"] .service-payment-modal-qr {
  box-shadow: 0 18px 44px rgba(22, 38, 67, 0.16) !important;
}

:root[data-theme="light"] .service-payment-secondary {
  border-color: rgba(47, 120, 255, 0.22) !important;
  background: #edf6ff !important;
  color: #135f9c !important;
}

:root[data-theme="light"] .service-payment-secondary:hover {
  background: #e4f0ff !important;
}

:root[data-theme="light"] .service-payment-primary {
  border: 1px solid rgba(101, 84, 255, 0.22) !important;
  background: linear-gradient(135deg, #6d55ee, #4f7ff3) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(101, 84, 255, 0.2) !important;
}

/* Shared payment card used by all product and account checkout entry points. */
.payment-view-detail,.payment-view-note { color: var(--muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.payment-view-error { color: #ffb5bd; line-height: 1.5; }
.payment-view-wallet { width: 100%; margin-top: 12px; padding: 12px; border-radius: 8px; cursor: pointer; font: inherit; }
.payment-view-wallet[hidden],.service-payment-modal-card [hidden] { display: none !important; }
.sms-dialog.sms-payment-dialog { padding: 0; border: 0; background: transparent; color: var(--text); width: min(480px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; }
.sms-dialog.sms-payment-dialog .sms-dialog-body { padding: 0; }
.sms-payment-dialog .service-payment-modal-card { box-sizing: border-box; width: 100%; }
.sms-dialog.sms-payment-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.service-payment-modal-card { box-sizing: border-box; max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 520px) { .service-payment-modal { padding: 16px; } .service-payment-modal-card { padding: 22px 18px; } .service-payment-modal-actions { grid-template-columns: 1fr 1fr !important; } .service-payment-modal-actions[data-visible-actions="1"] { grid-template-columns: 1fr !important; } .service-payment-modal-actions button,.service-payment-modal-actions a { white-space: normal; padding: 10px; } }
