/*
 * Shared visual contract for every native WP Rentals Property Unit Type 4.
 * The theme still owns the card template, typography, prices and carousel.
 */

:root {
	--waoh-card-accent: #2c7a7b;
	--waoh-card-text: #5d6475;
	--waoh-card-heading: #484848;
	--waoh-card-meta-font-size: 13px;
}

.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper-full,
.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper {
	position: relative;
	border-radius: 16px;
}

.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper {
	overflow: hidden;
}

.listing_wrapper.property_unit_v4 .property_unit_carousel,
.listing_wrapper.property_unit_v4 .property_unit_carousel .carousel-inner,
.listing_wrapper.property_unit_v4 .property_unit_carousel .carousel-inner > .item,
.listing_wrapper.property_unit_v4 .property_unit_carousel img {
	border-radius: 16px;
}

/* Keep WP Rentals' native favorite control, but give every card the same
 * accessible white circular button and a stable inset from the photo edges. */
.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper .property_unit_action,
.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper-full .property_unit_action {
	position: absolute !important;
	z-index: 40 !important;
	top: 18px !important;
	right: 18px !important;
	bottom: auto !important;
	left: auto !important;
	display: flex !important;
	width: 44px !important;
	height: 44px !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
}

.listing_wrapper.property_unit_v4 .property_unit_action .icon-fav,
.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper > .icon-fav,
.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper-full > .icon-fav {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	display: inline-flex !important;
	width: 44px !important;
	height: 44px !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	border: 1px solid rgb(255 255 255 / 88%) !important;
	border-radius: 50% !important;
	background: rgb(255 255 255 / 96%) !important;
	box-shadow: 0 3px 12px rgb(0 0 0 / 20%) !important;
	font-size: 0 !important;
	line-height: 1 !important;
	transform: none !important;
}

.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper > .icon-fav,
.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper-full > .icon-fav {
	position: absolute !important;
	z-index: 40 !important;
	top: 18px !important;
	right: 18px !important;
}

.listing_wrapper.property_unit_v4 .icon-fav::before {
	display: none !important;
}

.listing_wrapper.property_unit_v4 .icon-fav svg {
	display: block !important;
	width: 26px !important;
	height: 26px !important;
	overflow: visible !important;
	fill: transparent !important;
	stroke: var(--waoh-card-accent) !important;
	stroke-width: 2 !important;
}

.listing_wrapper.property_unit_v4 .icon-fav.icon-fav-on svg,
.listing_wrapper.property_unit_v4 .icon-fav.waoh-favorite-is-saved svg,
.listing_wrapper.property_unit_v4 .icon-fav[aria-pressed="true"] svg {
	fill: var(--waoh-card-accent) !important;
	stroke: var(--waoh-card-accent) !important;
}

.listing_wrapper.property_unit_v4 .icon-fav:focus-visible {
	outline: 3px solid var(--waoh-card-accent) !important;
	outline-offset: 3px !important;
}

/* A card always follows the same reading order:
 * title, non-clickable locality, highlighted details, capacity and price. */
.listing_wrapper.property_unit_v4.waoh-card-location-ready .category_tagline.actions_icon:not(.property_card_location) {
	display: none !important;
}

.listing_wrapper.property_unit_v4 .waoh-card-location,
.listing_wrapper.property_unit_v4 .property_card_location.waoh-card-location {
	display: block;
	margin: 3px 0 0;
	overflow: hidden;
	color: var(--waoh-card-text);
	font-family: inherit;
	font-size: var(--waoh-card-meta-font-size, 13px);
	font-weight: 400;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.listing_wrapper.property_unit_v4 .waoh-card-highlights {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 7px;
	margin: 5px 0 0;
	overflow: hidden;
	color: var(--waoh-card-text);
	font-family: inherit;
	font-size: var(--waoh-card-meta-font-size, 13px);
	font-weight: 400;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.listing_wrapper.property_unit_v4 .waoh-card-highlights__item {
	display: inline-flex;
	min-width: 0;
	align-items: center;
	gap: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.listing_wrapper.property_unit_v4 .waoh-card-highlights__icon {
	display: block;
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
	fill: none;
	stroke: var(--waoh-card-accent);
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.listing_wrapper.property_unit_v4 .waoh-card-highlights__separator {
	flex: 0 0 auto;
	color: var(--waoh-card-text);
}

@media (max-width: 767px) {
	.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper .property_unit_action,
	.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper-full .property_unit_action,
	.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper > .icon-fav,
	.listing_wrapper.property_unit_v4 .listing-unit-img-wrapper-full > .icon-fav {
		top: 16px !important;
		right: 16px !important;
	}

	.listing_wrapper.property_unit_v4 .waoh-card-highlights {
		gap: 6px;
	}
}
