/*
 * Found discs list on the Lost & Found page: the [hc_found_discs] shortcode
 * (inc/found-discs.php). Square photo cards, 4 across (2 on phones); a disc
 * with several photos gets a "next photo" button (and a 1 / 2 counter on
 * phones). Colours follow the Divi Variable Manager where a variable exists.
 */
:root {
	/* Stroke mail icon for the "Email us" button (drawn like the arrows in arrows.css). */
	--hc-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 5L2 7'/%3E%3C/svg%3E");
}

.hc-discs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0 !important;
	list-style: none !important;
	line-height: inherit;
}
.hc-disc {
	min-width: 0;
	margin: 0;
	padding: 0;
}
.hc-disc__frame {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #ede9dc; /* placeholder tone from the design (no variable) */
	border: 1px solid var(--gcid-hc-line);
	border-radius: var(--gvid-hc-radius, 4px);
	color: #8a8470;
}
.hc-disc__photo {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
.hc-disc__photo[hidden] {
	display: none;
}

/* No photo yet: camera + "Disc photo". */
.hc-disc__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 800;
	font-stretch: 125%;
	letter-spacing: 0.12em;
	line-height: 1.6;
	text-transform: uppercase;
}
.hc-disc__placeholder svg {
	width: 34px;
	height: 34px;
}

/* Next photo. */
.hc-disc__next {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gcid-hc-card);
	color: var(--gcid-primary-color);
	box-shadow: 0 6px 16px -8px rgba(8, 26, 12, 0.55);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) {
	.hc-disc__next:hover {
		background: var(--gcid-primary-color);
		color: var(--gcid-hc-cream);
	}
}
.hc-disc__next:focus-visible {
	outline: 2px solid var(--gcid-primary-color);
	outline-offset: 2px;
}
.hc-disc__count {
	display: none;
	position: absolute;
	left: 10px;
	bottom: 10px;
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(23, 32, 15, 0.7);
	color: var(--gcid-hc-cream);
	font-size: 11px;
	font-weight: 700;
	line-height: 1.6;
}
.hc-disc__status {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Optional caption ([hc_found_discs details="1"]): first name + last four digits. */
.hc-disc__who {
	margin: 8px 0 0;
	padding: 0 !important;
	color: var(--gcid-hc-body-dark);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

.hc-discs-empty {
	margin: 0;
	padding: 24px 28px !important;
	background: var(--gcid-hc-card);
	border: 1px solid var(--gcid-hc-line);
	border-radius: var(--gvid-hc-radius, 4px);
	color: var(--gcid-hc-body-dark);
	font-size: 17px;
	line-height: 1.55;
}

@media (max-width: 767px) {
	.hc-discs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.hc-disc__frame {
		border-radius: 6px;
	}
	.hc-disc__placeholder {
		font-size: 11px;
	}
	.hc-disc__placeholder svg {
		width: 30px;
		height: 30px;
	}
	.hc-disc__next {
		top: auto;
		right: 8px;
		bottom: 8px;
		transform: none;
	}
	.hc-disc__count {
		display: block;
	}
	.hc-discs-empty {
		padding: 20px !important;
		border-radius: 6px;
		font-size: 16px;
	}
}
