/*
Theme Name: Homey Child
Template: homey
Description: Child theme for Homey. Keep the name "Homey Child": the homey-core plugin checks for it.
Version: 1.0.16
Text Domain: homey-child
*/

/* Listing list widget: markup comes from the homey-core plugin, so it is hidden here. */
.widget .item-list-view .label-featured,
.widget .item-list-view .title-head-left .rating,
.widget .item-list-view .item-amenities li:not(:has(.total-beds, .total-baths, .total-guests)) {
	display: none !important;
}

/* Map popup: markup is built in the parent theme's JS. */
#google-maps-info-window .item-type {
	display: none !important;
}

/* Footer map: replaces the About / Explore / Company columns (template-parts/footer/footer.php).
   The map fills the footer's top area (about 430px tall); Contact Us keeps its usual 100px top offset. */
.footer-top-wrap-map {
	padding: 30px 0;
}
.footer-map {
	position: relative;
	height: 430px;
	border-radius: 4px;
	overflow: hidden;
}
.footer-map iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
@media (min-width: 992px) {
	.footer-top-wrap-map .footer-contact-col {
		padding-top: 70px;
	}
}
@media (max-width: 991px) {
	.footer-map {
		height: 320px;
		margin-bottom: 30px;
	}
}

/* Listing booking box: Contact the host / Print / Share moved inside the white
   box (single-listing/booking/sidebar-booking-footer.php), under a thin line.
   The whole box is painted white so the footer sits on the same card. */
.sidebar-booking-module > .block {
	background-color: #fff;
	border-radius: 8px;
}
.sidebar-booking-module > .block > .sidebar-booking-module-footer.vm-booking-footer-in-box {
	margin: 0 30px;
	background-color: transparent;
	border-top: 1px solid #e4ddd3;
}
.sidebar-booking-module > .block > .vm-booking-footer-in-box .block-body-sidebar {
	padding: 20px 0 5px;
}
.sidebar-booking-module > .block > .vm-booking-footer-in-box .social-icons {
	padding: 0 0 20px;
	background-color: transparent;
}

/* "terms and rules" popup (inc/terms-popup.php): the text scrolls, the X stays in view. */
.vm-terms-modal .modal-dialog {
	max-width: 860px;
	width: auto;
	margin: 30px auto;
	padding: 0 15px;
	box-shadow: none; /* Homey shadows the dialog; with the padding it showed as a box behind. */
}
.vm-terms-modal .modal-content {
	border: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.vm-terms-modal .modal-header {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 15px;
	padding: 18px 24px;
	border-bottom: 1px solid #e4ddd3;
}
.vm-terms-modal .modal-title {
	flex: 1 1 auto;
	margin: 0;
	font-size: 20px;
	color: #242e2b;
}
.vm-terms-modal .vm-terms-modal-close {
	float: none;
	width: 40px;
	height: 40px;
	margin: -8px -10px -8px 0;
	font-size: 34px;
	font-weight: 400;
	line-height: 40px;
	color: #242e2b;
	opacity: 0.75;
	text-shadow: none;
}
.vm-terms-modal .vm-terms-modal-close:hover,
.vm-terms-modal .vm-terms-modal-close:focus {
	opacity: 1;
}
.vm-terms-modal .modal-body {
	max-height: calc(100vh - 160px);
	overflow-y: auto;
	padding: 24px;
	-webkit-overflow-scrolling: touch;
}
.vm-terms-modal .vm-policy {
	font-size: 16px;
}
/* The floating WhatsApp button would sit on top of the popup's text. */
body.modal-open .vm-whatsapp {
	display: none;
}
.vm-terms-modal .vm-policy > :first-child {
	margin-top: 0;
}
@media (max-width: 767px) {
	.vm-terms-modal .modal-dialog { margin: 10px auto; padding: 0 10px; }
	.vm-terms-modal .modal-body { max-height: calc(100vh - 100px); padding: 18px; }
}

/* Listing booking box: phone field, terms checkbox (single-listing/booking/*.php, js/booking.js). */
.sidebar-booking-module .vm-guest-phone-wrap,
.sidebar-booking-module .new_reser_request_user_email,
.overlay-booking-module .vm-guest-phone-wrap,
.overlay-booking-module .new_reser_request_user_email {
	margin-bottom: 10px;
}
.vm-booking-terms {
	margin: 0 0 15px;
}
.vm-booking-terms label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}
.vm-booking-terms input[type="checkbox"] {
	flex: none;
	margin: 3px 0 0;
}
.vm-booking-terms a {
	text-decoration: underline;
}
.vm-guest-phone.vm-field-invalid {
	border-color: #d9534f;
}
.vm-booking-terms-invalid label {
	color: #d9534f;
}
.vm-terms-error {
	margin-bottom: 10px;
	white-space: normal;
}

