/* Pricing plan cards — one component for every product page (source: NEO Web Hosting #paket).
   Used by NEO Web Hosting, NEO WordPress, NEO Lite Pro and NEO App Platform.

   Markup: .nwh-plan-grid > article.nwh-plan[.is-featured] > .product-graphic (capacity board SVG)
   + .nwh-plan-body > .nwh-plan-top (h3 [+ p.nwh-plan-use]) · .nwh-plan-price[data-period-show]
   (one per billing period) · ul.nwh-plan-features · a.nwh-plan-cta.
   The period toggle (.neo-plan-filters [data-period]) and the promo-code copy buttons are wired in
   plans.js. Grid modifier .is-3 lays out three cards per row on desktop (9- or 5-plan pages). */

/* base pieces the cards rely on (also defined in promo.css for the promo page) */
.nwh-plan .promo-price{display:flex;flex-wrap:wrap;margin:0;color:var(--ink)}
.nwh-plan .promo-price s{font-size:14px;color:var(--muted);text-decoration-thickness:1px}
.nwh-plan .promo-price strong{font-weight:600;letter-spacing:-.02em}
.nwh-plan .promo-price small{font-size:14px;line-height:20px;color:var(--muted)}
.nwh-plan .promo-badge{display:inline-flex;align-items:center;gap:6px;min-height:22px;padding:2px 10px 2px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 12%,transparent);color:var(--primary-text);font-size:11px;line-height:18px;font-weight:600;letter-spacing:.06em;white-space:nowrap}
.nwh-plan .promo-badge::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--primary);flex-shrink:0}
.nwh-plan .promo-code code{font:600 13px/20px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.04em;color:var(--primary-text);user-select:all}
.nwh-plan .promo-tag-on{fill:#118D62;stroke:#7DE1BB}

/* Plan cards — one shared row structure. Every card is a column of the same five rows
   (capacity graphic · name · price block · features · button), laid out with CSS subgrid
   so each row takes the height of its tallest card: a longer name, a wrapped badge, a longer code
   note or an extra feature pushes that row down in all cards of the line together, and the buttons
   always sit on one line at the bottom. No fixed heights; everything wraps instead of clipping.
   Phones (≤700px) stack the cards and drop the cross-card alignment. */
.nwh-plan-grid{--plan-w:calc((100% - 72px) / 4);display:grid;grid-template-columns:repeat(4,minmax(0,var(--plan-w)));justify-content:center;column-gap:24px;row-gap:24px;background:none;border:0}
.nwh-plan{display:grid;grid-row:span 5;grid-template-rows:subgrid;row-gap:0;min-width:0;background:var(--surface);border:1px solid var(--line);overflow:hidden}
.nwh-plan.is-featured{border-color:var(--primary);box-shadow:inset 0 2px var(--primary)}
.nwh-plan>.product-graphic{grid-row:1;display:flex;flex-direction:column;justify-content:center;border-right:0;border-bottom:1px solid var(--line);padding:16px 18px 10px;min-height:0}
.nwh-plan-svg{margin-top:0}
.nwh-fill{fill:var(--primary);stroke:#7DE1BB;stroke-width:.8}
.nwh-ghost{fill:none;stroke:#6F9C86;stroke-width:1;stroke-dasharray:4 3}
.nwh-ram-on{fill:#245740}
[data-theme=dark] .nwh-ram-on{fill:#477E63;stroke:#7DE1BB}
.nwh-off{fill:var(--muted);opacity:.7}
.nwh-yes,.nwh-no{width:18px;height:18px;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nwh-yes{stroke:var(--primary-text)}
.nwh-no{stroke:var(--muted);opacity:.6}
.nwh-plan-body{grid-row:2 / span 4;display:grid;grid-template-rows:subgrid;row-gap:16px;padding:24px 22px 22px;min-width:0}
.nwh-plan-body>*{min-width:0}
/* Plan name: full card width, wraps freely; the price row starts at one height in all cards. */
.nwh-plan-top{grid-row:1;min-width:0}
.nwh-plan h3{margin:0;min-width:0;font-size:20px;line-height:28px;letter-spacing:-.02em;overflow-wrap:anywhere}
/* price block: normal price on its own line, then the price and its period together */
.nwh-plan-price{grid-row:2;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.nwh-plan-price[hidden]{display:none}
/* line 1: normal price + promo badge; line 2: price and period (the ::before is the line break) */
.nwh-plan .promo-price{gap:4px 8px;align-items:baseline}
.nwh-plan .promo-price::before{content:"";order:1;flex-basis:100%;height:0}
.nwh-plan .promo-price>s,.nwh-plan .promo-price>.promo-badge{order:0}
.nwh-plan .promo-price>strong,.nwh-plan .promo-price>small{order:2}
.nwh-plan .promo-price>s{line-height:22px}
.nwh-plan .promo-price>.promo-badge{max-width:100%;align-self:center}
.nwh-plan .promo-price strong{font-size:26px;line-height:34px;overflow-wrap:anywhere}
.nwh-plan .promo-price small{white-space:nowrap}
.nwh-code-note{margin:0;font-size:13px;line-height:20px;color:var(--muted)}
/* Promo code: the original outlined chip (dashed border on paper), stretched to the full width of
   the card's content area; code on the left (wraps if long), copy icon pinned on the right. */
.nwh-plan .promo-code{display:flex;align-items:center;align-self:stretch;width:100%;max-width:none;gap:8px;min-height:36px;padding:0 0 0 10px;border:1px dashed #6F9C86;background:var(--paper)}
.nwh-plan .promo-code:not(:has(.agent-copy:not([hidden]))){padding-right:10px}
.nwh-plan .promo-code code{flex:1 1 auto;min-width:0;padding:8px 0;overflow-wrap:anywhere}
.nwh-plan .promo-code .agent-copy-icon{position:relative;display:grid;place-items:center;flex:none;align-self:stretch;width:40px;min-height:34px;margin-left:auto;padding:0;border-left:1px dashed #6F9C86;color:var(--primary-text);transition:background .2s}
.nwh-plan .promo-code .agent-copy-icon[hidden]{display:none}
.nwh-plan .promo-code .agent-copy-icon:hover{background:color-mix(in srgb,var(--primary) 14%,transparent);text-decoration:none}
.nwh-plan .promo-code .agent-copy-icon:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
.nwh-plan .promo-code .agent-copy-icon svg{grid-area:1/1;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;transition:opacity .2s,transform .2s}
.nwh-plan .promo-code .agent-copy-icon .icon-done{opacity:0;transform:scale(.6)}
.nwh-plan .promo-code .agent-copy-icon.is-copied .icon-copy{opacity:0;transform:scale(.6)}
.nwh-plan .promo-code .agent-copy-icon.is-copied .icon-done{opacity:1;transform:none}
/* features: icon centred on the first line, wrapped lines align with the text */
.nwh-plan-features{grid-row:3;list-style:none;display:flex;flex-direction:column;gap:6px;margin:0;padding:16px 0 4px;border-top:1px solid var(--line)}
.nwh-plan-features li{display:grid;grid-template-columns:18px minmax(0,1fr);column-gap:10px;align-items:start;font-size:14px;line-height:22px}
.nwh-plan-features li>svg{margin-top:2px}
.nwh-plan-features li>span{min-width:0;overflow-wrap:anywhere}
.nwh-plan-cta{grid-row:4;align-self:end;justify-content:space-between}

/* hourly / reference rate shown on the first price line (NEO App) */
.nwh-plan .promo-price>.plan-rate{order:0;font-size:14px;line-height:22px;color:var(--muted)}
/* one-line description under the plan name (NEO App) */
.nwh-plan-use{margin:4px 0 0;font-size:14px;line-height:22px;color:var(--muted)}
/* three cards per row on desktop */
.nwh-plan-grid.is-3{grid-template-columns:repeat(3,minmax(0,var(--plan-w)))}
/* Card width: one card of the reference four-column grid (--plan-w: container minus the three
   24px gaps, divided by four; two columns on tablet, one on phones). Every grid uses that width as
   its column maximum and centres its columns, so 1-, 2- and 3-card grids keep the reference card
   width with 24px gaps instead of stretching. When fewer cards are visible than the grid has
   columns (a short grid or a filtered one), the empty columns collapse and the cards stay centred. */
.nwh-plan-grid:not(:has(> :nth-child(4 of .nwh-plan:not([hidden])))),
.nwh-plan-grid.is-3:not(:has(> :nth-child(3 of .nwh-plan:not([hidden])))){grid-template-columns:repeat(auto-fit,minmax(0,var(--plan-w)))}
.nwh-plan[hidden]{display:none}

/* period toggle row */
.nwh-toolbar{flex-wrap:wrap}

@media(max-width:1200px){
  .nwh-plan-grid{--plan-w:calc((100% - 24px) / 2)}
  .nwh-plan-grid,.nwh-plan-grid.is-3{grid-template-columns:repeat(2,minmax(0,var(--plan-w)))}
}
@media(max-width:700px){
  .nwh-plan-grid{--plan-w:100%}
  .nwh-plan-grid,.nwh-plan-grid.is-3{grid-template-columns:minmax(0,1fr)}
  .nwh-plan{display:flex;flex-direction:column}
  .nwh-plan-body{display:flex;flex-direction:column;gap:16px;flex:1}
  .nwh-plan-cta{margin-top:auto;align-self:stretch}
}

/* ---------- Pricing section layout: one centred column ----------
   Applies to every section that holds a plan grid. Heading, toolbar, cards and note share one
   centre line: the heading block and its description are centred within a 1200px measure (balanced
   heading lines), the toolbar centres its control groups — the billing-period switch
   reads as one segmented control, plan filters stay separate chips, divided by a hairline — with
   the plan count on its own quiet line, and the note under the grid is centred at a short measure. */
:root body section:has(> .nwh-plan-grid) > :is(.section-heading,.neo-section-heading){
  align-items:center;text-align:center;max-width:1200px;margin-left:auto;margin-right:auto;gap:16px}
:root body section:has(> .nwh-plan-grid) > :is(.section-heading,.neo-section-heading) > *{width:auto;max-width:100%}
:root body section:has(> .nwh-plan-grid) > :is(.section-heading,.neo-section-heading) h2{text-wrap:balance}
:root body section:has(> .nwh-plan-grid) > :is(.section-heading,.neo-section-heading) p{max-width:1200px;margin-left:auto;margin-right:auto;text-wrap:pretty}

:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px 16px;margin-bottom:32px}
:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;width:auto}
/* billing period: one segmented control (shared edges, selected segment on top) */
:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters:has([data-period]){gap:0;flex-wrap:nowrap}
:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters:has([data-period]) > button+button{margin-left:-1px}
:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters:has([data-period]) > button[aria-pressed=true]{position:relative;z-index:1}
/* two groups side by side: a hairline between the switch and the filters */
:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters + .neo-plan-filters{padding-left:16px;border-left:1px solid var(--line)}
/* plan count / billing meta: its own centred line under the controls */
:root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .technical{flex-basis:100%;order:1;text-align:center;margin:0}

:root body section:has(> .nwh-plan-grid) > :is(.neo-price-note,.pd-plan-note){max-width:640px;margin:32px auto 0;text-align:center;text-wrap:pretty}

@media(max-width:700px){
  :root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar{flex-direction:column;align-items:stretch;gap:12px;margin-bottom:24px}
  :root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters{display:flex;width:100%}
  :root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters > button{flex:1 1 calc(50% - 4px);text-align:center;justify-content:center}
  :root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters:has([data-period]){flex-wrap:wrap}
  :root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters:has([data-period]) > button{flex-basis:0}
  :root body section:has(> .nwh-plan-grid) > .neo-plan-toolbar > .neo-plan-filters + .neo-plan-filters{padding-left:0;border-left:0;padding-top:12px;border-top:1px solid var(--line)}
  :root body section:has(> .nwh-plan-grid) > :is(.neo-price-note,.pd-plan-note){margin-top:24px}
}
