/* ===== Pricing Hero ===== */
.pricing-hero {
  padding: 140px 0 80px;
  text-align: center;
  background: var(--home-hero-bg);
}

.pricing-hero .hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.pricing-hero .hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--home-text);
}

.pricing-hero .hero-desc {
  font-size: 17px;
  color: var(--home-text-3);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Loading / Login / Unavailable States ===== */
.loading-state {
  text-align: center;
  padding: 80px 0;
}

.loading-state p {
  margin-top: 16px;
  color: var(--home-text-3);
}

.login-required {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.login-card {
  text-align: center;
  padding: 56px 72px;
  border-radius: 20px;
  border: 1px solid var(--home-border);
  background: var(--home-card-bg);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.03);
}

.login-card h2 {
  font-size: 22px;
  margin: 20px 0 8px;
  color: var(--home-text);
}

.login-card p {
  color: var(--home-text-3);
  margin-bottom: 28px;
}

.login-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

/* ===== Edition Cards ===== */
.edition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.edition-card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--home-border);
  background: var(--home-card-bg);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.edition-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
}

.edition-card.edition-featured {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(22, 93, 255, 0.1);
}

.edition-badge {
  position: absolute;
  top: -1px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.5px;
}

.edition-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--home-border-light);
  margin-bottom: 24px;
}

.edition-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.edition-featured .edition-icon {
  background: var(--primary);
  color: #fff;
}

.edition-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--home-text);
  margin: 0 0 12px;
}

.edition-price {
  margin-bottom: 10px;
}

.price-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--home-text);
}

.price-currency {
  font-size: 18px;
  font-weight: 600;
  color: var(--home-text);
  margin-right: 2px;
  vertical-align: super;
}

.price-period {
  font-size: 14px;
  color: var(--home-text-3);
  font-weight: 400;
}

.edition-desc {
  font-size: 13px;
  color: var(--home-text-3);
  line-height: 1.5;
  margin: 0;
}

.edition-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edition-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--home-text-2);
}

.edition-features li i {
  color: var(--success);
  flex-shrink: 0;
}

.edition-features li.disabled {
  color: var(--home-text-3);
  opacity: 0.5;
}

.edition-features li.disabled i {
  color: var(--home-text-3);
}

.edition-action {
  text-align: center;
}

.edition-action .btn {
  width: 100%;
}

/* ===== Compare Table ===== */
.compare-table-wrapper {
  max-width: 960px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--home-border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  text-align: center;
  border-bottom: 1px solid var(--home-border-light);
}

.compare-table th {
  font-weight: 600;
  background: var(--home-bg-alt);
  color: var(--home-text);
  font-size: 13px;
  border-bottom: 1px solid var(--home-border);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--home-text-2);
}

.compare-table .highlight-col {
  background: rgba(22, 93, 255, 0.04);
  color: var(--home-text);
  font-weight: 500;
}

.compare-table th.highlight-col {
  color: var(--primary);
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr {
  transition: background 0.15s;
}

.compare-table tbody tr:hover:not(.compare-group) {
  background: rgba(22, 93, 255, 0.02);
}

.compare-group td {
  background: var(--home-bg-alt);
  font-weight: 600;
  font-size: 12px;
  color: var(--home-text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--home-border);
}

/* ===== Pricing Panel ===== */
.pricing-panel {
  border: 1px solid var(--home-border);
  border-radius: 16px;
  background: var(--home-card-bg);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

/* Tab bar — pure CSS via radio */
.pricing-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--home-border);
  background: var(--home-bg-alt);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pricing-tabs input[type="radio"] {
  display: none;
}

.pricing-tabs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--home-text-3);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.pricing-tabs label:hover {
  color: var(--home-text-2);
  background: rgba(22, 93, 255, 0.02);
}

.pricing-tabs input[type="radio"]:checked + label {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--home-card-bg);
}

.tab-shared {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Tab panels — CSS :checked toggle */
.tab-panel {
  display: none;
}

/* Each radio controls its panel via nth-of-type */
.pricing-tabs input[type="radio"]:checked ~ .panel-container .tab-panel {
  display: none;
}

/* Active panel */
.tab-panel.active {
  display: block;
}

/* Shared notice */
.shared-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 28px;
  background: rgba(22, 93, 255, 0.03);
  border-bottom: 1px solid var(--home-border-light);
  font-size: 13px;
  color: var(--home-text-2);
}

