/* =============================================================================
   AdStar landing — pricing.css
   Pricing heading + Monthly/Yearly toggle + comparison table (desktop/tablet)
   that collapses to stacked plan cards on mobile.
   ========================================================================== */

.pricing .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

/* ---- Heading ------------------------------------------------------------- */
.pricing__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}
.pricing__title {
  font-size: var(--fs-display-lg);
  line-height: var(--lh-display-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  color: var(--text-primary);
}
.pricing__subtitle {
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  color: var(--text-secondary);
  max-width: 606px;
}

/* ---- Segmented Monthly / Yearly toggle ----------------------------------- */
.pricing__toggle-track {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--gray-900);
  box-shadow: inset 1px 1px 1px 0 rgba(255, 255, 255, 0.15);
}
.pricing__toggle-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding-inline: 16px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  font-weight: 600;
  color: var(--gray-200);
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.pricing__toggle-opt:hover { color: var(--text-primary); }
.pricing__toggle-opt.is-active {
  background: var(--gray-750);
  color: var(--text-primary);
}
.pricing__toggle-badge {
  display: inline-flex;
  align-items: center;
  padding-inline: 4px;
  border-radius: 4px;
  background: var(--gray-750);
  font-size: var(--fs-xs);
  line-height: var(--lh-xs);
  font-weight: 600;
  color: var(--brand-700);
}

/* ---- Comparison panel ---------------------------------------------------- */
.pricing__panel {
  width: 100%;
  max-width: 1076px;
  border-radius: 20px;
  background: var(--gray-900);
  overflow: hidden;
}
.pricing__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
}
.pricing__cell {
  padding: 20px;
  vertical-align: middle;
  font-weight: 400;
}
/* vertical dividers between the four columns */
.pricing__table td,
.pricing__table th {
  border-left: 1px solid var(--gray-750);
}
.pricing__table th:first-child,
.pricing__table td:first-child {
  border-left: 0;
  width: 28%;
}
/* horizontal dividers between rows */
.pricing__table tbody tr,
.pricing__plans {
  border-bottom: 1px solid var(--gray-750);
}
.pricing__table tbody tr:last-child { border-bottom: 0; }

/* ---- Plan header cells (top row) ----------------------------------------- */
.pricing__plans .pricing__cell {
  padding: 20px;
  text-align: center;
  vertical-align: middle;
}
.pricing__cell--brand {
  text-align: center;
  background: var(--gray-900);
}
.pricing__logo {
  /* The SVG's viewBox is 132×138.854: the crisp play-mark core is only the
     central ~52×59, the rest is the baked-in glow/drop-shadow. Render at the
     full natural width so the mark reads at ~52px, matching Figma (node
     129:1548, where the image is expanded 2.54× beyond its 52px core box). */
  width: 132px;
  height: auto;
  margin-block: -40px;   /* absorb the glow's vertical padding so row height is unchanged */
  margin-inline: auto;
}
/* lime gradient fading down from the top of each plan header */
.pricing__plan {
  background:
    linear-gradient(to bottom,
      rgba(40, 46, 0, 1) 0%,
      rgba(40, 46, 0, 0.6) 15%,
      var(--gray-900) 50%);
}
.pricing__plan-name {
  display: block;
  font-size: var(--fs-display-xs);
  line-height: var(--lh-display-xs);
  font-weight: 600;
  color: var(--brand-800);
}
.pricing__price {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.pricing__price-amount {
  font-size: var(--fs-display-sm);
  line-height: var(--lh-display-sm);
  font-weight: 400;
  color: var(--white);
}
.pricing__price-period {
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  color: var(--text-secondary);
}
.pricing__ads {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--gray-900);
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  color: var(--gray-200);
  text-align: center;
}

/* ---- Group / category headers -------------------------------------------- */
.pricing__group-title {
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  font-weight: 600;
  color: var(--text-primary);
}

/* ---- Feature rows -------------------------------------------------------- */
.pricing__feature {
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  font-weight: 400;
  color: var(--gray-200);
}
.pricing__value {
  text-align: center;
  font-size: var(--fs-sm);
  line-height: var(--lh-sm);
  color: var(--gray-100);
}
.pricing__value--long { max-width: 0; } /* let table-layout wrap long text */
.pricing__value .pricing__check {
  width: 20px;
  height: 20px;
  margin-inline: auto;
}
.pricing__credits {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-md);
  line-height: var(--lh-md);
  font-weight: 600;
  color: var(--text-primary);
}
.pricing__zap { width: 20px; height: 20px; }

/* Visibly mark unfilled placeholder cells (subtle, dev-facing) */
.pricing [data-todo] { opacity: 0.85; }

/* ---- Mobile plan cards (hidden on desktop/tablet) ------------------------ */
.pricing__cards { display: none; }

/* =============================================================================
   TABLET (768–1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .pricing__panel { max-width: 100%; }
  .pricing__cell { padding: 16px; }
  .pricing__plans .pricing__cell { padding: 16px; }
  .pricing__price-amount { font-size: var(--fs-display-xs); line-height: var(--lh-display-xs); }
  .pricing__plan-name { font-size: var(--fs-xl); line-height: var(--lh-xl); }
}

/* =============================================================================
   MOBILE (<=767px) — collapse the table into stacked plan cards
   ========================================================================== */
@media (max-width: 767px) {
  .pricing__title { font-size: 32px; line-height: 40px; }

  /* Hide the wide comparison table; show cards instead. */
  .pricing__panel { display: none; }

  /* One rounded panel holding the three plan blocks, split by hairline
     dividers — matches the Figma mobile design (name + price + ads only,
     no per-plan CTA). */
  .pricing__cards {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: min(320px, 100%);
    margin-inline: auto;
    border-radius: 20px;
    overflow: hidden;
  }
  .pricing__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--gray-750);
    /* lime gradient fading from the top of each block (Figma: #282e00 -> #1c1c1c) */
    background:
      linear-gradient(to bottom,
        #282e00 0%,
        #282e00 15.385%,
        #1c1c1c 50%);
    text-align: center;
  }
  .pricing__card:last-child { border-bottom: 0; }
  .pricing__card .pricing__plan-name {
    font-size: var(--fs-display-xs);
    line-height: var(--lh-display-xs);
  }
  .pricing__card .pricing__price { margin-top: 0; }
  .pricing__card .pricing__ads { margin-top: 0; }
}
