/* Spirit Gift Store — structural CSS only. Visual styling (colours, type, radius, shadows) belongs to the theme.
   Everything is wrapped in :where() so any theme selector wins. */
:where(.sgs-sr-only){position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:where([data-sgs-gate],[data-sgs-products],[data-sgs-track]) [hidden]{display:none!important}

/* Gate card */
:where(.sgs-gate){box-sizing:border-box;width:100%;max-width:440px}
:where(.sgs-gate__ticket){display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px}
:where(.sgs-gate__ticket-text){display:flex;flex-direction:column;text-align:right}
:where(.sgs-gate__form){display:flex;flex-direction:column;gap:8px}
:where(.sgs-gate__input){box-sizing:border-box;width:100%;min-height:52px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.08em;text-transform:uppercase}
:where(.sgs-gate__error:empty){display:none}
:where(.sgs-gate__submit){display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;cursor:pointer}
:where(.sgs-gate__submit[disabled]){cursor:progress}
:where(.sgs-gate__spinner){display:none;width:1em;height:1em;border:2px solid currentColor;border-right-color:transparent;border-radius:50%}
:where([data-sgs-state="loading"]) :where(.sgs-gate__spinner){display:inline-block;animation:sgs-spin .8s linear infinite}
@keyframes sgs-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){:where([data-sgs-state="loading"]) :where(.sgs-gate__spinner){animation:none}}

/* Gift grid */
:where(.sgs-grid){list-style:none;margin:0;padding:0;display:grid;gap:24px;grid-template-columns:1fr}
@media (min-width:640px){:where(.sgs-grid--2,.sgs-grid--3,.sgs-grid--4){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1024px){:where(.sgs-grid--3){grid-template-columns:repeat(3,minmax(0,1fr))}:where(.sgs-grid--4){grid-template-columns:repeat(4,minmax(0,1fr))}}
:where(.sgs-card){position:relative;display:flex;flex-direction:column;min-width:0}
:where(.sgs-card__media){display:block;aspect-ratio:1/1;overflow:hidden}
:where(.sgs-card__image){display:block;width:100%;height:100%;object-fit:contain}
:where(.sgs-card__body){display:flex;flex-direction:column;gap:8px;flex:1}
:where(.sgs-card__pill){align-self:flex-start}
:where(.sgs-card__desc){overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
:where(.sgs-card__form){display:flex;flex-direction:column;gap:8px;margin-top:auto}
:where(.sgs-stepper){display:inline-flex;align-items:stretch;align-self:flex-start}
:where(.sgs-stepper__btn){min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
:where(.sgs-stepper__btn[disabled]){cursor:not-allowed;opacity:.45}
:where(.sgs-stepper__input){width:3.5em;min-height:44px;text-align:center;-moz-appearance:textfield;appearance:textfield}
:where(.sgs-stepper__input)::-webkit-outer-spin-button,:where(.sgs-stepper__input)::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
:where(.sgs-card__button,.sgs-button){display:inline-flex;align-items:center;justify-content:center;min-height:44px;cursor:pointer;text-decoration:none}
:where(.sgs-card__button[disabled]){cursor:not-allowed}

/* Sticky credits bar: bottom bar on mobile, top-right chip on desktop. */
:where(.sgs-credits-bar){position:fixed;z-index:50;left:0;right:0;bottom:0}
:where(.sgs-credits-bar__inner){margin:0;min-height:48px;display:flex;align-items:center;justify-content:center;gap:4px}
@media (min-width:1024px){:where(.sgs-credits-bar){left:auto;bottom:auto;top:96px;right:24px}}
:where(body:has(.sgs-credits-bar)){scroll-padding-bottom:64px}
@media (max-width:1023px){:where(body:has(.sgs-credits-bar)){padding-bottom:48px}}

/* Checkout: hide the payment radio (single no-charge method); keep the notice. */
:where(.woocommerce-checkout #payment .wc_payment_method.payment_method_sgs_no_charge) > input[type="radio"]{position:absolute;opacity:0;pointer-events:none}
:where(.woocommerce-checkout #payment .payment_method_sgs_no_charge .payment_box){display:block!important}
:where(.sgs-checkout__heading){flex-basis:100%;width:100%;clear:both}

/* Thank-you block */
:where(.sgs-thankyou){display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
:where(.sgs-thankyou__title){display:block}
