/**
 * css/places.css: the popular places, a grid of cards that takes as many rows as it needs: the picture of the parcel, its name over
 * it. Each card is a teleport link (W4OS\Views\TeleportLink) over all of it, the button of its other links
 * in its top right corner.
 *
 * @package    way4os/w4os-helpers
 * @license    AGPLv3
 */
.block-popular_places .places {
	display: grid;
	gap: 1rem;
	/* Two of them a row at least on a narrow screen: cards, never a banner as wide as the page */
	grid-template-columns: repeat(auto-fill, minmax(min(11rem, calc(50% - 0.5rem)), 1fr));
}
.block-popular_places .place {
	position: relative;
	border-radius: 0.4rem;
	color: #fff;
	background: #2a2a2a;
}
.block-popular_places .place .w4os-tp {
	display: block;
	/* The picture is the whole card: the joiner after its link takes no line under it */
	line-height: 0;
}
.block-popular_places .place .w4os-tp-more,
.block-popular_places .place-name {
	line-height: normal;
}
.block-popular_places .place .w4os-tp-main {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: inherit;
	color: inherit;
	text-decoration: none;
}
/* The button of its other links, in the top right corner, over the picture (the style of the cards of the sites) */
.block-popular_places .place .w4os-tp-more {
	position: absolute;
	top: 0.4rem;
	right: 0.4rem;
	z-index: 1;
}
.block-popular_places .place .w4os-tp-toggle {
	margin: 0;
	padding: 0.35rem;
	border-radius: 50%;
	background: Canvas;
	color: CanvasText;
	box-shadow: 0 0.1rem 0.4rem color-mix(in srgb, CanvasText 25%, transparent);
}
.block-popular_places .place .w4os-tp-toggle:hover,
.block-popular_places .place .w4os-tp-toggle:focus-visible,
.block-popular_places .place .w4os-tp-toggle[aria-expanded="true"] {
	background: color-mix(in srgb, CanvasText 10%, Canvas);
}
/* The menu opens leftwards from the corner */
.block-popular_places .place .w4os-tp-menu {
	left: auto;
	right: 0;
}
.block-popular_places .place-picture {
	display: grid;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.block-popular_places .place-name {
	position: absolute;
	left: 0;
	right: 0;
	padding: 0.5rem 0.75rem;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	top: 0;
	padding-right: 2.25rem;
	font-weight: bold;
	background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
}
.block-popular_places .place:hover .place-picture,
.block-popular_places .place:focus .place-picture {
	opacity: 0.85;
}
