@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ============================================================
   NML SUBSCRIPTION PAGE — glassmorphism light
   NML Brand: Blue #2F6BFF · Green #22C55E · Text #0F172A
   ============================================================ */

/* Font NML — token có fallback, áp cho toàn trang subscription */
.nml-sub-wrap,
.nml-sub-wrap * {
  font-family: var(--nml-font, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif) !important;
}

/* ── WRAP ─────────────────────────────────────────────────── */
/* Backstop: nền body cùng gradient (CSS chỉ load trang này) */
body { background: linear-gradient(180deg, #FBFCFE, #EEF3FA) !important; }

.nml-sub-wrap {
  position: relative;
  background: transparent;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ── BG BLOBS ─────────────────────────────────────────────── */
.nml-sub-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, #FBFCFE, #EEF3FA);
}
.nml-sub-blob {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: .06;
}
.nml-sub-blob.b1 { width:600px; height:600px; background:var(--nml-blue, #2F6BFF); top:-200px; right:-100px; }
.nml-sub-blob.b2 { width:400px; height:400px; background:var(--nml-green, #22C55E); bottom:-100px; left:-80px; }

/* ── HEADER ───────────────────────────────────────────────── */
.nml-sub-header {
  position: relative; z-index: 1;
  background: transparent;
}
.nml-sub-header-inner {
  max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
}
.nml-sub-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--nml-text-overline, 11px); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--nml-blue, #2F6BFF);
  margin-bottom: 14px;
}
.nml-sub-eyebrow::before {
  content: ''; width: 18px; height: 2px; border-radius: 2px;
  background: var(--nml-blue, #2F6BFF);
}
.nml-sub-title {
  font-size: var(--nml-text-h1, clamp(28px,5vw,40px)) !important;

  color: var(--nml-tx, #0F172A) !important; margin: 0 0 8px; letter-spacing: -.02em;
  line-height: 1.15;
}
.nml-sub-subtitle { font-size: 15px; color: var(--nml-tx2, #475569); line-height: 1.6; max-width: 560px; margin: 0 auto; }
.nml-sub-subtitle b { color: var(--nml-tx, #0F172A); }

.nml-sub-active-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px;
  background: rgba(34,197,94,.1);
  border: 1.5px solid rgba(34,197,94,.3);
  font-size: 13px; font-weight: 600; color: var(--nml-green-dark, #059669);
  white-space: nowrap;
}
.nml-sub-active-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--nml-green, #22C55E);
  box-shadow: 0 0 0 3px rgba(34,197,94,.25);
  animation: nml-pulse 2s ease-in-out infinite;
}
@keyframes nml-pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,.1); }
}

/* ── TOGGLE ───────────────────────────────────────────────── */
.nml-sub-toggle-wrap {
  position: relative; z-index: 1;
  display: flex; justify-content: center;
  padding: 32px 20px 0;
}
.nml-sub-toggle {
  display: inline-flex;
  background: #fff;
  border: 1.5px solid var(--nml-border, #E2E8F0);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.nml-sub-tog {
  padding: 8px 24px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
  border: none; background: transparent;
  color: var(--nml-tx2, #475569); cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; gap: 8px;
  font-family: inherit;
}
.nml-sub-tog.active {
  background: var(--nml-blue, #2F6BFF); color: #fff;
  box-shadow: 0 4px 12px rgba(47,107,255,.3);
}
.nml-sub-save {
  font-size: 10px; font-weight: 700;
  background: var(--nml-green, #22C55E); color: #fff;
  padding: 2px 6px; border-radius: 6px;
}
.nml-sub-tog.active .nml-sub-save { background: rgba(255,255,255,.25); }

/* ── CARDS ────────────────────────────────────────────────── */
.nml-sub-cards {
  position: relative; z-index: 1;
  max-width: 860px; margin: 28px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 20px;
  align-items: stretch;
}
/* 3 cột: Free · Monthly · Yearly — flex cho chắc chắn đều & thẳng hàng */
.nml-sub-cards.nml-sub-cards-3 {
  max-width: 1280px;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 10px;
}
.nml-sub-cards.nml-sub-cards-3 > .nml-sub-card {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

/* ── CARD BASE – glassmorphism ────────────────────────────── */
.nml-sub-card {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px;
  padding: 28px;
  box-shadow:
    0 4px 24px rgba(15,23,42,.07),
    0 1px 4px rgba(15,23,42,.04),
    inset 0 1px 0 rgba(255,255,255,.95);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.nml-sub-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.9),transparent);
}

/* ── FEATURED CARD ────────────────────────────────────────── */
.nml-sub-card-featured {
  background: rgba(255,255,255,.85);
  border: 2px solid rgba(47,107,255,.25);
  box-shadow:
    0 8px 40px rgba(47,107,255,.12),
    0 2px 8px rgba(47,107,255,.08),
    inset 0 1px 0 rgba(255,255,255,.95);
}

.nml-sub-popular {
  display: inline-flex; align-items: center; align-self: flex-start;
  font-size: 11px; font-weight: 700;
  color: var(--nml-blue, #2F6BFF); letter-spacing: .04em;
  background: rgba(47,107,255,.08);
  border: 1px solid rgba(47,107,255,.2);
  padding: 4px 10px; border-radius: var(--nml-r-pill, 999px);
  margin-bottom: 16px;
}
/* Badge trung tính cho thẻ Free (giữ thẳng hàng với 2 thẻ kia) */
.nml-sub-popular-free {
  color: var(--nml-tx3, #94A3B8) !important;
  background: var(--nml-bg, #F1F5F9) !important;
  border-color: var(--nml-border, #E2E8F0) !important;
}

/* ── CARD TOP ─────────────────────────────────────────────── */
.nml-sub-card-top {
  display: flex; align-items: center;
  gap: 14px; margin-bottom: 20px;
}
.nml-sub-plan-icon {
  width: 48px; height: 48px; border-radius: var(--nml-r-md, 14px);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nml-sub-plan-icon svg { width: 24px; height: 24px; stroke-width: 2; }
.nml-sub-plan-icon.free    { background: var(--nml-bg, #F1F5F9); color: var(--nml-tx2, #475569); }
.nml-sub-plan-icon.premium {
  background: linear-gradient(135deg,rgba(47,107,255,.12),rgba(91,108,255,.18));
  box-shadow: 0 4px 12px rgba(47,107,255,.2);
  color: var(--nml-blue, #2F6BFF);
}
.nml-sub-plan-name {
  font-size: 18px; font-weight: 700;
  color: var(--nml-tx, #0F172A); margin-bottom: 2px;
}
.nml-sub-plan-desc { font-size: 12px; color: var(--nml-tx3, #94A3B8); }

/* ── PRICE ────────────────────────────────────────────────── */
.nml-sub-price-wrap {
  display: flex; align-items: baseline;
  gap: 6px; margin-bottom: 6px; flex-wrap: wrap;
}
.nml-sub-price-amount {
  font-size: 32px; font-weight: 700;
  color: var(--nml-tx, #0F172A); letter-spacing: -.02em;
}
.nml-sub-price-period { font-size: 14px; color: var(--nml-tx3, #94A3B8); }
.nml-sub-price-note {
  width: 100%; font-size: 12px;
  color: var(--nml-green, #22C55E); font-weight: 600; margin-top: 4px;
}

.nml-sub-divider {
  height: 1px; background: #F1F5F9;
  margin: 20px 0;
}

/* ── FEATURES ─────────────────────────────────────────────── */
.nml-sub-features {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.nml-sub-features li {
  display: flex; align-items: center;
  gap: 10px; font-size: 13px; color: var(--nml-tx2, #475569); line-height: 1.4;
}
.nml-sub-features li::before {
  content: ''; width: 18px; height: 18px;
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
}
.nml-sub-features li.yes { color: #334155; }
.nml-sub-features li.yes::before {
  content: '✓';
  background: rgba(34,197,94,.12);
  color: var(--nml-green-dark, #059669); font-weight: 700;
}
.nml-sub-features li.yes.star::before {
  content: '✓';
  background: rgba(47,107,255,.1);
  color: var(--nml-blue, #2F6BFF); font-weight: 700;
}
.nml-sub-features li.no { color: #CBD5E1; }
.nml-sub-features li.no::before {
  content: '✕';
  background: #F1F5F9; color: #CBD5E1;
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.nml-sub-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 13px 20px;
  border-radius: 12px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .2s;
  cursor: pointer; border: none; font-family: inherit;
  letter-spacing: .01em;
}
.nml-sub-btn-primary {
  background: linear-gradient(135deg, var(--nml-blue, #2F6BFF), #5B6CFF);
  color: #fff;
  box-shadow: 0 4px 16px rgba(47,107,255,.35);
}
.nml-sub-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47,107,255,.45);
  color: #fff; text-decoration: none;
}
.nml-sub-btn-ghost {
  background: var(--nml-bg, #F8FAFC); color: var(--nml-tx3, #94A3B8);
  border: 1.5px solid var(--nml-border, #E2E8F0);
  cursor: default;
}
.nml-sub-secure {
  text-align: center; font-size: 11px;
  color: var(--nml-tx3, #94A3B8); margin-top: 10px; margin-bottom: 0;
}

/* ── PERKS SECTION ────────────────────────────────────────── */
.nml-sub-perks {
  position: relative; z-index: 1;
  max-width: 860px; margin: 72px auto 0;
  padding: 0 24px;
}
.nml-sub-perks-title {
  font-size: var(--nml-text-h3, 20px) !important; font-weight: 700 !important;
  color: var(--nml-tx, #0F172A) !important; text-align: center;
  margin-bottom: 24px; letter-spacing: -.01em;
}
.nml-sub-perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.nml-sub-perk {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 16px; padding: 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(15,23,42,.05);
  transition: transform .2s, box-shadow .2s;
}
.nml-sub-perk:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.nml-sub-perk-icon {
  width: 40px; height: 40px; margin: 0 auto 10px;
  border-radius: var(--nml-r-sm, 10px);
  display: flex; align-items: center; justify-content: center;
  background: var(--nml-blue-soft, #EEF3FF);
  color: var(--nml-blue, #2F6BFF);
}
.nml-sub-perk-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.nml-sub-perk-name {
  font-size: 13px; font-weight: 700;
  color: var(--nml-tx, #0F172A); margin-bottom: 5px;
}
.nml-sub-perk-desc {
  font-size: 11px; color: var(--nml-tx3, #94A3B8); line-height: 1.5;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.nml-sub-faq {
  position: relative; z-index: 1;
  max-width: 860px; margin: 48px auto 0;
  padding: 0 24px;
}
.nml-sub-faq-title {
  font-size: var(--nml-text-h3, 20px) !important; font-weight: 700 !important;
  color: var(--nml-tx, #0F172A) !important; margin-bottom: 16px;
}
.nml-sub-faq-list { display: flex; flex-direction: column; gap: 10px; }
.nml-sub-faq-item {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--nml-border, #E2E8F0);
  border-radius: 12px; padding: 0;
  overflow: hidden; transition: border-color .2s;
}
.nml-sub-faq-item[open] { border-color: rgba(47,107,255,.3); }
.nml-sub-faq-item summary {
  padding: 16px 20px; font-size: 14px;
  font-weight: 600; color: var(--nml-tx, #0F172A);
  cursor: pointer; list-style: none;
  display: flex; align-items: center;
  justify-content: space-between;
}
.nml-sub-faq-item summary::after {
  content: '+'; font-size: 18px; color: var(--nml-tx3, #94A3B8);
  transition: transform .2s; flex-shrink: 0;
}
.nml-sub-faq-item[open] summary::after {
  content: '−'; color: var(--nml-blue, #2F6BFF);
}
.nml-sub-faq-item p {
  padding: 0 20px 16px;
  font-size: 13px; color: var(--nml-tx2, #475569);
  line-height: 1.6; margin: 0;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nml-sub-cards { grid-template-columns: 1fr; max-width: 480px; }
  .nml-sub-cards.nml-sub-cards-3 { flex-direction: column !important; flex-wrap: wrap !important; max-width: 480px; }
  .nml-sub-perks-grid { grid-template-columns: repeat(2,1fr); }
  .nml-sub-header { padding: 28px 20px; }
  .nml-sub-perks, .nml-sub-faq { padding: 0 16px; }
  .nml-sub-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--nml-text-overline, 11px); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--nml-blue, #2F6BFF);
  margin-bottom: 14px;
}
.nml-sub-eyebrow::before {
  content: ''; width: 18px; height: 2px; border-radius: 2px;
  background: var(--nml-blue, #2F6BFF);
}
}
@media (max-width: 480px) {
  .nml-sub-cards { padding: 0 16px; }
  .nml-sub-perks-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .nml-sub-price-amount { font-size: 26px; }
}


/* ============================================================
 * PLAN-AWARE STATES (v1.1.1)
 * ============================================================ */
/* Card đang là gói hiện tại — viền xanh lá nổi bật */
.nml-sub-card-current {
  border: 2px solid var(--nml-green, #22C55E) !important;
  box-shadow: 0 8px 28px rgba(34,197,94,.16) !important;
}
.nml-sub-popular-current {
  background: var(--nml-green, #22C55E) !important;
  color: #fff !important;
}

/* Nút Outline (gia hạn) */
.nml-sub-btn-outline {
  background: #fff !important;
  color: var(--nml-blue, #2F6BFF) !important;
  border: 1.5px solid var(--nml-blue, #2F6BFF) !important;
  box-shadow: none !important;
}
.nml-sub-btn-outline:hover {
  background: rgba(47,107,255,.06) !important;
}

/* Nút Disabled (không khả dụng / đã có premium) */
.nml-sub-btn-disabled {
  background: #F1F5F9 !important;
  color: var(--nml-tx3, #94A3B8) !important;
  border: 1.5px solid var(--nml-border, #E2E8F0) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

/* Nút "Gói hiện tại" (Free khi chưa premium) */
.nml-sub-btn-current {
  border: 1.5px solid var(--nml-green, #22C55E) !important;
  color: var(--nml-green, #22C55E) !important;
  background: rgba(34,197,94,.06) !important;
  pointer-events: none !important;
}

/* Box proration (giảm trừ nâng cấp) */
.nml-sub-proration {
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: rgba(34,197,94,.06);
  border: 1px solid rgba(34,197,94,.22);
  border-radius: 12px;
  font-size: 13px;
}
.nml-sub-proration-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0; color: var(--nml-tx2, #475569);
}
.nml-sub-proration-row.credit { color: var(--nml-green-dark, #16A34A); font-weight: 600; }
.nml-sub-proration-row.total {
  border-top: 1px solid rgba(34,197,94,.2);
  margin-top: 4px; padding-top: 8px;
  font-weight: 700; font-size: 15px; color: var(--nml-tx, #0F172A);
}
.nml-sub-proration-row.total span:last-child { color: var(--nml-blue, #2F6BFF); }

/* SVG inline trong badge/button — căn giữa */
.nml-sub-popular svg, .nml-sub-btn svg, .nml-sub-secure svg { flex-shrink: 0; }
.nml-sub-popular { display: inline-flex; align-items: center; }
.nml-sub-btn { display: inline-flex; align-items: center; justify-content: center; }
.nml-sub-secure { display: flex; align-items: center; justify-content: center; }


/* Cân chiều cao 3 thẻ: nút CTA luôn dồn xuống đáy */
.nml-sub-card .nml-sub-btn { margin-top: auto; }
.nml-sub-card .nml-sub-secure { margin-top: 10px; }
/* Divider + features không co lại, đẩy phần dưới xuống đều */
.nml-sub-card .nml-sub-features { margin-bottom: 20px; }
