/* Payment / KHQR checkout styles, extracted from style.css for the
   Kongming clone product page. Generated - do not hand-edit. */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1001;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.modal-content {
  background-color: #bebebe;
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  max-width: 300px;
  position: relative;
  margin: auto;
}

.modal-content.pay-sheet {
  background: #f4f6fb;
  border-radius: 22px;
  padding: 20px 18px 18px;
  max-width: 360px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: #0f172a;
}

.pay-sheet .close {
  color: #64748b;
  font-size: 26px;
  line-height: 1;
  top: 12px;
  right: 14px;
}

.pay-sheet .close:hover { color: #0f172a; }

.pay-status {
  text-align: center;
  font-size: 0.82rem;
  color: #475569;
  margin-top: 12px;
  line-height: 1.45;
}

.pay-countdown {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 9px;
  padding: 8px 10px;
  margin-top: 10px;
}

.pay-countdown:empty { display: none; }

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
}

.qr-container {
  background-color: #ffffff;
  padding: 0 0 12px;
  border-radius: 18px;
  margin: 14px auto 0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
  text-align: center;
  max-width: 300px;
  overflow: hidden;
}

.qr-header {
  position: relative;
  background-color: #e30613;
  color: #fff;
  font-weight: bold;
  padding: 13px 12px;
  font-size: 18px;
  overflow: hidden;
}

.qr-header-mark {
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.07em;
  font-size: 1.15rem;
}

.qr-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 26px 26px 0;
  border-style: solid;
  border-color: #ffffff transparent;
}

.qr-details {
  margin: 0;
  padding: 10px 16px 0;
  font-size: 16px;
  color: #000000;
  font-weight: 500;
  text-align: left;
}

.qr-merchant {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

.qr-image {
  position: relative;
  background-color: #ffffff;
  padding: 6px 10px 4px;
  border-radius: 8px;
}

.qr-scanline {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 10px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #e30613, transparent);
  animation: qrScan 2.4s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.85;
}

@keyframes qrScan {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(190px); }
}

@media (prefers-reduced-motion: reduce) {
.qr-scanline { animation: none; opacity: 0; }
}

.qr-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.68rem;
  color: #64748b;
  padding: 4px 12px 0;
}

.qr-foot-logo { height: 15px; width: auto; }

#bakongQR {
  width: 100%;
  height: auto;
  max-width: 220px;
  display: block;
  margin: 0 auto;
}

.qr-line {
  border: none;
  border-top: 1px dashed #000000; 
  margin: 8px 0;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.bakong-btn {
  padding: 10px 15px;
  min-width: 100px;
}

.pay-sheet .modal-buttons {
  margin-top: 12px;
  gap: 8px;
}

.pay-sheet .bakong-btn {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-radius: 11px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  background: #0f172a;
  color: #fff;
  transition: opacity 0.15s ease;
}

.pay-sheet .bakong-btn:hover:not(:disabled) { opacity: 0.88; }

.pay-sheet .bakong-btn:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.pay-sheet .bakong-btn.btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.pay-sheet .bakong-btn.btn-ghost:hover { background: #e2e8f0; }

.pay-sheet .aba-actions { margin: 12px 0 2px; }

.pay-sheet .aba-pay-link {
  color: #0a3d62;
  background: #e8eef7;
  border-color: #c7d6ea;
}

.pay-sheet .aba-auto-label { color: #475569; opacity: 1; }

@media (max-width: 320px) {
.modal-content {
    width: 90%;
  }
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}

.aba-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin: 14px 0 4px;
}

.aba-open-btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0072bc, #00a0e3);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 114, 188, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 210px;
  text-align: center;
}

.aba-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 114, 188, 0.5);
}

.aba-open-btn:active { transform: translateY(0); }

.aba-pay-link {
  color: #0a3d62;
  background: rgba(255, 255, 255, 0.92);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0, 114, 188, 0.35);
}

.aba-pay-link:hover { background: #fff; }

.aba-auto-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  opacity: 0.85;
  cursor: pointer;
  user-select: none;
}

.aba-auto-label input { cursor: pointer; }

.payway-modal {
  background: #9aa7bf;                     
  align-items: flex-start;
  padding: 0;
}

.payway {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px 26px;
  box-sizing: border-box;
}

.payway-brand {
  width: 100%;
  max-width: 980px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: auto;
  position: relative;
  color: #fff;
}

.pw-aba {
  font-family: 'Anton', Arial, sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0.16em;
  font-weight: 400;
}

.pw-aba i { color: #e30613; font-style: normal; }

.pw-payway {
  font-family: 'Anton', Arial, sans-serif;
  font-size: 1.5rem;
  font-style: italic;
  letter-spacing: 0.04em;
  margin-left: 4px;
}

.payway-close {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 30px;
  line-height: 1;
  color: #fff;
  opacity: 0.85;
  cursor: pointer;
}

.payway-close:hover { opacity: 1; }

.payway-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  width: 100%;
  max-width: 700px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(20, 32, 58, 0.28);
  margin: auto 0;
}

.pw-left {
  padding: 18px 20px 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eef1f6;
}

.pw-back {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  align-self: flex-start;
}

.pw-back:hover { background: #f1f5f9; }

.pw-merchant {
  text-align: center;
  padding: 16px 0 26px;
  flex: 1;
}

.pw-merchant-logo {
  /* Wide wordmark: never crop it into a circle. */
  width: auto;
  max-width: 160px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 10px;
}

.pw-merchant-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 18px;
}

.pw-amount-label {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 2px;
}

