/* Plan picker (landing page + panel buy page): selectable rows and a buy bar.
   Own colour tokens so it looks the same on both pages. */
.pr {
  --pr-green: #16e39c; --pr-green-2: #8ff0d2; --pr-ink: #03170a;
  --pr-hot: #ff7a2a; --pr-hot-2: #ff9f3a; --pr-hot-text: #ffc27a; --pr-scarce: #ffa04d; --pr-was: #858c88;
  --pr-text: #f1f3f2; --pr-muted: #9aa29f; --pr-faint: #646b68;
  --pr-row: rgba(255,255,255,.03); --pr-line: rgba(255,255,255,.08); --pr-line-2: rgba(255,255,255,.14);
  --pr-bar-bottom: 0px;
  container-type: inline-size;
  color: var(--pr-text);
}
.pr button { font: inherit; color: inherit; }
.pr .num { font-variant-numeric: tabular-nums; }

/* filters: service and length */
.pr-filters { display: grid; gap: 10px; margin-bottom: 14px; }
.pr-svc { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: 0 0 0 1px var(--pr-line) inset; max-width: 460px; }
.pr-svc button { height: 44px; border: 0; border-radius: 12px; background: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 14.5px; color: var(--pr-muted); cursor: pointer; }
.pr-svc button img { width: 22px; height: 22px; border-radius: 6px; opacity: .7; }
.pr-svc button.on { background: rgba(255,255,255,.09); color: var(--pr-text); }
.pr-svc button.on img { opacity: 1; }
.pr-dur { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pr-dur button { flex: none; height: 34px; padding-inline: 14px; border-radius: 999px; border: 1px solid var(--pr-line-2); background: none; font-weight: 700; font-size: 13px; color: var(--pr-muted); cursor: pointer; }
.pr-dur button.on { background: var(--pr-text); border-color: var(--pr-text); color: #0b0c0d; }
.pr-dur button[hidden] { display: none; }

/* rows */
.pr-rows { display: grid; gap: 10px; align-content: start; }
/* protocol heading above its plans (buy page, sections mode) */
.pr-sec-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 4px 2px; }
.pr-sec-h:first-child { margin-top: 0; }
.pr-sec-h[hidden] { display: none; }
.pr-svc.pr-svc-3 { grid-template-columns: repeat(3, 1fr); }
.pr-sec-h img { flex: none; width: 36px; height: 36px; border-radius: 10px; }
.pr-sec-h > div { display: grid; gap: 3px; min-width: 0; }
.pr-sec-h b { font-size: 16px; color: var(--pr-text); }
.pr-sec-h small { font-size: 12.5px; line-height: 1.8; color: var(--pr-muted); }
.pr-row { border-radius: 20px; background: var(--pr-row); box-shadow: 0 0 0 1px var(--pr-line) inset; overflow: hidden; transition: box-shadow .15s, background .15s; }
.pr-row[hidden] { display: none; }
/* a service without active plans */
.pr-none { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; border-radius: 20px; background: var(--pr-row); box-shadow: 0 0 0 1px var(--pr-line) inset; }
.pr-none[hidden], .pr-bar[hidden] { display: none; }
.pr-none img { border-radius: 10px; opacity: .6; margin-bottom: 6px; }
.pr-none b { font-size: 15px; }
.pr-none small { color: var(--pr-muted); font-size: 13px; }

/* switching service or length: the shown plans fade out, the new ones rise in one after another (plan-picker.js) */
.pr-rows.pr-leave .pr-row:not([hidden]) { opacity: 0; transform: translateY(-6px); transition: opacity .15s ease, transform .15s ease; }
.pr-row.pr-in { animation: pr-in .38s cubic-bezier(.2, .75, .25, 1) both; animation-delay: calc(var(--pr-i, 0) * 50ms); }
@keyframes pr-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.pr-svc button, .pr-dur button { transition: background .2s ease, color .2s ease, border-color .2s ease; }
.pr-svc button img { transition: opacity .2s ease; }

.pr-row.on { box-shadow: 0 0 0 1.5px var(--pr-green) inset; background: rgba(22,227,156,.05); }
.pr-row.hot { box-shadow: 0 0 0 1px rgba(255,138,58,.35) inset; }
.pr-row.hot.on { box-shadow: 0 0 0 1.5px var(--pr-hot) inset; background: rgba(255,122,26,.06); }
.pr-row.off { opacity: .55; }
.pr-h { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 15px 16px; border: 0; background: none; text-align: right; cursor: pointer; }
.pr-h:disabled { cursor: not-allowed; }
.pr-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--pr-line-2); display: grid; place-items: center; flex: none; }
.pr-row.on .pr-dot { border-color: var(--pr-green); }
.pr-row.on .pr-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pr-green); }
.pr-row.hot.on .pr-dot { border-color: var(--pr-hot); }
.pr-row.hot.on .pr-dot::after { background: var(--pr-hot); }
.pr-t { min-width: 0; }
.pr-t b { display: flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 800; }
.pr-t small { display: block; font-size: 12.5px; color: var(--pr-muted); margin-top: 3px; line-height: 1.8; }
.pr-p { text-align: left; white-space: nowrap; }
.pr-p s { display: block; font-size: 12.5px; color: var(--pr-was); }
.pr-p b { display: block; font-size: 17px; font-weight: 900; }
.pr-p small { font-size: 11.5px; color: var(--pr-muted); }
.pr-row.unl .pr-p b { color: var(--pr-green); }
.pr-row.hot .pr-p b { color: var(--pr-hot-2); }

