/* Places tab. Tokens from the theme; logical properties so right-to-left needs no second sheet. */
.rgd-places__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-end: 16px;
}
.rgd-places__title {
	margin: 0;
}
.rgd-places__empty {
	display: grid;
	justify-items: start;
	gap: 12px;
	padding: 24px;
	border: 1px solid var(--reign-site-border-color);
	border-radius: var(--reign-global-border-radius, 8px);
}
.rgd-places__empty p {
	margin: 0;
}
/*
 * BuddyPress's own sheet rounds every div inside #buddypress to 2px ("body #buddypress div"), which
 * out-ranks AyeCode's .bsui .card and the rule above, so profile cards and the empty state lost the
 * radius they have on /places/. The id puts these ahead without !important.
 */
#buddypress .rgd-places .card {
	border-radius: var(--bs-card-border-radius, .75rem);
}
#buddypress .rgd-places .rgd-places__empty {
	border-radius: var(--reign-global-border-radius, 8px);
}
@media (max-width: 640px) {
	.rgd-places__head .rgd-places__add {
		inline-size: 100%;
		text-align: center;
	}
}

/* GeoDirectory cards hang their author avatar above the card: leave room for it under the head row. */
.ps-page-profile .rgd-places__head { margin-block-end: calc(48px + 8px); }

/* PeepSo feed card (templates/peepso/card.php) */
.rgd-card { margin-block-start: 8px; }
.rgd-card__review { margin: 0 0 8px; padding-inline-start: 12px; border-inline-start: 3px solid currentcolor; opacity: .85; }
.rgd-card__plain { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--reign-site-border-color); border-radius: var(--reign-global-border-radius, 8px); color: inherit; text-decoration: none; }
.rgd-card__thumb { flex: 0 0 96px; }
.rgd-card__thumb img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: var(--reign-global-border-radius, 8px); }
.rgd-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rgd-card__title { overflow-wrap: anywhere; }
.rgd-card__excerpt { opacity: .8; overflow-wrap: anywhere; }
@media (max-width: 480px) {
	.rgd-card__plain { flex-direction: column; }
	.rgd-card__thumb, .rgd-card__thumb img { width: 100%; flex-basis: auto; height: auto; }
}

/* Listing type switch on the PeepSo tab (only shown with two or more listing types) */
.rgd-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 16px; }
.rgd-switch a { padding: 8px 12px; border: 1px solid var(--reign-site-border-color); border-radius: 999px; color: inherit; text-decoration: none; min-block-size: 40px; display: inline-flex; align-items: center; }
.rgd-switch a[aria-current="page"] { background: color-mix(in srgb, currentcolor 12%, transparent); font-weight: 600; }

/* BuddyPress activity: new place, favourite and review entries print the listing photo, then the text. BuddyPress
   strips class attributes from activity content, so the photo is matched by its place: the link wrapping an image
   at the start of the entry's first paragraph, in those three entry types. A 120px tile beside the text, stacked
   on phones; a review's text reads as a quote. */
:is(li.new_location_post, li.place_mark_favorite, li.geodir_review_update) .activity-inner > p:first-child:has(> a:first-child > img) { display: flow-root; }
:is(li.new_location_post, li.place_mark_favorite, li.geodir_review_update) .activity-inner > p:first-child > a:first-child:has(> img) { float: inline-start; margin-block-end: 8px; margin-inline-end: 16px; }
:is(li.new_location_post, li.place_mark_favorite, li.geodir_review_update) .activity-inner > p:first-child > a:first-child > img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: var(--reign-global-border-radius, 8px); }
li.geodir_review_update .activity-inner > p:first-child:has(> a:first-child > img) { font-style: italic; }
@media (max-width: 480px) {
	:is(li.new_location_post, li.place_mark_favorite, li.geodir_review_update) .activity-inner > p:first-child > a:first-child:has(> img) { float: none; display: block; margin-inline-end: 0; }
	:is(li.new_location_post, li.place_mark_favorite, li.geodir_review_update) .activity-inner > p:first-child > a:first-child > img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}