.pw-amount {
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.pw-amount sup {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 3px;
}

.pw-totals {
  background: #f7f9fc;
  margin: 0 -20px;
  padding: 12px 20px 16px;
  font-size: 0.8rem;
  color: #475569;
}

.pw-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.pw-row:first-child { border-bottom: 1px dashed #cbd5e1; padding-bottom: 8px; }

.pw-row-total { padding-top: 8px; font-weight: 600; color: #0f172a; }

.pw-right { padding: 20px 20px 22px; }

.pw-title {
  font-size: 1.12rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 14px;
}

.pw-method {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e6eaf1;
  border-radius: 11px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.pw-method:hover:not(.is-soon) {
  border-color: #0072bc;
  box-shadow: 0 3px 12px rgba(0, 114, 188, 0.14);
}

.pw-m-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
}

.pw-m-card   { background: #1f6feb; }

.pw-m-wechat { background: #09b83e; }

.pw-m-alipay { background: #1677ff; }

.pw-m-text { flex: 1; min-width: 0; }

.pw-m-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
}

.pw-m-sub {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 1px;
}

.pw-chev { color: #cbd5e1; font-size: 1.4rem; line-height: 1; }

.pw-method.is-soon { opacity: 0.6; cursor: not-allowed; background: #fafbfd; }

.pw-method.is-soon .pw-m-icon { filter: grayscale(1); }

.pw-soon {
  font-size: 0.66rem;
  font-weight: 700;
  color: #64748b;
  background: #eef2f7;
  border: 1px solid #dde3ec;
  border-radius: 99px;
  padding: 4px 9px;
  white-space: nowrap;
}

.pw-right .qr-container { margin-top: 0; max-width: 260px; }

.pw-right .pay-status   { color: #475569; }

.pw-right .aba-actions  { margin: 12px 0 2px; }

.pw-right .aba-pay-link { color: #0a3d62; background: #e8eef7; border-color: #c7d6ea; }

.pw-right .aba-auto-label { color: #475569; opacity: 1; }

.pw-right .modal-buttons { margin-top: 12px; gap: 8px; }

.pw-right .bakong-btn {
  flex: 1;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  background: #0f172a;
  color: #fff;
}

.pw-right .bakong-btn:disabled { background: #cbd5e1; color: #64748b; cursor: not-allowed; }

.pw-right .bakong-btn.btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.payway-foot {
  width: 100%;
  max-width: 980px;
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.68rem;
  color: #41506b;
}

.pw-foot-bank {
  background: #0b2b4a;
  color: #fff;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  padding: 4px 9px;
  border-radius: 3px;
}

@media (max-width: 640px) {
.payway { padding: 14px 12px 18px; }
.payway-card { grid-template-columns: 1fr; max-width: 420px; }
.pw-left { border-right: none; border-bottom: 1px solid #eef1f6; padding-bottom: 0; }
.pw-merchant { padding: 10px 0 18px; }
.pw-amount { font-size: 1.6rem; }
.pw-payway, .pw-aba { font-size: 1.2rem; }
.payway-foot { padding-top: 16px; font-size: 0.62rem; }
}

.qr-image {
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-image #bakongQR { max-height: 100%; }

.qr-loading {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  border-radius: 8px;
  z-index: 2;
}

.qr-loading::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 8px;
  background: linear-gradient(100deg, #eef2f7 30%, #f8fafc 50%, #eef2f7 70%);
  background-size: 220% 100%;
  animation: qrShimmer 1.3s ease-in-out infinite;
}

@keyframes qrShimmer {
  0%   { background-position: 130% 0; }
  100% { background-position: -30% 0; }
}

.qr-image.is-loading .qr-loading { display: flex; }

.qr-image.is-loading #bakongQR { visibility: hidden; }

.qr-image.is-loading .qr-scanline { display: none; }

.qr-spinner {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid #e2e8f0;
  border-top-color: #e30613;      
  animation: qrSpin 0.8s linear infinite;
}

@keyframes qrSpin { to { transform: rotate(360deg); } }

.qr-loading-text {
  position: relative;
  text-align: center;
  font-family: 'Dangrek', sans-serif;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.35;
}

.qr-loading-text span {
  display: block;
  font-family: inherit;
  font-size: 0.68rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
.qr-loading::before { animation: none; }
.qr-spinner { animation-duration: 2.4s; }
}

.qr-image.is-expired #bakongQR {
  filter: grayscale(1) opacity(0.35);
}

.qr-image.is-expired::after {
  content: "ផុតកំណត់";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Dangrek', sans-serif;
  font-size: 1rem;
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  z-index: 2;
}

.qr-image.is-expired .qr-scanline { display: none; }

/* Keep the ABA action labels and their trailing icon on one line. */
.aba-open-btn, .aba-pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.aba-open-btn .ic, .aba-pay-link .ic { flex: 0 0 auto; }


/* The QR download control is a <button>, not an <a>: buttons do not inherit
   font/box defaults, so normalise them to match the ABA action links. */
button.aba-open-btn,
button.aba-pay-link {
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
button.aba-pay-link {
  line-height: 1.2;
}
.aba-open-btn:disabled,
.aba-pay-link:disabled { opacity: .6; cursor: default; }


/* Order recap shown above the rails on the "Choose way to pay" page, so the
   customer confirms what they are buying before committing to a method. */
.pw-order {
  margin: 0 0 16px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.pw-o-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.pw-order dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
  flex: 0 0 auto;
}
.pw-order dd {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pw-o-total {
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px dashed #cbd5e1;
}
.pw-o-total dt { color: #0f172a; }
.pw-o-total dd { color: #0072bc; font-size: 0.95rem; }
