/* ED Clinic Finder styles */

.ed-clinic-finder {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: #1a1a1a;
	max-width: 1200px;
	box-sizing: border-box;
}

.ed-clinic-finder *,
.ed-clinic-finder *::before,
.ed-clinic-finder *::after {
	box-sizing: border-box;
}

/* ---- Search bar ---- */

.ecf-search-bar {
	display: flex;
	gap: 16px;
	align-items: flex-end;
	flex-wrap: wrap;
	padding: 20px 24px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	margin-bottom: 20px;
}

.ecf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ecf-field--location { flex: 1; min-width: 200px; }
.ecf-field--distance { min-width: 150px; }
.ecf-field--actions  { flex-shrink: 0; }

.ecf-field label {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	white-space: nowrap;
}

.ecf-field input[type="text"],
.ecf-field select {
	height: 46px;
	padding: 0 16px;
	border: 1px solid #ccc;
	border-radius: 23px;
	font-size: 15px;
	outline: none;
	background: #fff;
	color: #1a1a1a;
	width: 100%;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ecf-field select {
	padding-right: 40px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}

.ecf-field input:focus,
.ecf-field select:focus {
	border-color: #F7941D;
	box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.18);
}

.ecf-buttons {
	display: flex;
	gap: 10px;
	align-items: center;
}

.ecf-btn {
	height: 46px;
	padding: 0 26px;
	border: none;
	border-radius: 23px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s, opacity 0.15s;
	line-height: 1;
}

.ecf-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.ecf-btn--primary {
	background: #F7941D;
	color: #fff;
}

.ecf-btn--primary:hover:not(:disabled) {
	background: #e0831a;
}

.ecf-btn--secondary {
	background: #fff;
	color: #1a1a1a;
	border: 1px solid #ccc;
}

.ecf-btn--secondary:hover:not(:disabled) {
	background: #f5f5f5;
}

/* ---- Filter pills ---- */

