/* Clinic Locator - plain hand-written CSS, no preprocessor/build step. */

:root {
	--cliloc-highlight-color: #00a19a;
}

.cliloc-search {
	position: relative;
	margin-bottom: 1.5em;
}

.cliloc-search__field {
	position: relative;
	display: flex;
	gap: 0.5em;
	max-width: 640px;
}

.cliloc-search__field input[type="text"] {
	flex: 1 1 auto;
	padding: 0.65em 0.9em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
}

.cliloc-search__submit {
	flex: 0 0 auto;
	padding: 0.65em 1.4em;
	border: none;
	border-radius: 4px;
	background: #002059;
	color: #fff;
	cursor: pointer;
}

.cliloc-search__autocomplete {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 20;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 4px;
	max-height: 240px;
	overflow-y: auto;
}

.cliloc-search__autocomplete li {
	padding: 0.5em 0.9em;
	cursor: pointer;
}

.cliloc-search__autocomplete li:hover,
.cliloc-search__autocomplete li:focus {
	background: #f2f2f2;
}

.cliloc-search__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.75em;
	align-items: center;
}

.cliloc-pill {
	padding: 0.5em 1em;
	border: 1px solid #ccc;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 0.9rem;
}

.cliloc-pill.is-active {
	background: #002059;
	border-color: #002059;
	color: #fff;
}

.cliloc-filter-count {
	display: inline-block;
	margin-left: 0.4em;
	padding: 0 0.5em;
	border-radius: 999px;
	background: #002059;
	color: #fff;
	font-size: 0.75rem;
}

.cliloc-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cliloc-modal[hidden] {
	display: none;
}

.cliloc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.cliloc-modal__panel {
	position: relative;
	z-index: 1;
	max-width: 480px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 6px;
	padding: 1.5em;
}

.cliloc-modal__close {
	position: absolute;
	top: 0.75em;
	right: 0.75em;
	border: none;
	background: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.cliloc-filter-group {
	border: none;
	padding: 0;
	margin: 0 0 1.25em;
}

.cliloc-filter-group legend {
	font-weight: 600;
	margin-bottom: 0.5em;
}

.cliloc-filter-group label {
	display: block;
	margin-bottom: 0.4em;
}

.cliloc-filters-actions {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin-top: 1em;
}

.cliloc-filters-clear {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 0.6em 1.2em;
	cursor: pointer;
}

.cliloc-filters-apply {
	background: #002059;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 0.6em 1.2em;
	cursor: pointer;
}

.cliloc-results {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1.5em;
	align-items: start;
}

@media (max-width: 782px) {
	.cliloc-results {
		grid-template-columns: 1fr;
	}
}

.cliloc-results__count {
	font-weight: 600;
	margin-bottom: 1em;
}

.cliloc-results__cards {
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.cliloc-results__none {
	padding: 2em;
	text-align: center;
	color: #666;
}

.cliloc-results__map,
#cliloc-map {
	height: 600px;
	width: 100%;
	border-radius: 6px;
}

.cliloc-load-more {
	display: block;
	margin: 1.5em auto 0;
	padding: 0.65em 1.6em;
	border: 1px solid #002059;
	border-radius: 4px;
	background: #fff;
	color: #002059;
	cursor: pointer;
}

.cliloc-card {
	display: flex;
	gap: 1em;
	padding: 1em;
	border: 2px solid #e2e2e2;
	border-radius: 6px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cliloc-card.is-active {
	border-color: var(--cliloc-highlight-color);
	box-shadow: 0 0 0 1px var(--cliloc-highlight-color);
}

.cliloc-card__image {
	flex: 0 0 50%;
	max-width: 50%;
	display: block;
	align-self: stretch;
}

.cliloc-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

.cliloc-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.cliloc-card__title {
	margin: 0 0 0.35em;
	font-size: 1.1rem;
}

.cliloc-icon {
	flex-shrink: 0;
	margin-top: 0.15em;
	color: #777;
}

.cliloc-card__address,
.cliloc-card__phone,
.cliloc-card__hours {
	display: flex;
	align-items: flex-start;
	gap: 0.4em;
	margin: 0 0 0.4em;
	font-size: 0.9rem;
	color: #444;
}

.cliloc-card__distance {
	display: block;
	font-size: 0.85rem;
	color: #777;
}

.cliloc-card__hours.is-open {
	color: #1a7f37;
	font-weight: 600;
}

.cliloc-card__hours.is-open .cliloc-icon {
	color: #1a7f37;
}

.cliloc-card__actions {
	display: flex;
	gap: 0.6em;
	margin-top: 0.75em;
}

.cliloc-card__contact-button,
.cliloc-card__book-button {
	display: inline-block;
	padding: 0.5em 1.1em;
	border-radius: 4px;
	font-size: 0.9rem;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid #002059;
}

.cliloc-card__contact-button {
	background: #002059;
	color: #fff;
}

.cliloc-card__book-button {
	background: #fff;
	color: #002059;
}

.cliloc-map-infowindow {
	max-width: 260px;
	font-size: 0.9rem;
}

.cliloc-map-infowindow__title {
	margin: 0 0 0.4em;
	font-size: 1rem;
}

.cliloc-map-infowindow__title a {
	color: #002059;
}

.cliloc-map-infowindow p {
	display: flex;
	align-items: flex-start;
	gap: 0.35em;
	margin: 0 0 0.35em;
}

.cliloc-map-infowindow .is-open {
	color: #1a7f37;
	font-weight: 600;
}

.cliloc-map-infowindow .is-open .cliloc-icon {
	color: #1a7f37;
}

.cliloc-map-infowindow__actions {
	display: flex;
	gap: 0.5em;
	margin-top: 0.6em;
}

.cliloc-map-infowindow__actions a,
.cliloc-map-infowindow__actions button {
	display: inline-block;
	padding: 0.4em 0.9em;
	border-radius: 4px;
	font-size: 0.85rem;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid #002059;
	background: #002059;
	color: #fff;
}