/* Listing share icons (single-listing/share.php). */
.vm-share {
	display: flex;
	justify-content: center;
	gap: 10px;
}
.vm-share a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	border-radius: 50%;
	color: #fff;
	font-size: 18px;
	transition: opacity 0.2s;
}
.vm-share a:hover,
.vm-share a:focus {
	color: #fff;
	opacity: 0.85;
}
.vm-share-facebook {
	background-color: #506dab;
}
.vm-share-instagram {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.vm-share-airbnb {
	background-color: #ff5a5f;
}
.vm-share-email {
	background-color: #242e2b;
}

/* Floating WhatsApp button (functions.php). */
.vm-whatsapp {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: #25d366;
	color: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s;
}
.vm-whatsapp:hover,
.vm-whatsapp:focus {
	color: #fff;
	transform: scale(1.06);
}
/* Mobile listing pages have a fixed "book" bar along the bottom. */
@media (max-width: 991px) {
	.single-listing .vm-whatsapp {
		bottom: 90px;
	}
}

/* Listing Prices section: prices left, payment note + min/max stay right (single-listing/prices.php). */
.vm-price-cols {
	display: flex;
	gap: 30px;
}
.vm-price-cols > .detail-list,
.vm-price-side {
	flex: 1 1 0;
	min-width: 0;
}
/* Homey capitalises every word in these lists; keep the wording as written ("7 nights for the price of 6"). */
#price-section ul.detail-list li,
#price-section ul.detail-list li strong {
	text-transform: none;
}
.vm-payment-info {
	margin-bottom: 15px;
	line-height: 1.6;
}
.vm-payment-info p {
	margin: 0 0 10px;
}
@media (max-width: 767px) {
	.vm-price-cols {
		flex-direction: column;
		gap: 0;
	}
}

/* Listing Features: Amenities and Facilities each show 6 items, the rest collapsible (single-listing/features.php). */
.vm-features-toggle-wrap {
	margin: -5px 0 20px;
	text-align: center;
}
.vm-features-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	font-weight: 500;
	text-decoration: underline;
}
.vm-features-toggle i {
	transition: transform 0.2s;
	transform: rotate(180deg);
}
.vm-features-toggle.collapsed i {
	transform: none;
}
.vm-features-toggle .vm-features-toggle-more,
.vm-features-toggle.collapsed .vm-features-toggle-less {
	display: none;
}
.vm-features-toggle.collapsed .vm-features-toggle-more {
	display: inline;
}

/* Listing Features: icon per amenity/facility (homey_child_feature_icon in single-listing/features.php). */
.features-section .vm-feature-item {
	display: flex;
	align-items: center;
	gap: 10px;
}
.features-section .vm-feature-icon {
	flex: 0 0 22px;
	width: 22px;
	margin: 0;
	font-size: 18px;
	line-height: 1;
	text-align: center;
}
.features-section .vm-feature-icon.homey-icon-arrow-right-1 {
	font-size: 12px;
}
/* Lounge chair: no such icon in the Homey font, so an SVG mask painted in the text colour. */
.vm-icon-lounge-chair::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	vertical-align: middle;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l4.5 10H21'/%3E%3Cpath d='M10 12h9'/%3E%3Cpath d='M7.5 15L6 20M19 15l1.5 5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l4.5 10H21'/%3E%3Cpath d='M10 12h9'/%3E%3Cpath d='M7.5 15L6 20M19 15l1.5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/*
 * Listing page: the booking box stays in view while the page scrolls (desktop).
 * Pure CSS sticky: functions.php swaps the parent's .homey_sticky class (its
 * jQuery sticky plugin) for .vm-sticky-sidebar; both are listed here so the
 * layout is the same before and after that script runs. The row becomes flex
 * so the sidebar column runs the full height of the content, giving the box
 * room to stick. The buttons under the box (favourites, share) slide up
 * behind it.
 */
