/* Hrava studio - commerce family: /buy/, /account/, /reset/. Loads after core.css (page.css is not loaded here), uses only its tokens.
   buy and account link tw.css BEFORE core: their scripts write Tailwind class names. Reference and reasons: docs/site-redesign/class-index.md
   Parts other families may want: st-shop-head, st-items, the 44px legacy button. */

/* these pages have no hero: the h1 stands on the ground, at the top of the one band */
.st-shop-head{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-stack);justify-items:start}

/* ---- /buy/: words, plan, order (with the terms under the pay button), the rest. From 1100 the order stands beside the
   other three. Not sticky: the panel is taller than a laptop window, so its end would stay out of reach ---- */
.st-buy{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--st-gap);row-gap:var(--st-head);align-items:start}
.st-buy>*{grid-column:1/-1;min-width:0}
@media (min-width:1100px){
  .st-buy{grid-template-rows:auto auto 1fr}
  .st-buy>:not(.st-buy__order){grid-column:1/8}
  .st-buy__order{grid-column:8/13;grid-row:1/4}
}
/* signed in (the page sets html.is-member before it paints): all three plans, lifetime only or nothing to buy - the
   account's answer decides. Until it is in, everything under the heading holds its place unseen, so nothing jumps
   when it arrives. The page drops the class after 4s by itself: a script that never runs cannot hide the checkout */
html.is-member .st-main:has(#orderAction>.st-js) :is(.st-lede,.st-buy__main,.st-buy__order,.st-buy__more){visibility:hidden}
/* a terminal state ("Payment received", "Hrava is already yours", "Checkout opens soon") takes the order panel over */
.st-buy:has(.st-order__state) :is(.st-buy__main,.st-order__live,.st-shop-head>.st-lede){display:none}
.st-buy:has(.st-order__state) .st-order>*{border-top:0}
/* the code is sent when the checkout opens: no field beside an open frame */
.st-order:has(.checkout-container) :is(#promoBox,#promoOff){display:none}
/* the trial is for someone who has nothing yet */
#onlyNote:not([hidden])~.st-note{display:none}

.st-order .st-stack>*{justify-self:stretch}
/* room for the pay button before the page knows who is asking: nothing below it jumps */
#orderAction{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--st-3);align-content:start;min-height:calc(var(--st-9) + var(--st-5))}
/* without JavaScript the waiting line (.st-js, core) goes and a sentence says what the page needs */
.st-nojs{padding-block:var(--st-section)}
/* a note with nothing to say takes no room: core does that for .st-form__note, these three are not one
   (never the checkout container: Paddle mounts its frame into it while it is empty) */
:is(#renewNote,#licMeta,.note):empty{display:none}
@media (max-width:640px){.checkout-container{margin-inline:calc(var(--st-3)*-1)}}

/* the promo result client.js draws with inline styles: the code and what it takes off as a line of the receipt above the total */
#totalVal:has(>s){color:var(--st-gold)!important}
#totalVal>s{margin-inline-end:var(--st-2)!important;font-size:var(--st-fs-small)!important;font-weight:400!important;color:var(--st-text-3)!important;text-decoration-thickness:1px!important}
#promoBadge{flex-direction:row-reverse;justify-content:space-between;align-items:baseline!important;gap:var(--st-4)!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important}
#promoBadge>b{font-size:var(--st-fs-body)!important;line-height:1.5!important;font-weight:700!important;font-variant-numeric:tabular-nums;color:var(--st-gold)!important}
#promoBadge>span{padding:0!important;border-radius:0!important;background:none!important;font-size:var(--st-fs-label)!important;font-weight:600!important;text-transform:uppercase;color:var(--st-text-3)!important}
#promoBadge>span:last-child{display:none}

/* the picker's host stands between the panel and its rows, so core's first-row corner cannot see them */
[data-picker]>.st-plan:first-of-type{border-start-start-radius:calc(var(--st-r-surface) - 1px);border-start-end-radius:calc(var(--st-r-surface) - 1px)}
[data-picker]>.st-plan:first-of-type::before{top:var(--st-4)}

/* ---- sign in / create account / reset: one panel on the content edge, the world beside it ---- */
.st-auth{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--st-gap)}
.st-auth>*{grid-column:1/-1;width:100%;max-width:34em;justify-self:center}
.st-auth .st-panel>*{justify-self:stretch}
/* /reset/: a refused link shows the request form under the password form */
#setView:not([hidden])+#askView{padding-top:var(--st-stack);border-top:1px solid var(--st-line)}
.note{font-size:var(--st-fs-small);line-height:1.5;color:var(--st-text-3)}
.note.ok{color:var(--st-text-2)}
.note.ok::before{content:"";display:inline-block;width:6px;height:6px;margin-inline-end:6px;vertical-align:1px;background:var(--st-ok)}
.note.err,html[data-site-design=studio] .text-red-400{color:var(--st-err)}

/* ---- /account/: the things you own on 1-7, the quiet column on 8-12 ---- */
.st-acct{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--st-gap);row-gap:var(--st-head);align-items:start}
.st-acct>*{grid-column:1/-1;min-width:0}
@media (min-width:1100px){.st-acct__main{grid-column:1/8}.st-acct__side{grid-column:8/13}}
/* the last row of the dashboard, under both columns: what it does on 1-7, the button on 8-12 */
.st-danger{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:var(--st-stack) var(--st-gap);align-items:start;padding-top:var(--st-head);border-top:1px solid var(--st-line)}
.st-danger>*{grid-column:1/-1}
@media (min-width:1100px){.st-danger>:first-child{grid-column:1/8}.st-danger>:last-child{grid-column:8/13}}
/* /account/ decides what to show after its first paint, /reset/ is one short panel: main fills the first screen
   under the header and one step more (--st-step, the rise of the footer's parapet), so the whole footer waits below the fold
   instead of jumping */
:is([data-template=account],[data-template=reset]) .st-main{display:flex;flex-direction:column;min-height:calc(100svh - var(--st-header) + var(--st-step))}
/* the signed-in header is an account menu, not an offer. Which one it is, the page knows only after its first paint:
   until then the two parts that would swap stay unseen in their places, so nothing in the header jumps */
.sg-header:has(.sg-user-menu) .sg-buy{display:none}
html.js [data-template=account]:not(:has(.st-main>section:not(.hidden))) .sg-header :is(.sg-account,.sg-buy){visibility:hidden}

/* the plan you are on: name and state on the left, the figure on the right, as in a plan row */
.st-planhead{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--st-2) var(--st-4);align-items:baseline}
.st-planhead>.st-text{grid-column:1/-1}

