/* Compact room-type page — gallery mosaic + info + sticky booking */

body.vm-rt-modern.single-mphb_room_type {
	overflow-x: clip;
}

body.vm-rt-modern.single-mphb_room_type .site-content {
	padding-top: 1.25rem;
	overflow-x: clip;
	max-width: 100%;
}

body.vm-rt-modern .vm-rt-page {
	max-width: min(1120px, 100%);
	margin: 0 auto;
	padding: 0 1rem 2.5rem;
	overflow-x: clip;
	box-sizing: border-box;
}

/* —— Gallery mosaic —— */
.vm-rt-gallery {
	position: relative;
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	grid-template-rows: minmax(140px, 28vh) minmax(140px, 28vh);
	gap: 6px;
	margin: 0 0 1.25rem;
	border-radius: 14px;
	overflow: hidden;
	background: #e8eaf0;
	max-height: min(56vh, 420px);
}

.vm-rt-gallery-item {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	cursor: pointer;
	overflow: hidden;
	background: #d5d8e2;
	color: inherit;
}

.vm-rt-gallery-item.is-main {
	grid-row: 1 / span 2;
	grid-column: 1;
}

.vm-rt-gallery:has(.vm-rt-gallery-item:only-child) {
	grid-template-columns: 1fr;
	grid-template-rows: minmax(200px, 40vh);
	max-height: 40vh;
}

.vm-rt-gallery:has(.vm-rt-gallery-item:only-child) .vm-rt-gallery-item.is-main {
	grid-column: 1;
	grid-row: 1;
}

.vm-rt-gallery:not(:has(.vm-rt-gallery-item:nth-child(3))) {
	grid-template-columns: 1.4fr 1fr;
	grid-template-rows: minmax(180px, 36vh);
	max-height: 36vh;
}

.vm-rt-gallery:not(:has(.vm-rt-gallery-item:nth-child(3))) .vm-rt-gallery-item.is-main {
	grid-row: 1;
}

.vm-rt-gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.vm-rt-gallery-item:hover img,
.vm-rt-gallery-item:focus-visible img {
	transform: scale(1.03);
}

.vm-rt-gallery-item:focus-visible {
	outline: 2px solid #252e59;
	outline-offset: -2px;
	z-index: 1;
}

.vm-rt-gallery-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(37, 46, 89, 0.48);
	color: #fff;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.vm-rt-gallery-all {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	border: 0;
	border-radius: 999px;
	padding: 0.45rem 0.9rem;
	background: rgba(255, 255, 255, 0.94);
	color: #252e59;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(37, 46, 89, 0.18);
}

.vm-rt-gallery-all:hover,
.vm-rt-gallery-all:focus-visible {
	background: #fff;
}

/* —— Layout —— */
.vm-rt-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
	gap: 1.75rem 2rem;
	align-items: start;
}

.vm-rt-main,
.vm-rt-aside {
	min-width: 0;
	max-width: 100%;
}

.vm-rt-header {
	margin: 0 0 1.25rem;
}

.vm-rt-title {
	margin: 0 0 0.85rem;
	font-size: clamp(1.6rem, 2.4vw, 2.1rem);
	line-height: 1.2;
	color: #252e59;
	overflow-wrap: anywhere;
}

.vm-rt-facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vm-rt-facts li {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.15rem;
	min-width: 0;
	min-height: 3.75rem;
	height: 100%;
	padding: 0.55rem 0.65rem;
	border-radius: 10px;
	background: #f3f4f8;
	border: 1px solid #e4e6ee;
	box-sizing: border-box;
}

.vm-rt-fact-label {
	font-size: 0.68rem;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #7a8094;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vm-rt-fact-value {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.25;
	font-weight: 650;
	color: #252e59;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vm-rt-section {
	margin: 0 0 1.75rem;
}

.vm-rt-section-title,
.vm-rt-details .mphb-details-title,
.vm-rt-availability .mphb-calendar-title {
	margin: 0 0 0.75rem;
	font-size: 1.15rem;
	color: #252e59;
}

.vm-rt-description-body {
	font-size: 1rem;
	line-height: 1.65;
	color: #3d4256;
}

.vm-rt-description-body > *:first-child {
	margin-top: 0;
}

.vm-rt-description-body > *:last-child {
	margin-bottom: 0;
}

/* Details: clean label/value rows (override theme table-cell layout) */
.vm-rt-details .mphb-single-room-type-attributes {
	display: flex !important;
	flex-direction: column;
	gap: 0;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid #e4e6ee;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-sizing: border-box;
}

.vm-rt-details .mphb-single-room-type-attributes li {
	display: grid !important;
	grid-template-columns: minmax(6.5rem, 36%) minmax(0, 1fr);
	align-items: baseline;
	gap: 0.5rem 1rem;
	margin: 0 !important;
	padding: 0.8rem 1rem !important;
	border: 0 !important;
	border-bottom: 1px solid #eceef4 !important;
	border-radius: 0;
	background: transparent;
	font-size: 0.9375rem;
	transform: none;
	box-sizing: border-box;
}

.vm-rt-details .mphb-single-room-type-attributes li:last-child {
	border-bottom: 0 !important;
}

.vm-rt-details .mphb-single-room-type-attributes li:nth-child(even) {
	background: #fafbfd;
}

.vm-rt-details .mphb-single-room-type-attributes li:before {
	content: none !important;
	display: none !important;
}

.vm-rt-details .mphb-single-room-type-attributes .mphb-attribute-title,
.vm-rt-details .mphb-single-room-type-attributes .mphb-attribute-value {
	display: block !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	background-clip: border-box !important;
	position: static;
	min-width: 0;
}