@media (min-width: 992px) {
	.detail-property-page .row:has(> .homey_sticky, > .vm-sticky-sidebar) {
		display: flex;
	}
	.detail-property-page .row > :is(.homey_sticky, .vm-sticky-sidebar) > .sidebar {
		height: 100%;
	}
	.detail-property-page :is(.homey_sticky, .vm-sticky-sidebar) .sidebar-booking-module {
		position: sticky;
		top: 80px; /* below the fixed listing nav */
		z-index: 5;
	}
	.admin-bar .detail-property-page :is(.homey_sticky, .vm-sticky-sidebar) .sidebar-booking-module {
		top: 112px;
	}
}

/* Listing page: Terms & rules "Additional rules" collapsed to ~3 lines with Read more (single-listing/rules.php). */
.vm-readmore-text h4 { font-size: 16px; margin: 0 0 8px; }
.vm-readmore-text h4:not(:first-child) { margin-top: 18px; }
.vm-readmore-text ul { padding-left: 20px; margin-bottom: 10px; }
.vm-readmore-text p { margin-bottom: 8px; }
.vm-readmore.is-collapsed .vm-readmore-text {
	max-height: 8em;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 55%, transparent);
	mask-image: linear-gradient(#000 55%, transparent);
}
.vm-readmore-btn {
	margin-top: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: #c47e2c;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.vm-readmore-btn:hover { color: #a96a22; }
/* Read more as a link to the full page (Cancellation Policy, House Rules & Terms). */
a.vm-readmore-link { display: inline-block; margin-bottom: 18px; }
.vm-policy-preview p { margin-bottom: 0; }
.vm-readmore-link .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Footer bottom bar links: Cancellation Policy, House Rules & Terms (Footer Menu location). */
.vm-footer-menu { display: inline; }
.vm-footer-links { display: inline; margin: 0; padding: 0; list-style: none; }
.vm-footer-links li { display: inline; }
.vm-footer-links li::before { content: "·"; margin: 0 10px; opacity: 0.6; }
.vm-footer-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.vm-footer-links a:hover { color: #c47e2c; }
@media (max-width: 991px) {
	.vm-footer-menu { display: block; margin-top: 6px; }
	.vm-footer-links li:first-child::before { content: none; }
}

/* Elementor widget "Villas Maguey Facilities" (inc/elementor/facilities-widget.php): photo cards like Homey's city grid. */
.vm-facilities {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}
.vm-facility {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	overflow: hidden;
	background: #e4ddd3;
	color: #fff;
	text-decoration: none;
}
.vm-facility:hover, .vm-facility:focus { color: #fff; text-decoration: none; }
.vm-facility::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.65) 100%);
}
.vm-facility .vm-facility-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.vm-facility-body {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 0 20px 20px;
	text-align: center;
}
.vm-facility-title {
	display: block;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.vm-facility-text {
	display: block;
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.45;
	opacity: 0.92;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
@media (max-width: 1024px) {
	.vm-facilities { gap: 20px; }
}

/* Dashboard: Custom Period Prices edit button (inc/custom-periods.php). */
.custom-actions .vm-edit-period { margin-right: 6px; }
tr.vm-period-editing td { background: #f6f4ef; }
.vm-period-note {
	padding: 10px 14px;
	border-left: 3px solid #c47e2c;
	background: #f6f4ef;
	font-size: 14px;
}

/* Homepage "Book Now" villa card (Elementor page 3935, section 60c286b3).
   Elementor sets a fixed 380px right margin + 50px paddings on every screen,
   which crushes the card on phones. Reflow it for tablet and mobile. */
@media (max-width: 1024px) {
	.elementor-3935 .elementor-element.elementor-element-60c286b3 > .elementor-container { min-height: 0; }
	.elementor-3935 .elementor-element.elementor-element-76899f10 > .elementor-element-populated {
		margin: 0 !important;
		--e-column-margin-right: 0px;
		--e-column-margin-left: 0px;
		padding: 80px 40px !important;
	}
	.elementor-3935 .elementor-element.elementor-element-51d8144e { padding: 40px !important; }
}
@media (max-width: 767px) {
	.elementor-3935 .elementor-element.elementor-element-76899f10 > .elementor-element-populated { padding: 56px 16px !important; }
	.elementor-3935 .elementor-element.elementor-element-51d8144e {
		padding: 28px 24px !important;
		border-radius: 4px;
	}
	.elementor-3935 .elementor-element.elementor-element-10be37dc .homey_section_title_wrap_elementor { margin-bottom: 14px; }
	.elementor-3935 .elementor-element.elementor-element-10be37dc .homey_section_title { font-size: 28px; line-height: 1.2; }
	.elementor-3935 .elementor-element.elementor-element-10be37dc .homey_section_subtitle { font-size: 20px; line-height: 1.4; margin-top: 6px; }
	.elementor-3935 .elementor-element.elementor-element-37d066d6 { font-size: 15px; line-height: 1.6; }
	.elementor-3935 .elementor-element.elementor-element-2cefc05f .elementor-button {
		display: block;
		width: 100%;
		text-align: center;
	}
}

/* Listing Accommodation section (single-listing/accomodation.php): one bed drawing per bed. */
.accomodation-section .vm-accomodation dl {
	margin-bottom: 10px;
}
.accomodation-section .vm-bed-icons {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px;
	margin-bottom: 24px;
}
.accomodation-section .vm-bed-icon {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	color: #242e2b;
	opacity: .8;
}

/* "Villas Maguey Gallery" Elementor widget (inc/elementor/gallery-widget.php; button from js/vm-gallery.js).
   Columns, gap, shape and corners are set in the widget; these are the defaults. */
.vm-gallery-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}
.vm-gallery-item {
	display: block;
}
.vm-gallery-item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 4px;
	transition: opacity .2s;
}
a.vm-gallery-item:hover img {
	opacity: .85;
}
.vm-gallery-grid.vm-collapsed .vm-gallery-extra {
	display: none;
}
.vm-gallery-toggle-wrap {
	text-align: center;
	margin-top: 20px;
}
.vm-gallery-toggle {
	background: none;
	border: 0;
	padding: 6px 10px;
	color: #242e2b;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.vm-gallery-toggle i {
	display: inline-block;
	font-size: 11px;
	margin-left: 4px;
	transition: transform .2s;
}
.vm-gallery-toggle[aria-expanded="true"] i {
	transform: rotate(180deg);
}
.vm-gallery-empty {
	padding: 30px;
	text-align: center;
	border: 1px dashed #c8c2b8;
}
/* Gallery widget: heading and description ("Read more" after N lines, set in the widget). */
.vm-gallery {
	--vm-gallery-space: 24px;
}
.vm-gallery-head {
	margin-bottom: var(--vm-gallery-space);
}
.vm-gallery-foot {
	margin-top: var(--vm-gallery-space);
}
.vm-gallery-title {
	margin: 0;
	color: #242e2b;
	font-family: Quicksand, sans-serif;
	font-weight: 700;
	font-size: 30px;
	line-height: 1.3;
}
.vm-gallery-head .vm-gallery-title + .vm-gallery-text {
	margin-top: 14px;
}
.vm-gallery-desc {
	color: #242e2b;
	line-height: 1.7;
}
.vm-gallery-desc > :last-child {
	margin-bottom: 0;
}
.vm-gallery-desc.vm-clamped {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.vm-gallery-readmore {
	background: none;
	border: 0;
	padding: 0;
	margin-top: 8px;
	color: #c47e2c;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.vm-gallery-readmore[hidden] {
	display: none;
}
