/* The coins page: four packs, how paying works, the visitor's orders, and the order dialog. */

.coinspage { display: grid; gap: var(--s-8); }
.coinspage__head { display: grid; gap: var(--s-3); max-width: 44em; }
.coinspage__head h1 { font-size: var(--t-3xl); }

.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); align-items: end; }
.pack {
	--tone: var(--violet);
	position: relative;
	display: grid;
	gap: var(--s-4);
	align-content: space-between;
	padding: var(--s-5);
	min-height: 380px;
	border-radius: var(--r-lg);
	background: var(--card);
	box-shadow: var(--shadow-1);
	text-align: start;
}
.pack:nth-child(1) { min-height: 340px; }
.pack:nth-child(2) { min-height: 380px; --tone: #a477ec; }
.pack:nth-child(3) { min-height: 430px; --tone: #e056ae; background: linear-gradient(170deg, var(--card), var(--pink-soft)); }
.pack:nth-child(4) { min-height: 480px; --tone: var(--pink); background: linear-gradient(160deg, var(--violet-soft), var(--pink-soft)); }
.pack__name { font-weight: 700; color: var(--tone); font-size: var(--t-base); }
.pack__coins { display: flex; align-items: baseline; gap: var(--s-2); }
.pack__coins .num { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 700; line-height: 1; }
.pack__coins small { font-size: var(--t-sm); font-weight: 600; opacity: 0.8; }
.pack__bonus { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; font-size: var(--t-sm); }
.pack__price { font-weight: 700; font-size: var(--t-md); }
.pack__price small { font-weight: 500; font-size: var(--t-xs); }
.pack .btn { width: 100%; }
.pack:nth-child(4) .btn--soft { --btn-bg: rgba(255, 255, 255, 0.12); --btn-fg: var(--ink); }

/* A pile of coins, drawn with CSS: each disc is a gradient with the mark's colour on its rim. */
.pile { position: relative; height: 96px; margin-block-end: var(--s-2); }
.coin {
	position: absolute;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff 0%, color-mix(in srgb, var(--tone) 22%, white) 45%, var(--tone) 100%);
	box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--tone) 85%, white), inset 0 0 0 7px rgba(255, 255, 255, 0.55), 0 8px 12px -6px rgba(0, 0, 0, 0.7);
	display: grid;
	place-items: center;
	color: color-mix(in srgb, var(--tone) 78%, black);
}
.coin svg { width: 58%; height: auto; }
.coin svg.mark path { animation: none; fill-opacity: 1; stroke-opacity: 0; stroke-dashoffset: 0; }

.packs__note { margin-block-start: var(--s-4); }

.how { display: grid; gap: var(--s-4); max-width: 46em; }
.how__list { display: grid; gap: var(--s-3); counter-reset: step; }
.how__list li { counter-increment: step; position: relative; padding-inline-start: 3.2rem; line-height: 2; }
.how__list li::before { content: counter(step, persian); position: absolute; inset-inline-start: 0; inset-block-start: 0.1rem; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700; font-size: var(--t-sm); line-height: 1; }

.myorders { display: grid; gap: var(--s-4); }
.orders { display: grid; gap: var(--s-3); }
.order { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-1); }
.order__code { font-size: var(--t-md); font-weight: 700; }
.order__meta { display: grid; gap: 0; }
.order__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; justify-content: flex-end; }

/* Order dialog ------------------------------------------------------------ */
.order-dialog { width: min(92vw, 520px); padding: 0; border: 0; border-radius: var(--r-lg); background: var(--card); color: var(--ink); box-shadow: var(--shadow-3); }
.order-dialog::backdrop { background: rgba(5, 2, 12, 0.66); backdrop-filter: blur(4px); }
.order-dialog[open] { animation: dialog-in var(--d-3) var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.od { display: grid; gap: var(--s-4); padding: var(--s-6); }
.od h2 { font-family: var(--font-display); font-size: var(--t-xl); line-height: 1.2; }
.od__code { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--mist-1); }
.od__code .mono { font-size: var(--t-lg); font-weight: 700; color: var(--ink); }
.od ol { display: grid; gap: var(--s-2); padding-inline-start: 1.2em; list-style: decimal; font-size: var(--t-sm); color: var(--ink-2); }
.od__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }

@media (max-width: 1000px) {
	.packs { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
	.pack, .pack:nth-child(n) { min-height: 360px; }
}
@media (max-width: 560px) {
	.packs { grid-template-columns: 1fr; }
	.coinspage__head h1 { font-size: var(--t-2xl); }
	.order { grid-template-columns: 1fr; }
	.order__actions { justify-content: flex-start; }
}
