/**
 * Property card availability banner — grid, map, and swiper layouts.
 */

.card,
.tpj-property-card {
	border-radius: 0 !important;
}

.grid-card .property-availability,
.map-card .property-availability,
.recentProperties-card .property-availability {
	position: absolute;
	top: 0;
	right: 0;
	bottom: auto;
	left: 0;
	width: 100%;
	height: 35px;
	z-index: 2;
	background: var(--e-global-color-primary, #ff8f50);
	padding: 0.2em 0.8em;
	box-sizing: border-box;
}

.grid-card .property-availability p,
.map-card .property-availability p,
.recentProperties-card .property-availability p {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
}

.grid-card .property-availability p,
.map-card .property-availability p {
	color: #404144;
}

.grid-card .property-availability.availability-sold-stc p,
.map-card .property-availability.availability-sold-stc p,
.recentProperties-card .property-availability p {
	color: #fff;
}

/* Development-type box on latest-properties / development sliders. */
.recentProperties-card {
	position: relative;
}

.recentProperties-card .department-grid-box {
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	z-index: 1;
	background: #657360 !important;
	width: 55%;
	height: auto;
	padding: 1em 0.5em 1em;
	text-align: center;
	box-sizing: border-box;
}

.recentProperties-card .department-grid-box h3 {
	color: #ffffff !important;
	font-size: 1rem;
	font-weight: 600;
	margin: 0;
	white-space: nowrap;
}

/*
 * When Sold STC / availability banner is present, sit the department label
 * on top of the banner (right side) so the texts do not overwrite each other.
 */
.recentProperties-card:has(.property-availability) .department-grid-box {
	background: transparent !important;
	width: auto;
	max-width: 55%;
	height: 35px;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 0 0.8em;
	z-index: 3;
}

.recentProperties-card:has(.property-availability) .department-grid-box h3 {
	font-size: 0.9rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Retirement Living Plus — slate blue badge. */
.department-grid-box.department-type-retirement-living-plus,
.department-box.department-type-retirement-living-plus {
	background: #516775 !important;
}

/* More details link — berry rebrand. */
.more-details,
.grid-card .card-footer a,
.map-card .card-footer a,
.recentProperties-card .card-footer a {
	color: #7a1e39 !important;
}

/* Homepage latest-properties swiper — fills Elementor column (no nested Bootstrap container). */
.recentProps-wrapper.mcc-latest-props,
.mcc-latest-props {
	position: relative;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	padding-bottom: 2.75rem;
	box-sizing: border-box;
}

.recentProps-wrapper {
	position: relative;
	overflow: hidden;
	padding-bottom: 2.75rem;
}

.recentProps-wrapper .latestPropertiesSwiper {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.recentProps-wrapper .swiper-wrapper {
	align-items: stretch;
}

.recentProps-wrapper .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

.recentProps-wrapper .swiper-slide .recentProperties-card {
	width: 100%;
	max-width: 100%;
	height: 100%;
	margin: 0;
}

/* Keep homepage cards compact in the side column. */
.recentProps-wrapper .recentProperties-card .card-img-top {
	min-height: 180px;
	max-height: 200px;
	width: 100%;
	display: block;
	object-fit: cover;
}

.recentProperties-card .card-img-top {
	width: 100%;
	display: block;
}

.recentProperties-card .card-body {
	min-height: 0;
	max-height: none;
	padding: 0.85rem 0.9rem 0.65rem;
	box-sizing: border-box;
}

.recentProperties-card .card-title {
	font-size: clamp(1.05rem, 3.5vw, 1.2rem);
	line-height: 1.25;
	word-break: break-word;
}

.recentProperties-card .full-address {
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
	line-height: 1.4;
	margin-bottom: 0.4rem;
	font-size: 0.95rem;
}

.recentProperties-card .card-text {
	line-height: 1.35;
	font-size: 0.95rem;
}

/* Match card-body horizontal padding; cancel Bootstrap .row negative gutters. */
.recentProperties-card .card-footer,
.recentProperties-card .card-footer.row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	--bs-gutter-x: 0;
	margin-left: 0;
	margin-right: 0;
	padding: 0.65rem 0.9rem 0.9rem;
	box-sizing: border-box;
}

.recentProperties-card .card-footer > .col {
	flex: 0 1 auto;
	width: auto;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.recentProperties-card .card-footer .rooms-wrap {
	display: flex;
	align-items: center;
	flex: 0 1 auto;
	min-width: 0;
}

.recentProperties-card .card-footer .rooms-wrap .room-text {
	display: inline-flex;
	align-items: center;
	margin: 0 0.75rem 0 0;
	white-space: nowrap;
}

.recentProperties-card .card-footer .rooms-wrap .room-text:last-child {
	margin-right: 0;
}

.recentProperties-card .card-footer .rooms-wrap .room-text svg {
	flex-shrink: 0;
}

.recentProperties-card .card-footer > .text-end {
	flex: 0 0 auto;
	margin-left: auto;
	padding-right: 0;
	text-align: right;
}

.recentProperties-card .card-footer .more-details {
	display: inline-block;
	white-space: nowrap;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
}

.recentProperties-card .department-grid-box {
	left: 0;
	right: auto;
	width: auto;
	max-width: calc(100% - 1rem);
	padding: 0.5em 0.75em;
	text-align: left;
}

.recentProperties-card .department-grid-box h3 {
	white-space: normal;
	line-height: 1.2;
	text-align: left;
}

.recentProperties-card:has(.property-availability) .department-grid-box {
	left: auto;
	right: 0;
	max-width: min(100%, 14rem);
	justify-content: flex-end;
}

.recentProps-wrapper .swiper-button-next,
.recentProps-wrapper .swiper-button-prev {
	top: 38%;
	width: 36px;
	height: 36px;
	margin-top: 0;
	transform: translateY(-50%);
	z-index: 5;
	color: #ffffff;
	background: #404144;
	border: 0;
}

.recentProps-wrapper .swiper-button-next::after,
.recentProps-wrapper .swiper-button-prev::after {
	font-size: 14px;
	font-weight: 700;
}

.recentProps-wrapper .swiper-button-prev {
	left: 8px;
}

.recentProps-wrapper .swiper-button-next {
	right: 8px;
}

.recentProps-wrapper .swiper-pagination {
	bottom: 0.5rem;
}

@media (max-width: 912px) {
	.recentProps-wrapper .recentProperties-card .card-img-top {
		min-height: 160px;
		max-height: 180px;
	}

	.recentProps-wrapper .swiper-button-next,
	.recentProps-wrapper .swiper-button-prev {
		top: 34%;
	}
}