/* the chosen row opens */
.pr-b { display: none; gap: 12px; padding: 0 16px 16px; }
.pr-row.on .pr-b { display: grid; }
.pr-b ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13.5px; color: #d2dad6; }
.pr-b li { display: flex; gap: 9px; align-items: center; }
.pr-b li svg { color: var(--pr-green); flex: none; }
.pr-save { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px; background: rgba(255,122,26,.1); border: 1px solid rgba(255,122,26,.25); font-size: 13px; color: var(--pr-hot-text); }
.pr-save span { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.pr-cap { display: grid; gap: 7px; padding: 11px 12px; border-radius: 13px; background: rgba(255,255,255,.04); }
.pr-cap div { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--pr-muted); }
.pr-cap b { color: var(--pr-scarce); }
.pr-trk { height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.pr-trk i { display: block; height: 100%; border-radius: inherit; margin-inline-start: auto; background: linear-gradient(270deg, #ffb03a, #f05a3a); }

/* unlimited: infinity loop with one running light */
.pr-loop { height: 92px; display: grid; place-items: center; border-radius: 15px; background: radial-gradient(60% 80% at 50% 50%, rgba(22,227,156,.12), transparent 70%), rgba(255,255,255,.03); }
.pr-loop svg { width: 50%; max-width: 190px; overflow: visible; }
.pr-mini { width: 32px; height: 16px; display: inline-flex; }
.pr-mini svg { width: 100%; height: 100%; overflow: visible; }
.pr .base { fill: none; stroke: rgba(22,227,156,.18); stroke-width: 5; }
.pr .run { fill: none; stroke: var(--pr-green); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 24 76; animation: pr-run 2.8s linear infinite; filter: drop-shadow(0 0 4px rgba(22,227,156,.75)); }
@keyframes pr-run { to { stroke-dashoffset: -100; } }

/* a discounted card speaks one colour: orange leads, the loop and checks follow */
.pr-row.hot .pr-loop { background: radial-gradient(60% 80% at 50% 50%, rgba(255,122,26,.13), transparent 70%), rgba(255,255,255,.03); }
.pr-row.hot .base { stroke: rgba(255,122,26,.2); }
.pr-row.hot .run { stroke: var(--pr-hot); filter: drop-shadow(0 0 4px rgba(255,122,26,.75)); }
.pr-row.hot .pr-b li svg { color: var(--pr-hot); }
.pr-row.hot .pr-cap { background: rgba(255,122,26,.06); }

/* special offer: small flame + countdown */
.pr-flame { width: 15px; height: 19px; display: inline-block; position: relative; flex: none; }
.pr-flame i { position: absolute; left: 50%; bottom: 0; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; transform-origin: 50% 100%; animation: pr-flick .9s ease-in-out infinite alternate; }
.pr-flame i:nth-child(1) { width: 13px; height: 17px; margin-left: -6.5px; background: radial-gradient(60% 70% at 50% 75%, #ffd36b, #ff7a1a 55%, #e2380f 80%, transparent 82%); }
.pr-flame i:nth-child(2) { width: 6px; height: 9px; margin-left: -3px; background: radial-gradient(60% 70% at 50% 75%, #fffbe8, #ffd36b 60%, transparent 70%); animation-duration: .6s; }
@keyframes pr-flick { 50% { transform: scale(.92, 1.08) skewX(4deg); } 100% { transform: scale(1.05, .95) skewX(-4deg); } }
.pr-clock { display: inline-flex; gap: 2px; direction: ltr; font-family: "Vazirmatn", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--pr-hot-text); }
.pr-clock b { font-family: inherit; direction: rtl; margin-left: 4px; font-weight: 700; }

/* buy bar: stuck to the bottom while the rows are on screen */
.pr-bar { position: sticky; bottom: var(--pr-bar-bottom); z-index: 30; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 20px;
  background: rgba(14,16,17,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--pr-line-2) inset, 0 -12px 30px -12px rgba(0,0,0,.6); }
.pr-sel { flex: 1; min-width: 0; }
.pr-sel > small { display: block; font-size: 12px; color: var(--pr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-sel b { font-size: 19px; font-weight: 900; }
.pr-sel > span { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.pr-sel s { font-size: 13px; color: var(--pr-was); margin-inline-start: 4px; }
.pr-sel s:empty { display: none; }
.pr-sel span > small { font-size: 12px; color: var(--pr-muted); }
.pr-buy { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding-inline: 28px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap;
  background: linear-gradient(180deg, #5ce7b8, #33c996); color: var(--pr-ink); box-shadow: 0 10px 26px -12px rgba(22,227,156,.8); position: relative; overflow: hidden; }
.pr-buy.hot { background: linear-gradient(90deg, #ff6a1a, #ff9f2e); color: #2a1000; box-shadow: 0 10px 26px -12px rgba(255,122,26,.8); }
.pr-buy.hot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-120%); animation: pr-sweep 2.8s ease-in-out infinite; }
@keyframes pr-sweep { 55%, 100% { transform: translateX(120%); } }

/* wide: rows beside a sticky summary card */
@container (min-width: 760px) {
  .pr-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
  .pr-bar { position: sticky; top: 96px; bottom: auto; margin-top: 0; flex-direction: column; align-items: stretch; gap: 14px; padding: 20px; border-radius: 22px; }
  .pr-sel b { font-size: 30px; }
  .pr-buy { height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .pr .run, .pr-flame i, .pr-buy.hot::after, .pr-row.pr-in { animation: none; }
  .pr-rows.pr-leave .pr-row { transition: none; }
}

/* panel on phones: keep the bar above the tab bar */
@media (max-width: 640px) { .app .pr { --pr-bar-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }

/* before a plan is picked: the bar only asks for a choice */
.pr-bar.empty .pr-sel > span { display: none; }
.pr-bar.empty .pr-sel > small { font-size: 14px; font-weight: 700; color: var(--pr-text); }
.pr-buy.off { background: #222427; color: var(--pr-faint); box-shadow: none; pointer-events: none; }

/* bar icon and plan details: only on the grid layout */
.pr-ic, .pr-meta, .pr-bar-t, .pr-note { display: none; }

/* panel buy page on wide screens: plans as a grid of equal cards instead of full-width rows */
.pr-grid { max-width: 1600px; } /* 4 cards (~300) + gaps + buy card (320) */
@container (min-width: 760px) {
  .pr-grid .pr-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
  /* room for 4 cards a row whatever the count, so the buy card keeps its place; more plans wrap */
  .pr-grid .pr-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
  .pr-grid .pr-row { display: flex; flex-direction: column; min-height: 408px; border-radius: 24px; cursor: pointer; transition: box-shadow .15s, background .15s, transform .15s; }
  .pr-grid .pr-row:not(.off):hover { transform: translateY(-2px); }
  .pr-grid .pr-row[hidden] { display: none; }
  .pr-grid .pr-body:has(> .pr-bar[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .pr-grid .pr-row.off { cursor: not-allowed; }
  .pr-grid .pr-h { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "dot t" "p p"; row-gap: 26px; padding: 30px 22px 0; align-items: start; }
  .pr-grid .pr-dot { grid-area: dot; margin-top: 2px; }
  .pr-grid .pr-t { grid-area: t; }
  .pr-grid .pr-t b { font-size: 17px; line-height: 1.6; flex-wrap: wrap; }
  .pr-grid .pr-t small { font-size: 13.5px; }
  .pr-grid .pr-p { grid-area: p; text-align: right; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; padding-bottom: 26px; border-bottom: 1px solid var(--pr-line); }
  .pr-grid .pr-p b { font-size: 29px; order: 1; }
  .pr-grid .pr-p small { order: 2; font-size: 13px; }
  .pr-grid .pr-p s { order: 3; font-size: 13px; }
  /* every card shows its details so the cards line up; the chosen one is outlined */
  .pr-grid .pr-b { display: grid; flex: 1; align-content: start; gap: 18px; padding: 26px 22px 32px; }
  .pr-grid .pr-loop { height: 78px; }
  .pr-grid .pr-save { flex-wrap: wrap; font-size: 13.5px; }
  .pr-grid .pr-b ul { font-size: 14.5px; gap: 18px; }
  /* two columns: plans on the right, a sticky buy card on the left */
  .pr-grid .pr-bar { position: sticky; top: 96px; bottom: auto; margin-top: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas: "t t" "ic n" "ic m" "p p" "b b" "x x"; column-gap: 12px; row-gap: 4px; align-items: center; padding: 22px; border-radius: 24px;
    background: linear-gradient(180deg, rgba(22,227,156,.06), transparent 45%), rgba(14,16,17,.97);
    box-shadow: 0 0 0 1px var(--pr-line-2) inset, 0 24px 50px -24px rgba(0,0,0,.8); transition: box-shadow .15s; }
  .pr-grid .pr-bar:not(.empty) { box-shadow: 0 0 0 1.5px rgba(22,227,156,.45) inset, 0 24px 50px -24px rgba(0,0,0,.8); }
  .pr-grid .pr-bar.hot { background: linear-gradient(180deg, rgba(255,122,26,.08), transparent 45%), rgba(14,16,17,.97); }
  .pr-grid .pr-bar.hot:not(.empty) { box-shadow: 0 0 0 1.5px rgba(255,122,26,.5) inset, 0 24px 50px -24px rgba(0,0,0,.8); }
  .pr-grid .pr-bar-t { grid-area: t; display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--pr-muted); }
  .pr-grid .pr-ic { grid-area: ic; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(22,227,156,.12); color: var(--pr-green); }
  .pr-grid .pr-bar.hot .pr-ic { background: rgba(255,122,26,.12); color: var(--pr-hot); }
  .pr-grid .pr-bar.empty .pr-ic { background: rgba(255,255,255,.05); color: var(--pr-faint); }
  .pr-grid .pr-sel { display: contents; }
  .pr-grid .pr-sel > small[data-bar-name] { grid-area: n; align-self: end; font-size: 16px; font-weight: 800; color: var(--pr-text); white-space: normal; line-height: 1.6; }
  .pr-grid .pr-meta { grid-area: m; align-self: start; display: block; font-size: 13px; color: var(--pr-muted); }
  .pr-grid .pr-bar.empty .pr-meta { display: none; }
  .pr-grid .pr-bar.empty .pr-sel > small[data-bar-name] { grid-row: 2 / 4; align-self: center; font-size: 14.5px; font-weight: 700; color: var(--pr-muted); }
  .pr-grid .pr-sel > span { grid-area: p; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--pr-line-2); }
  .pr-grid .pr-sel > span::before { content: "مبلغ قابل پرداخت"; flex-basis: 100%; margin-bottom: 4px; font-size: 12.5px; color: var(--pr-muted); }
  .pr-grid .pr-sel b { font-size: 32px; }
  .pr-grid .pr-bar.hot .pr-sel b { color: var(--pr-hot-2); }
  .pr-grid .pr-buy { grid-area: b; width: 100%; height: 54px; margin-top: 18px; font-size: 16px; }
  .pr-grid .pr-note { grid-area: x; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--pr-faint); }
  .pr-grid .pr-note svg { color: var(--pr-green); }
}
@container (min-width: 1080px) { .pr-grid .pr-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1320px) { .pr-grid .pr-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .pr-grid .pr-row:hover { transform: none; } }