.ecf-filters {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.ecf-filters__label {
	font-size: 14px;
	color: #555;
	font-weight: 500;
}

.ecf-filter-btn {
	padding: 7px 20px;
	border: 1px solid #ccc;
	border-radius: 20px;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ecf-filter-btn.is-active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

.ecf-filter-btn:hover:not(.is-active) {
	border-color: #999;
	background: #f5f5f5;
}

/* ---- Notice ---- */

.ecf-notice {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 14px;
}

.ecf-notice--error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.ecf-notice--info {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

/* ---- Two-column body ---- */

.ecf-body {
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 16px;
	align-items: start;
}

/* ---- Results panel ---- */

.ecf-results {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.ecf-results__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid #ebebeb;
	font-size: 15px;
}

.ecf-count {
	font-size: 13px;
	color: #888;
}

.ecf-list {
	max-height: 600px;
	overflow-y: auto;
}

.ecf-empty {
	padding: 28px 16px;
	text-align: center;
	color: #888;
	font-size: 14px;
	margin: 0;
}

/* ---- Clinic card ---- */

.ecf-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #f0f0f0;
	cursor: pointer;
	transition: background 0.12s;
	border-left: 3px solid transparent;
	flex-wrap: wrap;
}

.ecf-card:last-child {
	border-bottom: none;
}

.ecf-card:hover,
.ecf-card.is-active {
	background: #fffbf4;
	border-left-color: #F7941D;
}

.ecf-card__num {
	width: 19px;
	height: 19px;
	min-width: 19px;
	background: #F7941D;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	margin-top: 3px;
	flex-shrink: 0;
}

.ecf-card__wrap {
	display: flex;
  	column-gap: 14px;
	flex-wrap: wrap;
}

.ecf-card__thumb {
	width: 52px;
	height: 52px;
	min-width: 52px;
	border-radius: 8px;
	overflow: hidden;
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ecf-card__photo {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ecf-card__initials {
	font-size: 10px;
	font-weight: 700;
	color: #999;
	text-align: center;
	line-height: 1.2;
	padding: 4px;
	word-break: break-all;
}

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

.ecf-card__title-row {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 5px;
}

.ecf-card__name {
	font-size: 15px;
	font-weight: 700;
	color: #1a1a1a;
}

.ecf-card__dist {
	padding: 2px 8px;
	background: #fff3e0;
	color: #c05c00;
	border: 1px solid #ffd699;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.ecf-badge {
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	border: 1px solid transparent;
	white-space: nowrap;
}

.ecf-badge--aesthetics {
	background: #f0f7ff;
	color: #1a6eb5;
	border-color: #c3ddf8;
}

.ecf-badge--dryeye {
	background: #f0fff8;
	color: #0a7c52;
	border-color: #b3e8d0;
}

.ecf-badge--luminary {
	background: #fffbea;
	color: #7c5a00;
	border-color: #f0d070;
}

.ecf-card__addr {
	font-size: 13px;
	color: #3a6ea5;
	margin-bottom: 6px;
	line-height: 1.5;
}

.ecf-card__links {
	display: flex;
	gap: 14px;
}

.ecf-link {
	font-size: 13px;
	color: #3a6ea5;
	text-decoration: none;
	font-weight: 500;
}

.ecf-link:hover {
	text-decoration: underline;
	color: #F7941D;
}

.ecf-link--cta {
	color: #F7941D;
	font-weight: 600;
}

.ecf-card__toggle {
	cursor: pointer;
}

/* ---- Expanded card details ---- */

.ecf-card__details {
	display: none;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px dashed #ececec;
}

.ecf-card.is-expanded .ecf-card__details {
	display: block;
}

.ecf-card__phone {
	font-size: 13px;
	color: #333;
	margin-bottom: 10px;
}

.ecf-card__phone a {
	color: #333;
	text-decoration: none;
}

.ecf-card__phone a:hover {
	color: #F7941D;
}

.ecf-card__socials {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.ecf-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	color: #555;
	background: #fff;
	text-decoration: none;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ecf-social:hover {
	color: #F7941D;
	border-color: #F7941D;
	background: #fff8ee;
}

/* ---- Map panel ---- */

.ecf-map-wrap {
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	position: sticky;
	top: 20px;
}

.ecf-map-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid #ebebeb;
	font-size: 15px;
}

.ecf-map-hint {
	font-size: 13px;
	color: #3a6ea5;
}

.ecf-map {
	height: 600px;
}

/* ---- Custom map pins ---- */

.ecf-pin {
	width: 32px;
	height: 32px;
	background: #F7941D;
	border-radius: 50%;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s, background 0.15s;
	cursor: pointer;
}

.ecf-pin--active {
	background: #1a1a1a;
	transform: scale(1.25);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

/* ---- Leaflet popup customisation ---- */

.ecf-popup strong {
	display: block;
	font-size: 13px;
	margin-bottom: 3px;
	line-height: 1.2;
}

.ecf-popup__photo {	
	object-fit: cover;
	border-radius: 4px;
	margin-bottom: 0;
	display: block;
	max-height: 60px;
}

.ecf-popup__dist {
	display: inline-block;
	padding: 1px 7px;
	background: #fff3e0;
	color: #c05c00;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	margin-bottom: 6px;
	vertical-align: middle;
}

.ecf-popup__addr {
	font-size: 11px;
	color: #555;
	margin-bottom: 8px;
	line-height: 1.4;
}

.ecf-popup__links {
	display: flex;
	gap: 14px;
}

.ecf-popup__links a {
	font-size: 13px;
	color: #3a6ea5;
	text-decoration: none;
	font-weight: 500;
}

.ecf-popup__links a:hover {
	text-decoration: underline;
}

/* ---- Autocomplete dropdown ---- */

.ecf-ac-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #212121;
	border-radius: 10px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
	z-index: 9999;
	overflow: hidden;
}

.ecf-ac-item {
	padding: 12px 18px;
	color: #f0f0f0;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.1s;
	line-height: 1.4;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ecf-ac-item:last-child {
	border-bottom: none;
}

.ecf-ac-item:hover,
.ecf-ac-item.is-active {
	background: #2e2e2e;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
	.ecf-body {
		grid-template-columns: 1fr;
	}

	.ecf-map-wrap {
		position: static;
		order: -1;
	}

	.ecf-map { height: 380px; }

	.ecf-list { max-height: 480px; }
}

@media (max-width: 600px) {
	.ecf-search-bar {
		flex-direction: column;
		padding: 16px;
	}

	.ecf-field--location,
	.ecf-field--distance,
	.ecf-field--actions { width: 100%; }

	.ecf-buttons {
		flex-direction: column;
	}

	.ecf-btn { width: 100%; }

	.ecf-map { height: 300px; }
}
