/* Pricing plans, from the phase 2 pricing concept (pr-plans): the plan cards rising into the hero field above,
   then the note on Meta's fees that the prices' asterisks point to. Logical properties throughout, so Arabic
   (dir="rtl") mirrors. */

/* The cards rise into the hero field by this much. The pricing-hero module sets the same values on .pr-hero (the
   room it leaves at the foot of its field), so change both modules together. */
.pr-plans { --pr-lift: clamp(150px, 12vw, 190px); }

.pr-plans { position: relative; z-index: 2; margin-top: calc(-1 * var(--pr-lift)); padding-bottom: calc(var(--sec) / 2); }
.pr-plan-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px clamp(14px, 1.5vw, 22px); }
/* Each card spans six rows of the list grid, so names, prices, buttons and lists line up across cards */
.pr-plan {
  position: relative; min-width: 0;
  display: grid; grid-row: span 6; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); row-gap: 14px;
  padding: 34px clamp(20px, 2vw, 28px) clamp(22px, 2.2vw, 30px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm);
  corner-shape: var(--sq-shape, round);
}
@supports not (grid-template-rows: subgrid) {
  .pr-plan { display: flex; flex-direction: column; gap: 14px; }
}
/* Plan names, word prices and button labels run longer in some languages (German compounds above all), so they
   wrap and hyphenate inside the card instead of spilling out of it */
.pr-plan-name { font: 800 1.4rem/1.2 var(--text); letter-spacing: -0.01em; overflow-wrap: anywhere; hyphens: auto; }
.pr-plan-for { font-size: 16px; line-height: 1.45; color: var(--ink-soft); text-wrap: pretty; }
/* The price row is a size container, so a word price can be fitted to the card's width */
.pr-plan-price { align-self: end; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding-top: 4px; container-type: inline-size; }
.pr-plan-amount { font: 800 clamp(2.4rem, 1.7rem + 1.4vw, 3.1rem)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
/* A word price keeps its designed size while it fits. A longer one (--chars is its longest word, from the template)
   shrinks to fit the card on one line: the display faces need at most about 0.7em a character. Below 1.1rem it
   wraps and hyphenates instead. */
.pr-plan-amount.is-word { font-size: clamp(1.45rem, 1.15rem + 0.6vw, 1.8rem); line-height: 1.1; overflow-wrap: anywhere; hyphens: auto; }
.pr-plan-amount.is-word { font-size: clamp(1.1rem, 100cqi / (var(--chars, 8) * 0.7), clamp(1.8rem, 1.4rem + 0.8vw, 2.3rem)); }
.pr-plan-per { font-weight: 700; font-size: 16px; color: var(--ink-soft); }
.pr-fn { position: relative; margin-inline-start: 2px; border-radius: 4px; font-weight: 800; color: var(--accent-ink); text-decoration: none; }
.pr-fn::after { content: ""; position: absolute; inset: -9px -8px; }
.pr-fn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .pr-fn:hover { text-decoration: underline; }
}
.pr-plan .btn { width: 100%; }
.pr-plan-for, .pr-plan-feats li, .pr-plan-inc { overflow-wrap: break-word; hyphens: auto; }
.pr-plan-inc { padding-top: 14px; border-top: 1px solid var(--line); font: 700 13px/1.2 var(--text); color: var(--ink-soft); }
.pr-plan-feats { display: grid; gap: 10px; align-content: start; }
.pr-plan-feats li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 16px; line-height: 1.4; }
.pr-plan-feats .i { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--green); color: var(--on-bright); }
.pr-plan-feats .is-limit .i { padding: 2px; background: var(--surface-2); color: var(--ink-soft); }
/* The chapter's one sticker: a fact the calculator proves, in place of an unverified "Most popular" */
.pr-plan-sticker {
  --rot: -3deg;
  position: absolute; z-index: 3; top: 0; left: 50%; translate: -50% -58%;
  width: max-content; max-width: calc(100% + 12px);
  justify-content: center; text-align: center; text-wrap: balance;
  font-size: 15px; line-height: 1.2;
}
[dir="rtl"] .pr-plan-sticker { --rot: 3deg; }
.pr-plan-sticker .i { width: 18px; height: 18px; flex: none; }

/* The note the prices' asterisks point to: the copy and the two bills sit straight on the ground */
.pr-meta {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 44px); align-items: center;
  margin-top: clamp(32px, 3.6vw, 48px);
}
.pr-meta-copy { display: grid; gap: 10px; justify-items: start; }
.pr-meta-title { font: 800 1.3rem/1.3 var(--text); letter-spacing: -0.01em; text-wrap: balance; }
.pr-meta-copy p { max-width: 58ch; font-size: 16px; color: var(--ink-soft); text-wrap: pretty; }
.pr-bills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pr-bill { display: grid; gap: 8px; align-content: start; padding: 16px 18px 18px; border-radius: calc(20px * var(--sq-scale, 1)); background: var(--surface); box-shadow: var(--shadow-xs); corner-shape: var(--sq-shape, round); }
.pr-bill dt { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; line-height: 1.25; }
.pr-bill dd { font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.pr-bill-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--disc-bg); }
.pr-bill-ic img { width: 22px; height: 22px; }
/* WhatsApp's own mark in WhatsApp's own green */
.pr-bill-ic .i { width: 22px; height: 22px; color: #25D366; }
.pr-meta-copy .pr-meta-usd { font-size: 14px; }

/* Responsive */
@media (max-width: 1119px) {
  .pr-plan-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .pr-meta { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 719px) {
  .pr-plans { --pr-lift: 110px; }
}
@media (max-width: 639px) {
  .pr-plan-list { grid-template-columns: minmax(0, 1fr); row-gap: 22px; }
  .pr-plan { padding-top: 34px; }
  .pr-plan.is-sticky { margin-block-start: 12px; }
  .pr-bills { grid-template-columns: minmax(0, 1fr); }
}
