/* MitraKSB Landing Checkout Modal — isolated namespace (mk-lcheckout-*).
   Visual only. v3: quiet premium dark panel. 90% neutral / 10% accent.
   One restrained MitraKSB blue (#2563EB). No cyan, no violet, no gradients,
   no glow. Hierarchy via typography, not color. */

.mk-lcheckout-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.mk-lcheckout-root.is-open { display: block; }

.mk-lcheckout-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html.mk-lcheckout-lock,
html.mk-lcheckout-lock body {
  overflow: hidden !important;
}

.mk-lcheckout-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(820px, calc(100vw - 32px));
  max-height: 86vh;
  overflow: auto;
  background: #151820;
  color: #F5F7FA;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
  outline: none;
}

/* ---------- header ---------- */
.mk-lcheckout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 26px 12px;
}

.mk-lcheckout-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mk-lcheckout-brand img { width: 28px; height: 28px; border-radius: 8px; }

.mk-lcheckout-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1px;
  color: #9AA3B2;
}

.mk-lcheckout-subtitle {
  font-size: 11px;
  color: #6B7280;
  margin-top: 2px;
}

.mk-lcheckout-x {
  background: rgba(255, 255, 255, 0.03);
  color: #9AA3B2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.mk-lcheckout-x:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #F5F7FA;
}

.mk-lcheckout-x:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.7); outline-offset: 2px; }

/* ---------- body: flat composition (no nested cards) ---------- */
.mk-lcheckout-body { padding: 6px 26px 26px; }

.mk-lcheckout-section { padding: 0; margin: 0; border: 0; background: transparent; }

.mk-lcheckout-section + .mk-lcheckout-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.mk-lcheckout-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6B7280;
  margin-bottom: 10px;
  font-weight: 600;
}

.mk-lcheckout-plan-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #F5F7FA;
}

.mk-lcheckout-plan-price {
  font-size: 14px;
  font-weight: 600;
  color: #F5F7FA;
  margin-top: 4px;
}

.mk-lcheckout-plan-credits {
  font-size: 12.5px;
  color: #9AA3B2;
  margin-top: 2px;
}

/* ---------- duration ---------- */
.mk-lcheckout-months { display: flex; gap: 10px; flex-wrap: wrap; }

.mk-lcheckout-month {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9AA3B2;
  border-radius: 11px;
  padding: 10px 18px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.mk-lcheckout-month:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: #F5F7FA;
}

.mk-lcheckout-month[aria-pressed="true"] {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.65);
  color: #F5F7FA;
  font-weight: 700;
}

.mk-lcheckout-month:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.7); outline-offset: 2px; }

/* ---------- total ---------- */
.mk-lcheckout-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.mk-lcheckout-total-row .mk-lcheckout-label { margin: 0; }

.mk-lcheckout-total { font-size: 22px; font-weight: 800; letter-spacing: -0.2px; color: #F5F7FA; }

.mk-lcheckout-total-hint { font-size: 11px; color: #6B7280; margin-top: 6px; }

/* ---------- benefits ---------- */
.mk-lcheckout-benefits { display: grid; gap: 10px; }

.mk-lcheckout-benefit {
  font-size: 13.5px;
  line-height: 1.5;
  color: #9AA3B2;
}

.mk-lcheckout-benefit::before {
  content: "\2713";
  color: rgba(37, 99, 235, 0.85);
  font-weight: 600;
  margin-right: 9px;
}

/* ---------- alert ---------- */
.mk-lcheckout-alert {
  display: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 16px;
  border: 1px solid rgba(217, 180, 90, 0.22);
  background: rgba(217, 180, 90, 0.08);
  color: #D9C38A;
}

.mk-lcheckout-alert.error {
  border-color: rgba(224, 133, 133, 0.24);
  background: rgba(224, 133, 133, 0.08);
  color: #E3A8A8;
}

.mk-lcheckout-alert.is-show { display: block; }

/* ---------- actions ---------- */
.mk-lcheckout-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Primary CTA: solid restrained brand blue. No gradient, no glow. */
.mk-lcheckout-btn-primary {
  flex: 1 1 240px;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  color: #FFFFFF;
  text-align: center;
  background: #2563EB;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.1s ease;
}

.mk-lcheckout-btn-primary:hover { filter: brightness(1.06); }
.mk-lcheckout-btn-primary:active { transform: translateY(1px); }
.mk-lcheckout-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }

/* Secondary = quiet ghost. */
.mk-lcheckout-btn-secondary {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #9AA3B2;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.mk-lcheckout-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #F5F7FA;
}

.mk-lcheckout-btn-primary:focus-visible,
.mk-lcheckout-btn-secondary:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.7); outline-offset: 2px; }

/* ---------- QR / payment state ---------- */
.mk-lcheckout-qr-panel { text-align: center; }

.mk-lcheckout-qr-img {
  width: 224px;
  height: 224px;
  max-width: 70vw;
  max-height: 70vw;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 8px;
  margin: 10px auto 8px;
  display: block;
}

.mk-lcheckout-timer { font-size: 12px; color: #6B7280; display: block; margin-top: 4px; }

.mk-lcheckout-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

.mk-lcheckout-kv:last-of-type { border-bottom: 0; }

.mk-lcheckout-kv-key { color: #6B7280; }

.mk-lcheckout-kv-val { font-weight: 600; color: #F5F7FA; word-break: break-all; text-align: right; }

.mk-lcheckout-status {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  font-size: 13px;
  color: #9AA3B2;
}

.mk-lcheckout-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D9B45A;
  display: inline-block;
}

.mk-lcheckout-dot.paid { background: #7BC98F; }
.mk-lcheckout-dot.bad { background: #E08585; }

/* ---------- inputs (account claim) ---------- */
.mk-lcheckout-field { margin-top: 14px; text-align: left; }

.mk-lcheckout-field label { font-size: 12px; color: #6B7280; }

.mk-lcheckout-field input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  color: #F5F7FA;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
}

.mk-lcheckout-field input:focus { outline: none; border-color: rgba(37, 99, 235, 0.65); }

/* ---------- success / terminal ---------- */
.mk-lcheckout-state-title { font-size: 18px; font-weight: 800; color: #F5F7FA; }

.mk-lcheckout-state-text { font-size: 13px; color: #9AA3B2; margin-top: 8px; line-height: 1.5; }

.mk-lcheckout-success-badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 6px auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #FFFFFF;
  background: #2563EB;
  font-weight: 700;
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .mk-lcheckout-dialog {
    width: calc(100vw - 16px);
    max-height: 94dvh;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    transform: none;
    border-radius: 20px;
  }

  .mk-lcheckout-head { padding: 16px 18px 10px; }

  .mk-lcheckout-body { padding: 4px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }

  .mk-lcheckout-actions { flex-direction: column; align-items: stretch; }

  .mk-lcheckout-btn-primary,
  .mk-lcheckout-btn-secondary { flex: 1 1 auto; width: 100%; }

  .mk-lcheckout-qr-img { max-width: 82vw; max-height: 82vw; }
}