/* a panel of rows: what it is on the left, the one thing to do with it on the right (the key, a Mac, a receipt) */
.st-items{padding:0}
.st-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--st-2) var(--st-4);min-height:var(--st-9);padding:var(--st-3) var(--st-5)}
.st-item+.st-item{border-top:1px solid var(--st-line)}
.st-item :is(b,.st-small){display:block;overflow-wrap:anywhere}
.st-item b{font-weight:600}
@media (max-width:640px){
  .st-item{grid-template-columns:minmax(0,1fr);padding-inline:var(--st-4)}
  .st-item>.btn{justify-self:start}
}
/* the licence key: Onest, never a monospace */
#licKey{font:700 var(--st-fs-lede)/1.3 var(--st-font);letter-spacing:.08em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--st-gold)}

/* the picker plans.js mounts (button rows inside a host the account script renames): the select form of the plan panel */
[data-picker]{grid-column:1/-1;margin:0}
[data-picker]:has(.pk-plan),html[data-site-design=studio] .pk-top{display:contents}
/* no picker (payments off, or one plan on sale): the host keeps its one line, the lifetime price as a plan row prints it */
[data-picker]:not(:has(.pk-plan)){display:flex;align-items:baseline;gap:6px;padding:var(--st-5);border-bottom:1px solid var(--st-line);font-size:var(--st-fs-small);color:var(--st-text-3)}
#offerPrice{font-size:var(--st-fs-h3);line-height:1;font-weight:700;color:var(--st-text)}
[dir=rtl] :is(#offerPrice,#totalVal,#promoBadge>b){direction:ltr;unicode-bidi:isolate}
[data-picker]>.pk-title{display:none}
.st-plan__price>.pk-per{min-width:3.75em;font-size:var(--st-fs-small);font-weight:400;color:var(--st-text-3)}

/* in-panel actions written with the legacy button classes take the 44px tier */
html[data-site-design=studio] :is(.st-actions,.st-plan,.st-item)>.btn{--btn-h:44px;--btn-ps:18px;--btn-pe:14px;--ring:72px;gap:var(--st-3);font-size:var(--st-fs-small)}
html[data-site-design=studio] :is(#deleteBtn,#delConfirm:enabled){border-color:var(--st-err);color:var(--st-err)}
#delConfirm{opacity:1!important}

/* strings of the 16-language dictionaries carry these Tailwind classes */
html[data-site-design=studio] a.text-cy{color:var(--st-text);text-decoration:underline 1px var(--st-line-2);text-underline-offset:3px}
html[data-site-design=studio] .text-white{color:var(--st-text)}

/* #delModal: core draws the dialog; this is what its two lists and its rhythm still need */
#delModal>div{max-height:calc(100svh - var(--st-7));overflow-y:auto}
#delModal :is(ul,#delLicWarn,input,textarea){margin-bottom:var(--st-5)}
#delModal textarea{display:block;resize:vertical}
#delModal li:first-child::before{background:var(--st-err)}
#delModal li:last-child::before{background:var(--st-ok)}