.vm-rt-details .mphb-attribute-title {
	color: #7a8094;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.35;
}

.vm-rt-details .mphb-attribute-title::after {
	content: none;
}

.vm-rt-details .mphb-attribute-value {
	color: #252e59;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.vm-rt-details .mphb-attribute-value a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid rgba(37, 46, 89, 0.2);
}

.vm-rt-details .mphb-attribute-value a:hover {
	color: #252e59;
	border-bottom-color: #252e59;
}

/* Facilities already shown as amenity chips */
.vm-rt-details .mphb-single-room-type-attributes li.mphb-room-type-facilities {
	display: none !important;
}

.vm-rt-amenity-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vm-rt-amenity-list li {
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	background: #eef1f7;
	color: #252e59;
	font-size: 0.875rem;
}

.vm-rt-availability,
.vm-rt-availability .mphb-calendar,
.vm-rt-availability .datepick,
.vm-rt-availability .datepick-multi {
	max-width: 100%;
	box-sizing: border-box;
}

.vm-rt-availability .mphb-calendar {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* —— Booking card —— */
.vm-rt-aside {
	position: sticky;
	top: 1rem;
}

.vm-rt-book-card {
	padding: 1.15rem 1.2rem 1.25rem;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e4e6ee;
	box-shadow: 0 10px 30px rgba(37, 46, 89, 0.08);
}

.vm-rt-book-card .mphb-regular-price {
	margin: 0 0 0.85rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid #eceef4;
}

.vm-rt-book-card .mphb-regular-price .mphb-price {
	font-size: 1.45rem;
	color: #252e59;
}

.vm-rt-book-card .mphb-reservation-form-title,
.vm-rt-book-card .mphb-required-fields-tip {
	display: none !important;
}

.vm-rt-book-card .mphb-booking-form p {
	margin-bottom: 0.75rem;
}

.vm-rt-book-card .mphb-reserve-btn-wrapper {
	margin-bottom: 0;
}

.vm-rt-book-card .mphb-reserve-btn,
.vm-rt-book-card input.button {
	width: 100%;
}

/* Luviana reservation wrappers inside card */
.vm-rt-book-card .single-room-reservation-form,
.vm-rt-book-card .single-room-reservation-form-wrapper {
	margin: 0;
	padding: 0;
	background: transparent;
	box-shadow: none;
	border: 0;
}

/* —— Lightbox —— */
.vm-rt-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(18, 22, 40, 0.88);
	padding: 1rem;
}

.vm-rt-lightbox[hidden] {
	display: none !important;
}

.vm-rt-lightbox-inner {
	position: relative;
	max-width: min(960px, 100%);
	max-height: 90vh;
}

.vm-rt-lightbox-inner img {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	margin: 0 auto;
	border-radius: 8px;
	object-fit: contain;
}

.vm-rt-lightbox-close,
.vm-rt-lightbox-prev,
.vm-rt-lightbox-next {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.92);
	color: #252e59;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	cursor: pointer;
	font-size: 1.25rem;
	line-height: 1;
}

.vm-rt-lightbox-close {
	top: -0.25rem;
	right: -0.25rem;
}

.vm-rt-lightbox-prev,
.vm-rt-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
}

.vm-rt-lightbox-prev { left: -0.5rem; }
.vm-rt-lightbox-next { right: -0.5rem; }

.vm-rt-lightbox-counter {
	display: block;
	margin-top: 0.65rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.875rem;
}

/* —— Mobile —— */
@media (max-width: 900px) {
	.vm-rt-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.vm-rt-aside {
		position: static;
		order: -1;
	}

	.vm-rt-book-card {
		margin-bottom: 0.25rem;
		max-width: 100%;
		box-sizing: border-box;
	}

	.vm-rt-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vm-rt-gallery {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: minmax(160px, 32vw) minmax(100px, 22vw);
		max-height: none;
	}

	.vm-rt-gallery-item.is-main {
		grid-column: 1 / span 2;
		grid-row: 1;
	}

	.vm-rt-gallery-item:nth-child(n + 4) {
		display: none;
	}

	.vm-rt-gallery-item:nth-child(3).is-more,
	.vm-rt-gallery-item:nth-child(3) {
		display: block;
	}

	.vm-rt-details .mphb-single-room-type-attributes li {
		grid-template-columns: minmax(5.5rem, 40%) minmax(0, 1fr);
		padding: 0.7rem 0.85rem !important;
	}
}

@media (max-width: 560px) {
	body.vm-rt-modern .vm-rt-page {
		padding: 0 0.75rem 5.5rem;
	}

	.vm-rt-gallery {
		border-radius: 0;
		margin-left: -0.75rem;
		margin-right: -0.75rem;
		width: calc(100% + 1.5rem);
		max-width: none;
		grid-template-rows: 42vw 28vw;
	}

	.vm-rt-title {
		font-size: 1.45rem;
	}

	.vm-rt-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.vm-rt-details .mphb-single-room-type-attributes li {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}

	.vm-rt-lightbox-prev { left: 0.25rem; }
	.vm-rt-lightbox-next { right: 0.25rem; }
}

/* Hide theme default huge thumbnail if any leftover */
body.vm-rt-modern.single-mphb_room_type .entry-header-wrapper > .post-thumbnail,
body.vm-rt-modern.single-mphb_room_type .mphb-single-room-type-post-thumbnail {
	display: none !important;
}

/* Soften post navigation spacing */
body.vm-rt-modern .post-navigation-wrapper {
	margin-top: 1.5rem;
}
