/* =========================================================================
   TRANG CHUYỂN ĐỀ SANG WORD — BẢNG GIÁ, SO SÁNH & MẪU THỰC TẾ
   Styles tách biệt giữ pdf-to-word-community.css <= 800 dòng.
   Hỗ trợ đáp ứng mọi màn hình 320px -> 1440px+ ở cả Sáng & Tối.
   ========================================================================= */

.p2w-page-range-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--p2w-surface-alt, #f1f5f9);
  border: 1px solid var(--p2w-border, #e2e8f0);
}

.p2w-page-range-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--p2w-text, #0f172a);
}

.p2w-page-range-input {
  max-width: 280px;
  min-width: 180px;
  flex: 1 1 200px;
  padding: 0.42rem 0.7rem !important;
  font-size: 0.82rem !important;
}

.p2w-page-range-preview {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0284c7;
}

.p2w-page-range-preview.is-error {
  color: #dc2626;
}

.p2w-paste-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-top: 0.4rem;
}

/* ── Benchmark Showcase (3 Đề Mẫu Thực Tế) ──────────────────────────────── */
.p2w-benchmark-block {
  margin-top: 2.25rem;
  margin-bottom: 2.5rem;
}

.p2w-benchmark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.p2w-benchmark-card {
  background: var(--p2w-card, #ffffff);
  border: 1px solid var(--p2w-border, #e2e8f0);
  border-radius: 14px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.p2w-benchmark-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.p2w-benchmark-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--p2w-text, #0f172a);
  margin: 0;
}

.p2w-benchmark-card p {
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--p2w-muted, #64748b);
  margin: 0;
  flex: 1;
}

.p2w-benchmark-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

/* ── Commercial Pricing Section ──────────────────────────────────────────── */
.p2w-pricing-section,
.p2w-benchmark-block,
#p2w-split-studio,
#p2w-archive-section {
  scroll-margin-top: 98px;
}

.p2w-pricing-section {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--p2w-border, #e2e8f0);
}

.p2w-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
  align-items: stretch;
}

