/**
 * PRNewsPlus — Pricing Redesign CSS
 * Prefix: prn- (pricing page) / hp- (homepage)
 * Does NOT override or remove existing Tailwind classes
 */

/* ─────────────────────────────────────────
   Base font — matches all other pages
───────────────────────────────────────── */
.prn-tabs-wrap,
.prn-tab,
.prn-pack-grid,
.prn-pack-card,
.prn-insight-box,
.prn-billing-toggle,
.prn-plan-card,
.prn-trust-bar,
.prn-trust-item,
.prn-final-cta,
.hp-pricing-teaser,
.hp-plan-card {
  font-family: 'Google Sans', 'Sarabun', sans-serif;
}

/* ─────────────────────────────────────────
   CSS Variables
───────────────────────────────────────── */
:root {
  --prn-red:      #FF6C22;
  --prn-red-dark: #C0511A;
  --prn-ink:      #111318;
  --prn-muted:    #6B7280;
  --prn-border:   #E5E7EB;
  --prn-surface:  #F9FAFB;
  --prn-green:    #10B981;
  --prn-gold:     #F59E0B;
  --prn-dark:     #0F172A;
}

/* ─────────────────────────────────────────
   A. Sticky Tab Bar
───────────────────────────────────────── */
.prn-tabs-wrap {
  position: sticky;
  top: 60px;
  z-index: 90;
  background: #F9FAFB;
  border-bottom: 1px solid #E5E7EB;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.prn-tabs-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.prn-tabs-inner::-webkit-scrollbar { display: none; }

.prn-tab {
  padding: 15px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #6B7280;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: 'Sarabun', sans-serif;
}

.prn-tab:hover {
  color: #FF6C22;
}

.prn-tab.prn-tab--active {
  color: #FF6C22;
  border-bottom-color: #FF6C22;
}

/* Section anchor (invisible offset) */
.prn-anchor {
  display: block;
  height: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ─────────────────────────────────────────
   B. PPP Single Card
───────────────────────────────────────── */
.prn-ppp-single {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 580px;
  margin: 0 auto 48px;
  padding: 36px;
  border: 2px solid #D1D5DB;
  border-radius: 16px;
  background: white;
}

@media (max-width: 600px) {
  .prn-ppp-single { flex-direction: column; }
}

/* ─────────────────────────────────────────
   C. Pack Grid (Bundle)
───────────────────────────────────────── */
.prn-pack-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}

.prn-pack-card {
  border: 2px solid #E5E7EB;
  border-radius: 14px;
  padding: 22px 14px;
  text-align: center;
  background: white;
  position: relative;
}

.prn-pack-card--recommended {
  border-color: #FF6C22;
  background: #FFF8F8;
}

.prn-pack-card--popular {
  border-color: #F59E0B;
  background: #FFFBF0;
}

.prn-pack-card--best {
  border-color: #10B981;
  background: #F0FDF8;
}

/* Top badge */
.prn-pack-top-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: white;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.prn-pack-top-badge--red   { background: #FF6C22; }
.prn-pack-top-badge--gold  { background: #F59E0B; }
.prn-pack-top-badge--green { background: #10B981; }

/* Pack count */
.prn-pack-count {
  font-size: 24px;
  font-weight: 800;
  color: #111318;
  margin-bottom: 4px;
  margin-top: 8px;
}

.prn-pack-count span {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

/* Pack price */
.prn-pack-price {
  font-size: 18px;
  font-weight: 800;
  color: #111318;
  margin-bottom: 2px;
}

.prn-pack-per {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 8px;
}

/* Discount chip */
.prn-pack-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.prn-pack-badge--red   { background: #FFF0E8; color: #C0511A; }
.prn-pack-badge--gold  { background: #FEF3C7; color: #92400E; }
.prn-pack-badge--green { background: #D1FAE5; color: #065F46; }

@media (max-width: 768px) {
  .prn-pack-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .prn-pack-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────────────────
   D. Insight / Upsell Box
───────────────────────────────────────── */
.prn-insight-box {
  display: flex;
  align-items: center;
  gap: 40px;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border-radius: 16px;
  padding: 36px 40px;
  margin-top: 48px;
  color: white;
  flex-wrap: wrap;
}

.prn-insight-left {
  flex: 1;
  min-width: 220px;
}

.prn-insight-calc {
  flex-shrink: 0;
  min-width: 240px;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 20px 24px;
}

.prn-calc-val--strike {
  text-decoration: line-through;
  color: #64748B;
}

.prn-calc-val--green { color: #34D399; }

.prn-calc-saving {
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6EE7B7;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  margin-top: 12px;
}

/* ─────────────────────────────────────────
   E. Billing Toggle
───────────────────────────────────────── */
.prn-billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
}

.prn-toggle-switch {
  width: 52px;
  height: 28px;
  background: #FF6C22;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.prn-toggle-switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.prn-toggle-switch.prn-toggle-switch--on::after {
  transform: translateX(24px);
}

.prn-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: #6B7280;
  transition: color 0.2s;
}

.prn-toggle-label--active {
  color: #111318;
}

.prn-annual-chip {
  background: #D1FAE5;
  color: #065F46;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ─────────────────────────────────────────
   F. Plan Cards Grid
───────────────────────────────────────── */
.prn-plans-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: start;
}

.prn-plan-card {
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  padding: 28px 18px;
  background: white;
  position: relative;
}

.prn-plan-card--featured {
  border-color: #FF6C22 !important;
  box-shadow: 0 12px 40px rgba(255,108,34,0.15);
  transform: translateY(-8px);
}

.prn-plan-featured-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #FF6C22;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 5;
}

/* Feature list icons */
li.yes::before  { content: '✓'; color: #10B981; margin-right: 6px; font-weight: 700; }
li.no           { color: #9CA3AF; }
li.no::before   { content: '—'; color: #D1D5DB; margin-right: 6px; }
li.bolt::before { content: '⚡'; margin-right: 6px; }
li.star::before { content: '★'; color: #F59E0B; margin-right: 6px; }

/* Plan CTA buttons */
.prn-plan-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.prn-plan-btn--primary {
  background: #FF6C22;
  color: white;
  border: none;
}

.prn-plan-btn--primary:hover { background: #C0511A; }

.prn-plan-btn--outline {
  background: #F9FAFB;
  border: 2px solid #D1D5DB;
  color: #111318;
}

.prn-plan-btn--outline:hover { border-color: #9CA3AF; }

@media (max-width: 900px) {
  .prn-plans-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .prn-plans-grid { grid-template-columns: repeat(2, 1fr); }
  .prn-plan-card--featured { transform: none; }
}

/* ─────────────────────────────────────────
   G. Trust Bar
───────────────────────────────────────── */
.prn-trust-bar {
  background: #0F172A;
  display: flex;
  gap: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.prn-trust-item {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 500;
  padding: 18px 24px;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.prn-trust-item:last-child { border-right: none; }

/* ─────────────────────────────────────────
   H. Final CTA Section
───────────────────────────────────────── */
.prn-final-cta {
  background: #FF6C22;
  padding: 80px 24px;
  text-align: center;
  color: white;
}

.prn-btn--white {
  background: white;
  color: #FF6C22;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.prn-btn--white:hover { background: #f3f3f3; }

.prn-btn--ghost-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.35);
  padding: 12px 30px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.prn-btn--ghost-white:hover { border-color: rgba(255,255,255,0.6); }

/* ─────────────────────────────────────────
   I. Homepage Pricing Teaser (Dark Section)
───────────────────────────────────────── */
.hp-pricing-teaser {
  background: linear-gradient(160deg, #0F172A 0%, #1E293B 100%);
  padding: 72px 24px;
  border-top: 4px solid #FF6C22;
}

.hp-pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.hp-plan-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 28px 22px;
  color: white;
  transition: all 0.2s;
}

.hp-plan-card--featured {
  border-color: #FF6C22;
  background: rgba(255,108,34,0.1);
  box-shadow: 0 8px 32px rgba(255,108,34,0.2);
  transform: translateY(-6px);
  position: relative;
}

.hp-plan-badge {
  display: inline-block;
  background: #FF6C22;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.hp-plan-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hp-plan-price {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.hp-plan-quota {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.hp-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hp-plan-btn {
  display: block;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
}

.hp-plan-btn--primary {
  background: #FF6C22;
  color: white;
}

.hp-plan-btn--primary:hover { background: #C0511A; }

.hp-plan-btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: white;
}

.hp-plan-btn--outline:hover { border-color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
  .hp-pricing-cards {
    grid-template-columns: 1fr;
  }

  .hp-plan-card--featured {
    transform: none;
    order: -1;
  }
}
