/* Single Facility page (templates/single-cmr_facility.php) */

/* Weekly open/closed day pills (S M T W T F S) */
.cmr-day-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
}
.cmr-day-pill-open {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1.5px solid #1d4ed8;
}
.cmr-day-pill-closed {
	background: #f3f4f6;
	color: #9ca3af;
	border: 1.5px solid transparent;
}

.cmr-facility-hours { font-size: 15px; }

.cmr-book-now-btn { text-decoration: none; }

/* Duration & Price table */
.cmr-pricing-table th {
	background: #f8fafc;
	font-weight: 600;
}
.cmr-pricing-table td,
.cmr-pricing-table th {
	vertical-align: middle;
}

.cmr-facility-cta { }

/* ---- Product-style gallery: one main image with the gallery tiles
   directly below it, both stacked inside the LEFT half of the page (the
   left/right 50/50 split is handled by the header's own Bootstrap row/
   col-md-6 markup, not by this component). Clicking a thumbnail swaps the
   main image's src in place — same spot on the page, matching a
   WooCommerce product gallery. Clicking the main image opens the
   lightbox for a full-size view. ---- */
.cmr-product-gallery-main {
	background: #f8fafc;
	border-radius: 6px;
	overflow: hidden;
}
.cmr-gallery-main-img {
	display: block;
	width: 100%;
	max-height: 450px;
	object-fit: cover;
	background: #f8fafc;
	cursor: zoom-in;
	aspect-ratio: 1 / 1;
}
.cmr-product-gallery-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.cmr-gallery-thumb-btn {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	background: none;
	cursor: pointer;
	width: 64px;
	height: 64px;
	overflow: hidden;
	flex-shrink: 0;
}
.cmr-gallery-thumb-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none; /* clicks always land on the parent <button>, never the <img> itself */
}
.cmr-gallery-thumb-btn.active {
	border-color: #1d4ed8;
}
.cmr-gallery-thumb-btn:hover {
	opacity: 0.85;
}

/* ---- Lightbox (built dynamically by facility-single.js, appended once
   to <body> the first time it's opened) ---- */
.cmr-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.9);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}
.cmr-lightbox.cmr-lightbox-open {
	display: flex;
}
.cmr-lightbox-img {
	max-width: 90vw;
	max-height: 88vh;
	object-fit: contain;
}
.cmr-lightbox-close,
.cmr-lightbox-prev,
.cmr-lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: #fff;
	cursor: pointer;
	line-height: 1;
}
.cmr-lightbox-close {
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	font-size: 26px;
}
.cmr-lightbox-prev,
.cmr-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	font-size: 28px;
}
.cmr-lightbox-prev { left: 16px; }
.cmr-lightbox-next { right: 16px; }
.cmr-lightbox-close:hover,
.cmr-lightbox-prev:hover,
.cmr-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.25);
}
@media(min-width:767px){
	.cmr-single-facility-left{
		position:sticky;top:170px;
	}
}
/* ---- Terms & Conditions popup (landing page) - same look as the popup in
   the booking flow's final step ---- */
.cmr-tc-open { font-weight: 600; text-decoration: underline; cursor: pointer; }
.cmr-tc-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}
.cmr-tc-modal[hidden] { display: none; }
.cmr-tc-modal-box {
	background: #fff;
	border-radius: 10px;
	max-width: 600px;
	width: 100%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	position: relative;
	padding: 24px;
}
.cmr-tc-modal-box h3 { margin: 0 0 14px; padding-right: 30px; }
.cmr-tc-modal-body { overflow-y: auto; font-size: 13.5px; line-height: 1.7; color: #374151; }
.cmr-tc-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #f3f4f6;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	color: #374151;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 0;
}
.cmr-tc-modal-close:hover { background: #e5e7eb; }

.cmr-facility-enquiries .cmr-enquiry-body p:last-child { margin-bottom: 0; }
