/**
 * [hoya_event_map] — store finder in the event page's booking band.
 * Step 1 (.hoya-choosing): copy on top, finder full width, form hidden.
 * Step 2 (.hoya-step2):   finder hidden, copy | form as before.
 */

/* --- Band states --------------------------------------------------------- */
.hpe-book.hoya-choosing > .e-con-inner { grid-template-columns: 1fr !important; align-items: start; }
.hpe-book.hoya-choosing .hpe-book__copy .lede { max-width: 60ch; }
.hpe-book.hoya-choosing .hpe-book__list { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hpe-book.hoya-choosing .elementor-widget-form { display: none !important; }
.hpe-book:not(.hoya-choosing) .elementor-widget-shortcode:has([data-hoya-finder]) { display: none; }
.hpe-book .elementor-widget-shortcode:has([data-hoya-finder][hidden]) { display: none; }

/* --- Finder card --------------------------------------------------------- */
.hoya-finder {
	--hf-blue: #0c50c8;
	--hf-ink: #0e1c38;
	--hf-muted: #5b6b86;
	--hf-line: #e4eaf3;
	--hf-gold: #f5a300;
	display: grid;
	grid-template-columns: minmax(300px, 400px) 1fr;
	background: #fff;
	color: var(--hf-ink);
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 30px 70px rgba(4, 20, 60, .30);
	min-height: 560px;
	font-size: 15px;
	text-align: left;
}
.hoya-finder[hidden] { display: none; }
.hoya-finder__panel { padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; border-right: 1px solid var(--hf-line); }

.hoya-finder__step {
	margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hf-blue);
}
.hoya-finder .hoya-finder__label { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #b77900; }

.hoya-finder__search { display: flex; margin: 0; }
.hoya-finder__search input[type="search"] {
	flex: 1; min-width: 0; height: 50px; padding: 0 16px; border: 1px solid var(--hf-line); border-right: 0;
	border-radius: 12px 0 0 12px; font-size: 15px; color: var(--hf-ink); background: #fff;
}
.hoya-finder__search button {
	width: 56px; height: 50px; border: 0; border-radius: 0 12px 12px 0; background: var(--hf-blue); color: #fff;
	display: grid; place-items: center; cursor: pointer; padding: 0;
}
.hoya-finder__search button:hover, .hoya-finder__search button:focus { background: #0a42a6; color: #fff; }

.hoya-finder__filters { display: flex; gap: 10px; }
.hoya-finder__filters select {
	flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--hf-line); border-radius: 12px;
	font-size: 15px; color: var(--hf-ink); background: #fff;
}
/* Hello Elementor paints every <button> pink (#c36) — scoped under .hoya-finder to outrank it.
   The extra :root:root:root copy is for the 0844 chrome's `body button{color:inherit}`, which
   otherwise repaints the blue label with the panel's ink. */
:root:root:root body .hoya-finder__near { color: var(--hf-blue); }
:root:root:root body .hoya-finder__near:hover, :root:root:root body .hoya-finder__near:focus,
:root:root:root body .hoya-finder__near.is-on { color: #fff; }
:root:root:root body .hoya-finder__search button, :root:root:root body .hoya-finder__search button:hover,
:root:root:root body .hoya-finder__search button:focus { color: #fff; }
.hoya-finder .hoya-finder__near {
	height: 46px; padding: 0 18px; border: 2px solid var(--hf-blue); border-radius: 12px; background: #fff;
	color: var(--hf-blue); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.hoya-finder .hoya-finder__near:hover, .hoya-finder .hoya-finder__near:focus, .hoya-finder .hoya-finder__near.is-on {
	background: var(--hf-blue); color: #fff; border-color: var(--hf-blue);
}

.hoya-finder__count { margin: 2px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--hf-muted); }

.hoya-finder__selected {
	background: #f1f6ff; border-left: 4px solid var(--hf-gold); border-radius: 8px; padding: 16px 18px;
	display: flex; flex-direction: column; gap: 4px;
}
.hoya-finder__selected[hidden] { display: none; }
.hoya-finder__selected strong, .hoya-finder__item strong, .hoya-pop strong, .hoya-chosen strong { color: var(--hf-blue, #0c50c8); font-weight: 800; font-size: 16px; line-height: 1.3; }
.hoya-finder__selected span, .hoya-finder__item span, .hoya-pop span, .hoya-chosen span { color: var(--hf-muted, #5b6b86); font-size: 14px; line-height: 1.5; }

.hoya-finder__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 340px; flex: 1; }
.hoya-finder__item {
	display: flex; flex-direction: column; gap: 3px; padding: 14px 14px; border-bottom: 1px solid var(--hf-line);
	cursor: pointer; border-left: 4px solid transparent; margin: 0;
}
.hoya-finder__item:hover, .hoya-finder__item:focus { background: #f7faff; outline: none; }
.hoya-finder__item.is-active { background: #f1f6ff; border-left-color: var(--hf-blue); }
.hoya-finder__item em { font-style: normal; font-weight: 700; font-size: 13px; color: #b77900; }

/* Anchored with :root:root:root, like the 0844 chrome that now loads on this
   page: its `:root:root:root body button{color:inherit}` outranked the blue
   label here, and hello-elementor's own `button{border:1px solid #c36}` then
   showed through as a crimson outline. Same brand blue as "Near me". */
:root:root:root body .hoya-finder__more,
.hoya-finder .hoya-finder__more {
	align-self: flex-start; padding: 12px 20px; border: 2px solid var(--hf-blue); border-radius: 10px; background: #fff;
	color: var(--hf-blue); font-weight: 700; cursor: pointer;
}
:root:root:root body .hoya-finder__more:hover, :root:root:root body .hoya-finder__more:focus,
.hoya-finder .hoya-finder__more:hover, .hoya-finder .hoya-finder__more:focus { background: var(--hf-blue); color: #fff; border-color: var(--hf-blue); }
.hoya-finder__more[hidden] { display: none; }

.hoya-finder .hoya-book-btn {
	align-self: flex-start; margin-top: 10px; padding: 11px 24px; border: 2px solid #0c50c8; border-radius: 12px;
	background: #0c50c8; color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; line-height: 1.2;
}
.hoya-finder .hoya-book-btn:hover, .hoya-finder .hoya-book-btn:focus { background: #0a42a6; color: #fff; border-color: #0a42a6; }
/* Same anchor again: white label on the blue fill, above `body button{color:inherit}`. */
:root:root:root body .hoya-book-btn, :root:root:root body .hoya-book-btn:hover,
:root:root:root body .hoya-book-btn:focus { color: #fff; }

/* --- Map ----------------------------------------------------------------- */
.hoya-finder__map { min-height: 560px; height: 100%; z-index: 0; }
/* Themes set img { max-width:100% } which tears Leaflet tiles apart. */
.hoya-finder__map img { max-width: none !important; max-height: none !important; }
/* "You are here" pin (Near me) */
.hoya-me { background: none; border: 0; }
.hoya-me__pin { position: absolute; left: 0; top: 0; width: 40px; height: 54px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }
.hoya-me__pulse {
	position: absolute; left: 50%; bottom: -12px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%;
	background: rgba(229, 37, 42, .45); animation: hoya-me-pulse 1.8s ease-out infinite;
}
.hoya-me__label {
	position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); white-space: nowrap;
	background: #e5252a; color: #fff; font-weight: 800; font-size: 13px; line-height: 1; padding: 7px 11px;
	border-radius: 999px; box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}
@keyframes hoya-me-pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hoya-me__pulse { animation: none; } }
.hoya-pop { display: flex; flex-direction: column; gap: 4px; min-width: 200px; font-family: inherit; }
.hoya-pop .hoya-book-btn { margin-top: 8px; }
.hoya-finder .leaflet-popup-content { margin: 16px 18px; }

/* --- Branch pins and the counted cluster bubbles ------------------------ */
/* .leaflet-marker-icon is doubled up to beat Leaflet's own divIcon reset. */
.leaflet-marker-icon.hoya-pin { display: grid; place-items: center; background: none; border: 0; }
.hoya-pin span {
	display: block; width: 18px; height: 18px; border-radius: 50%;
	border: 3px solid #fff; background: #0c50c8; box-shadow: 0 1px 4px rgba(11, 37, 89, .45);
}
.leaflet-marker-icon.hoya-cluster {
	display: grid; place-items: center; border-radius: 50%;
	background: rgba(12, 80, 200, .85); border: 3px solid rgba(255, 255, 255, .85);
	color: #fff; font-weight: 800; font-size: 13px; line-height: 1; text-align: center;
}
.hoya-cluster span { display: block; }

/* --- Step 2: "Booking at" bar at the top of the form card ---------------- */
.hoya-chosen { display: none; }
.hpe-book.hoya-step2 .hoya-chosen {
	display: flex; flex-direction: column; gap: 3px; padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid #e4eaf3;
}
.hoya-chosen .hoya-finder__step { color: #0c50c8; margin-bottom: 4px; }
/* Hello Elementor paints every <button> pink (#c36) — hence the doubled class. */
.hoya-chosen .hoya-chosen__change {
	align-self: flex-start; margin-top: 10px; padding: 9px 18px; border: 2px solid #0c50c8; border-radius: 12px;
	background: #fff; color: #0c50c8; font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none;
}
.hoya-chosen .hoya-chosen__change:hover, .hoya-chosen .hoya-chosen__change:focus { background: #0c50c8; color: #fff; border-color: #0c50c8; }

/* --- Small screens: list under the map ---------------------------------- */
@media (max-width: 900px) {
	.hoya-finder { grid-template-columns: 1fr; min-height: 0; }
	.hoya-finder__map { order: -1; min-height: 320px; height: 320px; }
	.hoya-finder__panel { border-right: 0; padding: 18px; }
	.hoya-finder__list { max-height: 300px; }
}
