/*
 * GeoCards front-end styles.
 *
 * The album mimics a physical sticker book: filled slots sit proud, empty
 * slots stay recessed so a gap is visible at a glance. Card slots keep the
 * real 64:89 aspect ratio so the wall matches the object in your hands.
 */

.geocards-album,
.geocards-collection,
.geocards-trades {
	--gc-ink: #14211c;
	--gc-paper: #f2efe6;
	--gc-band: #0f3d2e;
	--gc-accent: #c6522f;
	--gc-muted: #7c8a80;
	--gc-slot: #e3e0d6;

	color: var(--gc-ink);
}

.geocards-album__head {
	margin-bottom: 1.5rem;
}

.geocards-album__head h2 {
	margin: 0 0 0.25rem;
}

.geocards-album__progress {
	margin: 0 0 0.5rem;
	color: var(--gc-muted);
	font-size: 0.9rem;
}

.geocards-bar {
	background: var(--gc-slot);
	border-radius: 999px;
	height: 6px;
	max-width: 320px;
	overflow: hidden;
}

.geocards-bar span {
	background: var(--gc-band);
	display: block;
	height: 100%;
	transition: width 0.4s ease;
}

/* The wall itself. Cards are 64 x 89 mm, so the grid keeps that ratio. */
.geocards-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}

.geocards-slot {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0;
}

.geocards-slot__img,
.geocards-slot__empty,
.geocards-slot__plain {
	aspect-ratio: 64 / 89;
	border-radius: 4px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

/* Owned: raised, full colour. */
.geocards-slot.is-owned .geocards-slot__img,
.geocards-slot.is-owned .geocards-slot__plain {
	box-shadow: 0 2px 6px rgba(20, 33, 28, 0.25);
}

.geocards-slot__plain {
	align-items: center;
	background: var(--gc-band);
	color: var(--gc-paper);
	display: flex;
	justify-content: center;
	padding: 0.5rem;
	text-align: center;
}

/* Missing: recessed silhouette, so the gap reads instantly. */
.geocards-slot__empty {
	align-items: center;
	background: var(--gc-slot);
	border: 1px dashed rgba(20, 33, 28, 0.25);
	box-shadow: inset 0 1px 4px rgba(20, 33, 28, 0.12);
	display: flex;
	justify-content: center;
}

.geocards-slot__num {
	color: var(--gc-muted);
	font-size: 0.8rem;
	padding: 0.5rem;
	text-align: center;
	word-break: break-word;
}

.geocards-slot.is-missing .geocards-slot__name {
	color: var(--gc-muted);
}

.geocards-slot__name {
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.25;
	margin: 0;
}

.geocards-slot__action {
	margin: 0;
}

.geocards-slot__action select {
	font-size: 0.8rem;
	max-width: 100%;
	padding: 0.15rem 0.3rem;
}

.geocards-tag {
	border-radius: 3px;
	display: inline-block;
	font-size: 0.7rem;
	letter-spacing: 0.03em;
	margin: 0;
	padding: 0.1rem 0.4rem;
	text-transform: uppercase;
}

.geocards-tag--spare {
	background: var(--gc-accent);
	color: #fff;
}

.geocards-btn {
	background: var(--gc-band);
	border: 1px solid var(--gc-band);
	border-radius: 3px;
	color: var(--gc-paper);
	cursor: pointer;
	font-size: 0.8rem;
	padding: 0.3rem 0.7rem;
}

.geocards-btn--ghost {
	background: transparent;
	color: var(--gc-band);
}

.geocards-btn:hover,
.geocards-btn:focus-visible {
	background: var(--gc-accent);
	border-color: var(--gc-accent);
	color: #fff;
}

.geocards-btn:focus-visible,
.geocards-slot__action select:focus-visible {
	outline: 2px solid var(--gc-accent);
	outline-offset: 2px;
}

.geocards-collection__series {
	border-bottom: 1px solid var(--gc-slot);
	margin: 1.5rem 0 1rem;
	padding-bottom: 0.3rem;
}

.geocards-matches {
	display: grid;
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.geocards-match {
	background: var(--gc-paper);
	border-radius: 6px;
	padding: 1rem 1.25rem;
}

.geocards-match h3 {
	margin: 0 0 0.75rem;
}

.geocards-match__cols {
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 1rem;
}

.geocards-match__cols h4 {
	font-size: 0.8rem;
	letter-spacing: 0.03em;
	margin: 0 0 0.4rem;
	text-transform: uppercase;
}

.geocards-match__cols ul {
	font-size: 0.9rem;
	margin: 0;
	padding-left: 1.1rem;
}

.geocards-muted {
	color: var(--gc-muted);
	font-size: 0.8rem;
}

.geocards-note {
	color: var(--gc-muted);
	font-style: italic;
}

@media (max-width: 480px) {
	.geocards-grid {
		grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	}

	.geocards-match__cols {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.geocards-bar span {
		transition: none;
	}
}

/*
 * Admin overview: the headline numbers.
 */
.geocards-cards-row {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	margin: 1.5rem 0 2rem;
}

.geocards-stat {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.9rem 1rem;
}

.geocards-stat__num {
	font-size: 1.6rem;
	font-weight: 600;
	line-height: 1;
}

.geocards-stat__label {
	color: #646970;
	font-size: 0.8rem;
}

/*
 * Navigation between the generated pages.
 */
.geocards-nav {
	border-bottom: 1px solid #e3e0d6;
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.5rem;
}

.geocards-nav__link {
	color: #7c8a80;
	font-size: 0.9rem;
	text-decoration: none;
}

.geocards-nav__link.is-current,
.geocards-nav__link:hover {
	color: #0f3d2e;
	font-weight: 600;
}

.geocards-back {
	font-size: 0.85rem;
	margin: 0 0 0.25rem;
}

/*
 * The shelf: one cover per album.
 */
.geocards-shelf__list {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.geocards-shelf__item {
	background: #f2efe6;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin: 0;
	padding: 1rem 1.1rem;
}

.geocards-shelf__item a {
	color: inherit;
	text-decoration: none;
}

.geocards-shelf__title {
	display: block;
	font-size: 1.05rem;
	font-weight: 600;
}

.geocards-shelf__meta {
	color: #7c8a80;
	font-size: 0.8rem;
}

/*
 * Member submission form.
 */
.geocards-form label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.2rem;
}

.geocards-form input[type="text"],
.geocards-form input[type="number"],
.geocards-form select {
	max-width: 22rem;
	width: 100%;
}

.geocards-form p {
	margin: 0 0 1rem;
}
