/* vorblo.com/donate. The site's black and grey; the only colour is the rarity strip under an item,
   because that's how people recognise them. */

/* ---- the bar: who is signed in ---- */

.donate .who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.donate .who img { width: 30px; height: 30px; border-radius: 10px; object-fit: cover; border: 1px solid var(--ring); }
.donate .who img[hidden] { display: none; }

/* ---- the opening ---- */

.donate-top { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.donate-top .art {
    position: absolute; inset: 0;
    background: #050505 url(/media/season-keyart.jpg) 80% 30% / cover no-repeat;
    opacity: 0.55;
}
.donate-top .art::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.92) 40%, rgba(0, 0, 0, 0.45) 100%),
        linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 60%);
}
.donate-top .wrap { position: relative; padding: 150px 0 64px; }
.donate-top h1 { font-size: clamp(48px, 7vw, 92px); margin: 18px 0 20px; max-width: 10em; }
.donate-top .lead { max-width: 36em; margin: 0 0 28px; font-size: 17px; color: #cfcfcf; }

.signin { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.signin .button svg { width: 18px; height: 18px; }
.status { font-size: 13.5px; color: var(--muted); }
.fallback { font-size: 13.5px; color: var(--text); }

.message {
    max-width: 44em; margin-top: 8px; padding: 16px 20px; border-radius: 16px;
    border: 1px solid rgba(62, 207, 142, 0.35); background: rgba(62, 207, 142, 0.08); color: var(--text);
}
.message.bad { border-color: rgba(255, 99, 105, 0.35); background: rgba(255, 99, 105, 0.08); }
.message.plain { border-color: var(--ring); background: var(--fill); }

/* ---- the tiers ---- */

.tiers-section { padding: 64px 0 80px; }
.tiers { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.loading, .closed { color: var(--muted); margin: 0; }
.closed { margin-top: 18px; }

.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 5px; background: rgba(255, 255, 255, 0.01); display: flex; }
.tier.top { border-color: rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.03); }
.tier > .inner {
    flex: 1; display: flex; flex-direction: column; gap: 18px;
    border-radius: calc(var(--radius) - 5px); background: var(--panel); border: 1px solid var(--line); padding: 26px 24px 24px;
}

.tier-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tier h2 { font-size: 34px; margin: 0; }
.tier .badge {
    flex: none; font: 500 11px/1 Geist, sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
    padding: 7px 10px; border-radius: 999px; border: 1px solid var(--ring); color: var(--muted);
}
.tier .badge.yours { color: #000; background: var(--ok); border-color: var(--ok); }

.price { display: flex; align-items: baseline; gap: 8px; }
.price strong { font: 600 40px/1 Geist, system-ui, sans-serif; letter-spacing: -0.03em; }
.price span { color: var(--muted); font-size: 14px; }

.tier .summary { margin: 0; color: #c4c4c4; font-size: 14.5px; }

.preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.counts { margin: 0; color: var(--muted); font-size: 13px; }
.see { align-self: flex-start; appearance: none; background: none; border: 0; padding: 0; color: var(--text); font: 500 13.5px/1.4 Geist, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.see:hover { color: #fff; }

.tier .bottom { margin-top: auto; display: grid; gap: 12px; }
.tier .state { margin: 0; font-size: 13.5px; color: var(--muted); }
.tier .state strong { color: var(--text); font-weight: 600; }
.tier .state.warn { color: #f5b945; }
.tier .row-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.tier .row-buttons .button { flex: 1 1 auto; }
.button[disabled] { opacity: 0.45; cursor: default; transform: none; }
button.button { border: 0; cursor: pointer; }
button.button.ghost { border: 1px solid var(--ring); }

/* ---- an item ---- */

.item { position: relative; margin: 0; border-radius: 12px; overflow: hidden; background: #141414; border: 1px solid var(--line); aspect-ratio: 1; }
.item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .none { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 11px; color: var(--faint); }
.item::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--rarity, #6b6b6b); }
.item[data-rarity="common"] { --rarity: #8a8a8a; }
.item[data-rarity="uncommon"] { --rarity: #5fb03a; }
.item[data-rarity="rare"] { --rarity: #3f9ee8; }
.item[data-rarity="epic"] { --rarity: #a855e0; }
.item[data-rarity="legendary"] { --rarity: #e08a3c; }
.item[data-rarity="mythic"] { --rarity: #e6c13b; }

/* ---- the whole list of a tier ---- */

dialog {
    width: min(980px, 100vw - 32px); max-height: calc(100vh - 48px); overflow: auto;
    padding: 0; color: var(--text); background: #0a0a0a; border: 1px solid var(--ring); border-radius: 22px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(4px); }

.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 24px 26px 16px; background: #0a0a0a; }
.dialog-head h2 { font-size: 36px; margin: 10px 0 0; }
.dialog-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 0 26px 18px; border-bottom: 1px solid var(--line); }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
    appearance: none; cursor: pointer; font: 500 12.5px/1 Geist, sans-serif; padding: 8px 12px; border-radius: 999px;
    border: 1px solid var(--ring); background: var(--fill); color: var(--muted);
}
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { background: #fff; border-color: #fff; color: #000; }

#itemsSearch {
    width: min(240px, 100%); height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ring);
    background: var(--fill); color: var(--text); font: 14px Geist, system-ui, sans-serif;
}
#itemsSearch:focus { outline: none; border-color: rgba(255, 255, 255, 0.35); }

.items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); padding: 20px 26px 26px; }
.items figure { margin: 0; display: grid; gap: 6px; align-content: start; }
.items figcaption { font-size: 12px; line-height: 1.3; color: var(--muted); overflow-wrap: anywhere; }
.items figcaption strong { display: block; color: var(--text); font-weight: 500; }
.empty { color: var(--muted); padding: 0 26px 26px; margin: 0; }

/* ---- good to know ---- */

.how .card h3 { margin-top: 0; }
.how a { color: var(--text); }

/* ---- a short note in the corner ---- */

.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 20;
    max-width: min(560px, 100vw - 32px); padding: 13px 18px; border-radius: 14px;
    background: #111; border: 1px solid var(--ring); color: var(--text); font-size: 14px;
}
.toast.bad { border-color: rgba(255, 99, 105, 0.5); }

@media (max-width: 980px) {
    .tiers { grid-template-columns: 1fr; max-width: 560px; }
}

@media (max-width: 760px) {
    .donate-top .wrap { padding: 120px 0 48px; }
    .donate .who span { display: none; }
    .dialog-head, .dialog-tools, .items { padding-left: 16px; padding-right: 16px; }
}
