/* ==========================================================================
   ACP Pins - the pin tracker widget (acp/pin-widget).

   A sidebar card in the ACP theme's widget dress: white ground, mint hairline, no radius, a
   small green-bar heading. Every theme variable is borrowed with a literal fallback, and every
   selector is namespaced under .acp-pin-widget, so the card looks right under any theme and
   never ties with a theme rule. Kept apart from pins.css so an article page carrying only the
   widget does not download the whole tracker's stylesheet.
   ========================================================================== */

.acp-pin-widget {
	--acp-pw-ink: var(--wp--preset--color--contrast, #0f1f16);
	--acp-pw-muted: var(--wp--preset--color--muted, #5c6e63);
	--acp-pw-card: var(--acp-card-bg, var(--wp--preset--color--base, #fff));
	--acp-pw-line: var(--acp-card-border, var(--wp--preset--color--border, #d3e8da));
	--acp-pw-surface: var(--wp--preset--color--surface, #f2f8f4);
	--acp-pw-green: var(--acp-green, var(--wp--preset--color--primary, #00793d));
	--acp-pw-green-dark: var(--acp-green-dark, var(--wp--preset--color--primary-dark, #005a2d));
	--acp-pw-accent-warm: var(--acp-accent, var(--wp--preset--color--accent, #e3be92));
	--acp-pw-on-green: var(--wp--preset--color--base, #fff);

	background: var(--acp-pw-card);
	border: 1px solid var(--acp-pw-line);
	padding: 1.35rem 1.35rem 1.5rem;
	color: var(--acp-pw-ink);
}

.acp-pin-widget > * {
	margin-top: 0;
	margin-bottom: 0;
}

.acp-pin-widget > * + * {
	margin-top: .9rem;
}

.acp-pin-widget > .acp-pin-widget__title + * {
	margin-top: 1.1rem;
}

.acp-pin-widget__title {
	font-size: 1rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .05em;
	text-transform: uppercase;
	border-left: .3em solid var(--acp-pw-green);
	padding-left: .6em;
}

/* The picture well: pin sprites are transparent artwork on no ground of their own, so they are
   laid on the mint surface and centred rather than cropped to fill. The well is a fixed height
   so the card does not jump when the pin changes. */
.acp-pin-widget__figure {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 190px;
	padding: 1rem;
	background: var(--acp-pw-surface);
	border: 1px solid var(--acp-pw-line);
	text-decoration: none;
	transition: border-color .15s ease;
}

a.acp-pin-widget__figure:hover,
a.acp-pin-widget__figure:focus-visible {
	border-color: var(--acp-pw-green);
}

.acp-pin-widget__figure img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 158px;
	object-fit: contain;
	transition: transform .2s ease;
}

a.acp-pin-widget__figure:hover img {
	transform: translateY(-2px) scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
	.acp-pin-widget__figure img { transition: none; }
	a.acp-pin-widget__figure:hover img { transform: none; }
}

/* With a server picked: kicker, pin name, room - the same ladder as a card on the tracker. */
.acp-pin-widget__pin > * {
	margin: 0;
}

.acp-pin-widget__kicker {
	color: var(--acp-pw-green);
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.acp-pin-widget__name {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .4rem;
	margin-top: .25rem;
	font-size: 1.15rem;
	font-weight: 800;
	line-height: 1.2;
}

.acp-pin-widget__badge {
	display: inline-block;
	padding: .2em .6em;
	border-radius: 999px;
	background: var(--acp-pw-accent-warm);
	color: var(--acp-pw-ink);
	font-size: .62rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.acp-pin-widget__room {
	margin-top: .15rem;
	color: var(--acp-pw-muted);
	font-size: .9rem;
}

.acp-pin-widget__text {
	font-size: .95rem;
	line-height: 1.55;
	color: var(--acp-pw-muted);
}

.acp-pin-widget__button {
	display: inline-block;
	padding: .7rem 1.25rem;
	background: var(--acp-pw-green);
	color: var(--acp-pw-on-green);
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .15s ease;
}

.acp-pin-widget__button:hover,
.acp-pin-widget__button:focus-visible {
	background: var(--acp-pw-green-dark);
	color: var(--acp-pw-on-green);
}

/* Editor-only notice printed by acp_pins_notice(). */
.acp-pin-widget .acp-pins__empty {
	color: var(--acp-pw-muted);
	font-size: .9rem;
}

@media (max-width: 781px) {
	.acp-pin-widget { padding: 1.15rem; }
}