.region-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* Free summary */
.free-summary-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  font-size: 13px;
  color: var(--success);
  border-bottom: 1px solid var(--home-border-light);
}

.free-summary-bar strong {
  font-size: 17px;
  font-weight: 700;
}

/* ===== Pricing Table ===== */
.pricing-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.pricing-table th,
.pricing-table td {
  padding: 16px 24px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.pricing-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--home-text-3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--home-bg-alt);
  border-bottom: 1px solid var(--home-border);
}

.pricing-table tbody td {
  border-bottom: 1px solid var(--home-border-light);
}

.pricing-table tbody tr:last-child td {
  border-bottom: none;
}

.pricing-table .row-alt {
  background: rgba(22, 93, 255, 0.01);
}

.pricing-table tbody tr {
  transition: background 0.15s;
}

.pricing-table tbody tr:hover {
  background: rgba(22, 93, 255, 0.03);
}

/* Type cell */
.type-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  white-space: normal;
}

.type-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 5px;
}

.type-name {
  font-weight: 600;
  color: var(--home-text);
  font-size: 14px;
}

/* Unit */
.unit-text {
  font-size: 13px;
  color: var(--home-text-3);
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--home-bg-alt);
}

/* Free quota */
.free-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
}

.free-chip small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}

.no-free {
  color: var(--home-text-3);
  font-size: 13px;
}

/* Description */
.desc-text {
  font-size: 12px;
  color: var(--home-text-3);
  white-space: normal;
  line-height: 1.5;
  max-width: 220px;
  display: inline-block;
}

/* Tier levels */
.tiers-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.tier-range {
  color: var(--home-text-2);
  min-width: 150px;
  font-variant-numeric: tabular-nums;
}

.tier-arrow {
  color: var(--home-text-3);
  opacity: 0.4;
  font-size: 12px;
}

.tier-price {
  font-weight: 600;
  color: var(--home-text);
  font-variant-numeric: tabular-nums;
}

.tier-price small {
  font-weight: 400;
  font-size: 11px;
  color: var(--home-text-3);
}

.tier-price.is-free {
  color: var(--success);
  background: var(--success-light);
  padding: 1px 8px;
  border-radius: 4px;
}

/* ===== Billing Notes ===== */
.billing-notes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.note-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 28px 20px;
  border-radius: 14px;
  background: var(--home-card-bg);
  border: 1px solid var(--home-border-light);
  transition: transform 0.2s, box-shadow 0.2s;
}

.note-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.note-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--home-text);
}

.note-item p {
  font-size: 13px;
  color: var(--home-text-3);
  line-height: 1.6;
  margin: 0;
}

.note-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
}

.note-icon.icon-green {
  background: var(--success-light);
  color: var(--success);
}

.note-icon.icon-purple {
  background: var(--purple-light);
  color: var(--purple);
}

.note-icon.icon-orange {
  background: var(--warning-light);
  color: var(--warning);
}

/* ===== CTA ===== */
.pricing-cta {
  text-align: center;
}

.pricing-cta h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--home-text);
}

.pricing-cta p {
  font-size: 15px;
  color: var(--home-text-3);
  margin-bottom: 28px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .edition-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .billing-notes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .pricing-hero {
    padding: 120px 0 60px;
  }

  .pricing-hero .hero-title {
    font-size: 32px;
  }

  .pricing-hero .hero-desc br {
    display: none;
  }

  .pricing-tabs label {
    padding: 12px 16px;
    font-size: 13px;
  }

  .shared-notice {
    padding: 12px 20px;
  }

  .free-summary-bar {
    padding: 10px 20px;
  }

  .pricing-table {
    font-size: 13px;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 12px 14px;
  }

  .tier-range {
    min-width: 120px;
  }

  .tier-item {
    padding: 3px 8px;
    font-size: 12px;
  }

  .billing-notes {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .note-item {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .billing-notes {
    grid-template-columns: 1fr;
  }
}
