/* ═══════════════════════════════════════════
   Chancery Book Consultation v2.1
   Full-width modal, right-aligned map pins
   ═══════════════════════════════════════════ */

/* ── Trigger button ── */
.chbc-btn-wrap { line-height: 1; }

.chbc-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 32px;
	background-color: #A62461;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .01em;
	border-radius: 14px;
	border: none;
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
	transition: background-color 200ms ease, transform 180ms ease, box-shadow 200ms ease;
	box-shadow: 0 4px 24px rgba(166,36,97,0.35);
}
.chbc-btn:hover {
	background-color: #8c1d52;
	transform: translateY(-2px);
	box-shadow: 0 8px 32px rgba(166,36,97,0.45);
}
.chbc-btn:active { transform: translateY(0); }
.chbc-btn svg { flex-shrink: 0; }

/* ── Overlay ── */
.chbc-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 350ms ease;
}
.chbc-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}
.chbc-overlay-bg {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.65);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	cursor: pointer;
}

/* ── Modal shell — full page width ── */
.chbc-modal {
	position: relative;
	z-index: 2;
	background: #fff;
	border-radius: 24px;
	width: 100%;
	max-width: calc(100vw - 40px);
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	box-shadow: 0 40px 100px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.06);
	transform: scale(0.92) translateY(24px);
	transition: transform 420ms cubic-bezier(0.34, 1.1, 0.64, 1);
	scrollbar-width: thin;
	scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.chbc-overlay.is-open .chbc-modal {
	transform: scale(1) translateY(0);
}

/* ── Modal header ── */
.chbc-modal-head {
	position: sticky;
	top: 0;
	background: #fff;
	padding: 28px 28px 0;
	z-index: 10;
	border-radius: 24px 24px 0 0;
}
.chbc-modal-head-inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding-bottom: 20px;
	border-bottom: 1px solid #f0f0f0;
}
.chbc-modal-title {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #0a0a0a;
	line-height: 1.1;
}
.chbc-modal-sub {
	font-size: 13px;
	color: #6b7280;
	margin-top: 6px;
	line-height: 1.5;
}

/* ── Close button ── */
.chbc-close-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid #e5e7eb;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	margin-left: 16px;
	margin-top: 2px;
	transition: background 180ms ease, border-color 180ms ease;
	font-family: inherit;
	padding: 0;
}
.chbc-close-btn:hover {
	background: #e5e7eb;
	border-color: #d1d5db;
}

/* ── Location grid ── */
.chbc-locations {
	display: grid;
	gap: 16px;
	padding: 24px 28px 28px;
}
.chbc-grid-1 { grid-template-columns: 1fr; }
.chbc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.chbc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.chbc-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Location card ── */
.chbc-loc-card {
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: hidden;
	transition: border-color 250ms ease, box-shadow 250ms ease;
	animation: chbc-card-in 400ms ease both;
}
.chbc-loc-card:hover {
	border-color: #A62461;
	box-shadow: 0 4px 24px rgba(166,36,97,0.1);
}

@keyframes chbc-card-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Map ── */
.chbc-map-wrap {
	position: relative;
	height: 140px;
	background: #e8eaed;
	overflow: hidden;
}
.chbc-map-wrap iframe {
	width: 100%;
	height: 100%;
	border: none;
	pointer-events: none;
	display: block;
}
.chbc-map-overlay {
	position: absolute;
	inset: 0;
	cursor: default;
	pointer-events: none;
}

/* Pin badge — RIGHT side */
.chbc-map-pin {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: #A62461;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 100px;
	pointer-events: none;
	line-height: 1.3;
}

/* ── Card body ── */
.chbc-loc-body {
	padding: 16px;
}
.chbc-loc-name {
	font-size: 14px;
	font-weight: 700;
	color: #0a0a0a;
	letter-spacing: -0.01em;
	line-height: 1.2;
	margin-bottom: 4px;
}
.chbc-loc-addr {
	font-size: 11px;
	color: #9ca3af;
	line-height: 1.4;
	margin-bottom: 14px;
}

/* ── Action buttons ── */
.chbc-loc-actions {
	display: flex;
	flex-direction: column;
	gap: 7px;
}
.chbc-loc-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 9px 12px;
	border-radius: 9px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.01em;
	cursor: pointer;
	text-decoration: none;
	font-family: inherit;
	border: none;
	width: 100%;
	transition: background-color 180ms ease, transform 150ms ease;
	line-height: 1;
}
.chbc-loc-btn:active { transform: scale(0.98); }
.chbc-loc-btn svg {
	flex-shrink: 0;
	width: 13px;
	height: 13px;
}

.chbc-btn-enquiry { background-color: #fdf2f8; color: #A62461; }
.chbc-btn-enquiry:hover { background-color: #fce7f3; color: #A62461; }

.chbc-btn-call { background-color: #f0fdf4; color: #16a34a; }
.chbc-btn-call:hover { background-color: #dcfce7; color: #16a34a; }

.chbc-btn-book { background-color: #A62461; color: #fff; }
.chbc-btn-book:hover { background-color: #8c1d52; color: #fff; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	.chbc-btn,
	.chbc-overlay,
	.chbc-modal,
	.chbc-loc-card {
		transition: none;
		animation: none;
	}
}

/* ── Responsive ── */

/* Tablet: 4-col becomes 2x2 */
@media (max-width: 900px) {
	.chbc-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Smaller tablet */
@media (max-width: 768px) {
	.chbc-grid-3 { grid-template-columns: repeat(2, 1fr); }
	.chbc-grid-2 { grid-template-columns: repeat(2, 1fr); }
	.chbc-modal-head { padding: 20px 20px 0; }
	.chbc-locations { padding: 16px 20px 20px; }
	.chbc-overlay { padding: 12px; }
	.chbc-modal {
		max-width: calc(100vw - 24px);
		max-height: 95vh;
		border-radius: 20px;
	}
	.chbc-modal-head { border-radius: 20px 20px 0 0; }
}

/* Mobile: everything stacks */
@media (max-width: 520px) {
	.chbc-grid-4,
	.chbc-grid-3,
	.chbc-grid-2 {
		grid-template-columns: 1fr;
	}
	.chbc-map-wrap { height: 120px; }
	.chbc-modal-title { font-size: 19px; }
	.chbc-overlay { padding: 8px; }
	.chbc-modal { max-width: calc(100vw - 16px); }
}
