/* store screen styles. Loaded after the shared stylesheets so rules here can override them. */

/* Saved / unsaved state of the theme selection. theme-controls.js sets #themes[data-unsaved]. */
#themes .theme-save-state{display:flex;align-items:center;gap:8px;min-height:20px}
#themes[data-unsaved=true] .theme-save-state{width:fit-content;max-width:100%;box-sizing:border-box;padding:4px 10px;border:1px solid #e0a94a;border-radius:999px;background:#3a2c12;color:#ffd892;font-weight:650}
#themes[data-unsaved=true] .theme-save-state::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#f0b44c;box-shadow:0 0 0 3px #f0b44c40}
#themes[data-unsaved=true] .theme-selection-actions button:last-child:not(:disabled){background:#d8b76c;color:#201c12;border-color:#ffe6ad;font-weight:750;box-shadow:0 0 0 3px #f5d07a55}
#themes[data-unsaved=true] .theme-card[data-selected=true]{border-style:dashed;border-color:#f0b44c;outline-style:dashed;outline-color:#f0b44c;box-shadow:none}
#themes[data-unsaved=true] .theme-card[data-selected=true] [data-theme-choose]{background:#3a2c12;color:#ffd892;border-color:#e0a94a}

/* Sticky reminder at the bottom of the Store while there are unsaved changes. */
#themes .theme-unsaved-bar{position:sticky;bottom:12px;z-index:30;display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;margin:16px 0 0;padding:10px 12px 10px 16px;border:1px solid #d8b76c;border-radius:12px;background:#0b262bf5;color:#f4edda;box-shadow:0 10px 30px #0009;box-sizing:border-box}
#themes .theme-unsaved-bar[hidden]{display:none}
#themes .theme-unsaved-bar p{flex:1 1 220px;display:flex;flex-direction:column;gap:2px;margin:0;color:#c4cfc9;font-size:13px;line-height:1.35}
#themes .theme-unsaved-bar strong{display:flex;align-items:center;gap:8px;color:#ffd892;font-size:15px}
#themes .theme-unsaved-bar strong::before{content:"";flex:none;width:8px;height:8px;border-radius:50%;background:#f0b44c;box-shadow:0 0 0 3px #f0b44c40}
#themes .theme-unsaved-bar button{flex:0 0 auto;width:auto;min-width:0;min-height:44px;margin:0;padding:8px 14px;border-radius:8px;white-space:nowrap}
#themes .theme-unsaved-bar button.primary{background:#d8b76c;color:#201c12;border:1px solid #ffe6ad;font-weight:750}
#themes .theme-unsaved-bar button.primary:hover:not(:disabled){background:#edce83;color:#201c12}
@media (max-width:520px){#themes .theme-unsaved-bar{display:grid;grid-template-columns:1fr 1fr;bottom:8px;padding:10px}#themes .theme-unsaved-bar p{grid-column:1/-1}#themes .theme-unsaved-bar button{width:100%;padding:8px}}

/* "Save your theme selection?" dialog. It lives on <body> so it still shows after the Store view is hidden. */
.theme-leave-dialog{width:min(460px,calc(100vw - 32px));box-sizing:border-box}
.theme-leave-dialog h2{margin:0 0 8px;font-size:22px;line-height:1.25}
.theme-leave-dialog p{margin:0 0 8px;line-height:1.45}
.theme-leave-dialog .theme-leave-status{color:#ffb4a8;font-weight:650}
.theme-leave-dialog .theme-leave-status:empty{display:none}
.theme-leave-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:16px}
.theme-leave-actions button{flex:1 1 120px;min-height:44px;margin:0;padding:8px 14px;border-radius:8px}
.theme-leave-actions button.primary{font-weight:750}

/* WGC purchase: the Buy button on premium cards (theme-controls.js syncBuy). */
.theme-card[data-tier=legendary] .theme-access{color:#f3d27f;font-weight:700;letter-spacing:.02em}
.theme-card[data-tier=legendary] .theme-access::before{content:'\2726\00a0\00a0';color:#ffd76a}
.theme-card[data-owned=true] .theme-access{color:#9fe0bd;font-weight:700}
.theme-card[data-owned=true] .theme-access::before{content:'\2713\00a0\00a0'}
html body #themes .theme-card .theme-buy-button{display:inline-flex!important;align-items:center;justify-content:space-between;gap:10px;min-height:36px;padding:6px 6px 6px 14px!important;border:1px solid #f3d98f!important;border-radius:999px!important;background:linear-gradient(180deg,#f0d483,#c99a3c)!important;color:#1d1608!important;font-weight:800!important;letter-spacing:.01em;box-shadow:0 6px 18px rgba(201,154,60,.28),inset 0 1px 0 rgba(255,255,255,.5);white-space:nowrap;cursor:pointer}
html body #themes .theme-card .theme-buy-button[hidden]{display:none!important}
#themes .theme-buy-button .theme-buy-price{display:inline-flex;align-items:center;padding:3px 10px;border-radius:999px;background:#1d1608;color:#ffe6a3;font-size:12.5px;font-weight:800;letter-spacing:.02em}
html body #themes .theme-card .theme-buy-button:disabled{background:#173a3d!important;border-color:#55705f!important;color:#b8c9c0!important;box-shadow:none;cursor:not-allowed;opacity:1!important}
#themes .theme-buy-button:disabled .theme-buy-price{background:#0d2427;color:#d7c79a}
html body #themes .theme-card .theme-buy-button[data-state=paying]{background:#173a3d!important;color:#ffe6a3!important;border-color:#d7b45a!important}
#themes .theme-buy-button[data-state=paying] .theme-buy-label::before{content:'';display:inline-block;width:11px;height:11px;margin-right:7px;vertical-align:-1px;border:2px solid #ffe6a3;border-right-color:transparent;border-radius:50%;animation:realm-spin .8s linear infinite}
@media (hover:hover){html[data-motion=full] body #themes .theme-card .theme-buy-button:not(:disabled):hover{filter:brightness(1.08);box-shadow:0 8px 24px rgba(231,198,114,.45),inset 0 1px 0 rgba(255,255,255,.55)}}
html[data-motion=full] #themes .theme-card[data-owned=false] .theme-buy-button:not(:disabled){position:relative;overflow:hidden}
html[data-motion=full] #themes .theme-card[data-owned=false] .theme-buy-button:not(:disabled)::after{content:'';position:absolute;inset:0 auto 0 0;width:40%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-160%) skewX(-18deg);animation:realm-sheen 4.2s ease-in-out infinite;pointer-events:none}
@media (max-width:420px){html body #themes .theme-card .theme-buy-button{display:flex!important;width:100%}}

/* WGC purchase popup: art banner, price and wallet ledger, then the paying, done and error states. */
html body dialog.theme-buy-dialog{width:min(460px,calc(100vw - 28px))!important;max-width:none!important;max-height:calc(100dvh - 28px);padding:0!important;overflow:hidden auto;border:1px solid rgba(215,180,90,.7)!important;border-radius:22px!important;background:radial-gradient(120% 60% at 50% 0%,rgba(215,180,90,.16),transparent 60%),linear-gradient(180deg,#123a37,#0a2224)!important;color:#eef3ee!important;box-shadow:0 30px 80px rgba(0,0,0,.6),0 0 0 1px rgba(255,236,170,.08) inset;box-sizing:border-box}
html body dialog.theme-buy-dialog::backdrop{background:rgba(2,10,12,.7);backdrop-filter:blur(5px)}
.theme-buy-dialog .tb-art{position:relative;height:132px;overflow:hidden;background:#0c2a2b}
.theme-buy-dialog .tb-art img{display:block;width:100%;height:100%;object-fit:cover}
.theme-buy-dialog .tb-art::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,34,36,0) 35%,#0f302e 100%)}
.theme-buy-dialog .tb-spark{position:absolute;z-index:2;left:50%;top:60%;width:8px;height:8px;border-radius:50%;background:#ffe6a3;box-shadow:0 0 10px #ffd76a;opacity:0;pointer-events:none}
.theme-buy-dialog .tb-body{position:relative;margin-top:-26px;padding:0 24px 22px;text-align:center}
.theme-buy-dialog .tb-eyebrow{display:inline-block;margin:0 0 6px!important;padding:4px 12px;border:1px solid rgba(215,180,90,.65);border-radius:999px;background:#0d2a2b;color:#f3d27f!important;font:800 11px/1.2 system-ui,sans-serif!important;letter-spacing:.18em}
.theme-buy-dialog[data-tier=legendary] .tb-eyebrow{background:linear-gradient(180deg,#3a2c12,#241a0a);border-color:#f3d98f}
.theme-buy-dialog h2{margin:2px 0 10px!important;font:700 clamp(24px,5vw,30px)/1.15 Georgia,'Times New Roman',serif!important;background:linear-gradient(100deg,#d4a94e,#f6dd94 40%,#fff6d8 50%,#f6dd94 60%,#d4a94e);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent!important}
html[data-motion=full] .theme-buy-dialog h2{animation:realm-text-shine 5s linear infinite}
.theme-buy-dialog .tb-includes{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:0 0 14px;padding:0;list-style:none}
.theme-buy-dialog .tb-includes li{padding:4px 10px;border:1px solid rgba(159,224,189,.3);border-radius:999px;background:rgba(47,210,126,.08);color:#cfe9da;font-size:12.5px;font-weight:600}
.theme-buy-dialog .tb-includes li::before{content:'\2713\00a0';color:#7fe0a8}
.theme-buy-dialog .tb-ledger{display:grid;gap:0;margin:0 0 12px;border:1px solid rgba(215,180,90,.35);border-radius:14px;background:rgba(5,20,22,.55);overflow:hidden}
.theme-buy-dialog .tb-ledger>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px}
.theme-buy-dialog .tb-ledger>div+div{border-top:1px solid rgba(215,180,90,.18)}
.theme-buy-dialog .tb-ledger span{color:#b9cbc2;font-size:13.5px;font-weight:600;text-align:left}
.theme-buy-dialog .tb-ledger strong{color:#ffe6a3;font-size:15px;font-weight:800;text-align:right}
.theme-buy-dialog .tb-ledger div:first-child strong{font-size:19px;white-space:nowrap}
.theme-buy-dialog .tb-ledger strong[data-short=true]{color:#ffb4a8}
.theme-buy-dialog[data-state=done] .tb-ledger div:first-child,.theme-buy-dialog[data-state=done] .tb-includes{display:none}
.theme-buy-dialog[data-state=done] .tb-ledger>div+div{border-top:0}
.theme-buy-dialog .tb-note{margin:0 0 6px!important;color:#9fb5ab!important;font-size:12.5px!important;line-height:1.45}
.theme-buy-dialog .tb-status{margin:6px 0 0!important;padding:8px 12px;border-radius:10px;font-size:13.5px;font-weight:650;line-height:1.4}
.theme-buy-dialog .tb-status:empty{display:none}
.theme-buy-dialog .tb-status[data-tone=error]{background:rgba(255,120,100,.12);border:1px solid rgba(255,140,120,.45);color:#ffc3b8}
.theme-buy-dialog .tb-status[data-tone=busy]{background:rgba(215,180,90,.1);border:1px solid rgba(215,180,90,.4);color:#ffe6a3}
.theme-buy-dialog .tb-status[data-tone=busy]::before{content:'';display:inline-block;width:12px;height:12px;margin-right:8px;vertical-align:-2px;border:2px solid #ffe6a3;border-right-color:transparent;border-radius:50%;animation:realm-spin .8s linear infinite}
.theme-buy-dialog .tb-status[data-tone=ok]{background:rgba(47,210,126,.12);border:1px solid rgba(127,224,168,.45);color:#c8f3da}
.theme-buy-dialog .tb-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin-top:16px}
.theme-buy-dialog .tb-actions button{min-height:48px;margin:0!important;padding:10px 14px!important;border-radius:13px!important;border:1px solid rgba(215,180,90,.55)!important;background:rgba(9,30,32,.8)!important;color:#eef3ee!important;font-weight:750!important;font-size:15px!important}
.theme-buy-dialog .tb-actions button.primary{border:0!important;background:linear-gradient(180deg,#f0d483,#c99a3c)!important;color:#1d1608!important;box-shadow:0 8px 22px rgba(201,154,60,.35)}
.theme-buy-dialog .tb-actions button[hidden]{display:none!important}
.theme-buy-dialog .tb-actions:has(button[hidden]){grid-template-columns:1fr}
.theme-buy-dialog .tb-actions button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.theme-buy-dialog[data-state=paying] .tb-actions button.primary:disabled{opacity:.85}
html[data-motion=full] .theme-buy-dialog.tb-celebrate .tb-art img{animation:tb-glow 1.6s ease-out}
html[data-motion=full] .theme-buy-dialog.tb-celebrate h2{animation:realm-pop-in .6s cubic-bezier(.2,.9,.3,1.3),realm-text-shine 5s linear infinite}
html[data-motion=full] .theme-buy-dialog.tb-celebrate .tb-spark{animation:tb-spark 1.3s cubic-bezier(.2,.7,.3,1) forwards}
.theme-buy-dialog .tb-spark:nth-of-type(1){--x:-150px;--y:-70px}.theme-buy-dialog .tb-spark:nth-of-type(2){--x:140px;--y:-80px;animation-delay:.05s}
.theme-buy-dialog .tb-spark:nth-of-type(3){--x:-90px;--y:-110px;animation-delay:.1s}.theme-buy-dialog .tb-spark:nth-of-type(4){--x:95px;--y:-115px;animation-delay:.08s}
.theme-buy-dialog .tb-spark:nth-of-type(5){--x:-190px;--y:-20px;animation-delay:.14s}.theme-buy-dialog .tb-spark:nth-of-type(6){--x:185px;--y:-30px;animation-delay:.12s}
.theme-buy-dialog .tb-spark:nth-of-type(7){--x:-40px;--y:-125px;animation-delay:.18s}.theme-buy-dialog .tb-spark:nth-of-type(8){--x:45px;--y:-120px;animation-delay:.2s}
.theme-buy-dialog .tb-spark:nth-of-type(9){--x:-120px;--y:10px;animation-delay:.22s}.theme-buy-dialog .tb-spark:nth-of-type(10){--x:120px;--y:5px;animation-delay:.24s}
@keyframes tb-spark{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}15%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1.4)}}
@keyframes tb-glow{0%{filter:brightness(1)}30%{filter:brightness(1.45) saturate(1.2)}100%{filter:brightness(1)}}
@media (max-width:420px){.theme-buy-dialog .tb-art{height:104px}.theme-buy-dialog .tb-body{padding:0 16px 16px}.theme-buy-dialog .tb-actions{grid-template-columns:1fr}.theme-buy-dialog .tb-actions button.primary{order:-1}}
@media (max-height:620px){.theme-buy-dialog .tb-art{height:86px}.theme-buy-dialog .tb-includes{margin-bottom:8px}}
@media (max-width:1000px){#themes .theme-card .collection-art{display:block;width:100%;height:auto;aspect-ratio:12/5;object-fit:cover;border-radius:8px;margin:0 0 10px}}
#themes .theme-card button[hidden]{display:none!important}
/* The real WGC coin in Store prices and the purchase ledger. */
#themes .theme-buy-price,.theme-buy-dialog .tb-ledger strong{display:inline-flex;align-items:center;gap:6px}
#themes .theme-buy-price .wgc-coin-icon{width:15px;height:auto}
.theme-buy-dialog .tb-ledger strong .wgc-coin-icon{width:18px;height:auto;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.theme-buy-dialog .tb-ledger div:first-child strong .wgc-coin-icon{width:22px}
.theme-buy-dialog .tb-ledger strong span{color:inherit;font:inherit}
.theme-buy-dialog .tb-ledger strong .tb-arrow{margin:0 2px;color:#b9cbc2}