.p2w-price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--p2w-card, #ffffff);
  border: 1.5px solid var(--p2w-border, #e2e8f0);
  border-radius: 16px;
  padding: 1.4rem 1.25rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.p2w-price-card.is-popular {
  border-color: #00b4d8;
  box-shadow: 0 12px 30px -8px rgba(0, 180, 216, 0.25);
}

.p2w-price-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: linear-gradient(135deg, #0096c7, #0284c7);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.24rem 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.p2w-price-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0284c7;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.p2w-price-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--p2w-text, #0f172a);
  margin: 0 0 0.35rem;
}

.p2w-price-desc {
  font-size: 0.82rem;
  color: var(--p2w-muted, #64748b);
  line-height: 1.45;
  margin: 0 0 0.9rem;
  min-height: 2.6rem;
}

.p2w-price-box {
  background: var(--p2w-surface-alt, #f8fafc);
  border: 1px solid var(--p2w-border, #e2e8f0);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.85rem;
}

.p2w-price-amount-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.p2w-price-amount {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--p2w-text, #0f172a);
  line-height: 1.1;
}

.p2w-price-cycle {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--p2w-muted, #64748b);
}

.p2w-price-original {
  font-size: 0.78rem;
  color: var(--p2w-muted, #94a3b8);
  margin-top: 0.25rem;
}

.p2w-price-sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.p2w-price-monthly-pill,
.p2w-price-unit-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.p2w-price-monthly-pill {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.p2w-price-unit-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.p2w-upgrade-credit-pill {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
}

.p2w-price-quota-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 180, 216, 0.08);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--p2w-text, #0f172a);
  margin-bottom: 0.9rem;
}

.p2w-price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.p2w-price-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--p2w-text, #1e293b);
}

.p2w-check-dot {
  color: #10b981;
  font-weight: 800;
  flex-shrink: 0;
}

.p2w-price-cta {
  width: 100%;
  justify-content: center;
}

.p2w-guarantee-strip {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.28);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: var(--p2w-text, #0f172a);
}

/* ── Comparison Table ────────────────────────────────────────────────────── */
.p2w-compare-wrap {
  margin-top: 2rem;
  overflow-x: auto;
  border: 1px solid var(--p2w-border, #e2e8f0);
  border-radius: 14px;
  background: var(--p2w-card, #ffffff);
}

.p2w-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.p2w-compare-table th,
.p2w-compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--p2w-border, #e2e8f0);
  color: var(--p2w-text, #0f172a);
}

.p2w-compare-table thead th {
  background: var(--p2w-surface-alt, #f8fafc);
  font-weight: 800;
  font-size: 0.82rem;
}

.p2w-compare-table td.is-win {
  font-weight: 700;
  color: #0369a1;
}

/* Dark theme polarity overrides */
[data-theme="dark"] .p2w-price-card,
[data-theme="dark"] .p2w-benchmark-card,
[data-theme="dark"] .p2w-compare-wrap {
  background: #111c33;
  border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .p2w-price-box,
[data-theme="dark"] .p2w-page-range-bar,
[data-theme="dark"] .p2w-compare-table thead th {
  background: #0b1326;
  border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="dark"] .p2w-price-title,
[data-theme="dark"] .p2w-price-amount,
[data-theme="dark"] .p2w-price-features li,
[data-theme="dark"] .p2w-price-quota-bar,
[data-theme="dark"] .p2w-benchmark-card h3,
[data-theme="dark"] .p2w-compare-table th,
[data-theme="dark"] .p2w-compare-table td,
[data-theme="dark"] .p2w-guarantee-strip,
[data-theme="dark"] .p2w-page-range-label {
  color: #e2e8f0;
}

[data-theme="dark"] .p2w-price-monthly-pill,
[data-theme="dark"] .p2w-compare-table td.is-win {
  color: #38bdf8;
}

[data-theme="dark"] .p2w-price-unit-pill {
  color: #34d399;
}

/* Anchored Launch Discount Pills & Referral Program Widget */
.p2w-launch-anchor-strip {
  margin: 0.9rem auto 0;
  max-width: 960px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: var(--p2w-ink, #0f172a);
  font-size: 0.81rem;
  font-weight: 700;
}

.p2w-price-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.p2w-discount-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
}

.p2w-upgrade-credit-pill.is-loyalty {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.3);
}

.p2w-upgrade-credit-pill.is-ref {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.3);
}

.p2w-referral-banner {
  margin: 1.25rem 0 0.25rem;
}

.p2w-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.p2w-ref-box {
  background: var(--p2w-surface, #ffffff);
  border: 1.5px solid var(--p2w-border, #e2e8f0);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: left;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.p2w-ref-head {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.p2w-ref-head strong {
  font-size: 0.96rem;
  color: var(--p2w-ink, #0f172a);
}

.p2w-ref-head code {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-weight: 800;
}

.p2w-ref-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.p2w-ref-badge.is-buyer {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.p2w-ref-badge.is-earn {
  background: rgba(99, 102, 241, 0.14);
  color: #4338ca;
}

.p2w-ref-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.48;
  color: var(--p2w-muted, #475569);
}

.p2w-ref-input-row,
.p2w-ref-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.p2w-ref-input,
.p2w-ref-share-input {
  flex: 1 1 170px;
  min-width: 0;
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1.5px solid var(--p2w-border, #cbd5e1);
  background: var(--p2w-bg-soft, #f8fafc);
  color: var(--p2w-ink, #0f172a);
  font-size: 0.84rem;
  font-weight: 700;
}

.p2w-ref-input {
  text-transform: uppercase;
}

.p2w-ref-status {
  font-size: 0.8rem;
  font-weight: 700;
}
.p2w-ref-status.is-ok { color: #059669; }
.p2w-ref-status.is-err { color: #dc2626; }

.p2w-ref-stats-row,
.p2w-ref-redeem-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--p2w-ink, #1e293b);
}

.p2w-ref-quick-promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--p2w-muted, #475569);
}

.p2w-ref-quick-btn {
  border: 1px dashed rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.08);
  color: #0369a1;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.p2w-ref-credit-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 0.8rem;
  font-weight: 600;
  color: #065f46;
  cursor: pointer;
}

.p2w-ref-credit-toggle input {
  margin-top: 0.18rem;
  width: 16px;
  height: 16px;
  accent-color: #059669;
  flex-shrink: 0;
}

.p2w-upgrade-credit-pill.is-wallet {
  background: rgba(168, 85, 247, 0.12);
  color: #7e22ce;
  border-color: rgba(168, 85, 247, 0.3);
}

[data-theme="dark"] .p2w-ref-quick-promo { color: #94a3b8; }
[data-theme="dark"] .p2w-ref-quick-btn { color: #38bdf8; }
[data-theme="dark"] .p2w-ref-credit-toggle { color: #6ee7b7; }
[data-theme="dark"] .p2w-upgrade-credit-pill.is-wallet { color: #d8b4fe; }

.p2w-ref-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.p2w-ref-mode-btn {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1.5px solid var(--p2w-border, #cbd5e1);
  background: var(--p2w-bg-soft, #f8fafc);
  color: var(--p2w-ink, #0f172a);
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.p2w-ref-mode-btn strong {
  font-size: 0.78rem;
  line-height: 1.3;
}

.p2w-ref-mode-btn small {
  font-size: 0.71rem;
  color: var(--p2w-muted, #64748b);
}

.p2w-ref-mode-btn.is-active {
  border-color: #0284c7;
  background: rgba(14, 165, 233, 0.1);
  box-shadow: 0 0 0 1px rgba(2, 132, 199, 0.25);
}

.p2w-ref-history {
  border-top: 1px dashed var(--p2w-border, #cbd5e1);
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.p2w-ref-history-title {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--p2w-muted, #475569);
}

.p2w-ref-history-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--p2w-ink, #1e293b);
}

[data-theme="dark"] .p2w-ref-mode-btn {
  background: #0b1326;
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

[data-theme="dark"] .p2w-ref-mode-btn small,
[data-theme="dark"] .p2w-ref-history-title { color: #94a3b8; }

[data-theme="dark"] .p2w-ref-mode-btn.is-active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}

[data-theme="dark"] .p2w-ref-history-item { color: #cbd5e1; }

@media (max-width: 540px) {
  .p2w-ref-mode-switch {
    grid-template-columns: minmax(0, 1fr);
  }
}

[data-theme="dark"] .p2w-launch-anchor-strip,
[data-theme="dark"] .p2w-ref-head strong,
[data-theme="dark"] .p2w-ref-stats-row,
[data-theme="dark"] .p2w-ref-redeem-row {
  color: #e2e8f0;
}

[data-theme="dark"] .p2w-ref-box {
  background: #111c33;
  border-color: rgba(148, 163, 184, 0.22);
}

[data-theme="dark"] .p2w-ref-desc {
  color: #94a3b8;
}

[data-theme="dark"] .p2w-ref-input,
[data-theme="dark"] .p2w-ref-share-input {
  background: #0b1326;
  border-color: rgba(148, 163, 184, 0.25);
  color: #f8fafc;
}

[data-theme="dark"] .p2w-ref-badge.is-buyer { color: #34d399; }
[data-theme="dark"] .p2w-ref-badge.is-earn { color: #a5b4fc; }
[data-theme="dark"] .p2w-ref-head code { color: #38bdf8; }
[data-theme="dark"] .p2w-upgrade-credit-pill.is-loyalty { color: #38bdf8; }
[data-theme="dark"] .p2w-upgrade-credit-pill.is-ref { color: #34d399; }

/* Responsive Breakpoints: Tablet & Mobile 320px */
@media (max-width: 960px) {
  .p2w-pricing-grid,
  .p2w-benchmark-grid,
  .p2w-ref-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .p2w-launch-anchor-strip {
    border-radius: 14px;
  }
  .p2w-price-desc {
    min-height: 0;
  }
}

@media (max-width: 540px) {
  .p2w-compare-wrap {
    overflow-x: visible;
  }
  .p2w-compare-table thead {
    display: none;
  }
  .p2w-compare-table,
  .p2w-compare-table tbody,
  .p2w-compare-table tr,
  .p2w-compare-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .p2w-compare-table tr {
    padding: 0.75rem 0.8rem;
    border-bottom: 1px solid var(--p2w-border, #e2e8f0);
  }
  .p2w-compare-table tr:last-child {
    border-bottom: none;
  }
  .p2w-compare-table td {
    padding: 0.25rem 0;
    border-bottom: none;
    font-size: 0.8rem;
  }
  .p2w-compare-table td:first-child {
    font-weight: 800;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    opacity: 0.85;
  }
  .p2w-compare-table td.is-win::before {
    content: "chamnhanh.net: ";
    font-weight: 800;
  }
  .p2w-compare-table td:last-child::before {
    content: "Phần mềm cài đặt: ";
    font-weight: 700;
    opacity: 0.82;
  }
  .p2w-price-amount {
    font-size: 1.55rem;
  }
  .p2w-page-range-input {
    max-width: 100%;
    width: 100%;
  }
}
