/* Therapist list. Wrapper class names match the original so existing Divi
   styling still applies. */

.ml-therapists {
	/* Where the crop is anchored vertically on a headshot. Lower it towards
	   0% if heads are still being clipped, raise it if there is too much
	   space above. Override in Divi's custom CSS — no plugin edit needed:
	   .ml-therapists { --ml-photo-focus: 12%; }  */
	--ml-photo-focus: 20%;
}

.ml-therapists .employee-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 26px;
	align-items: center;
}

.ml-therapists .filter-select {
	padding: 10px 13px;
	border: 1px solid #dfe4e8;
	border-radius: 6px;
	background: #fff;
	font-size: 15px;
	min-width: 180px;
}

.ml-therapists .btn-secondary {
	padding: 10px 18px;
	border: 1px solid #c6ced4;
	border-radius: 6px;
	background: #fff;
	/* Was #6b7883 on white — under 4.5:1, and it showed. */
	color: #46525d;
	font-size: 15px;
	cursor: pointer;
}

.ml-therapists .btn-secondary:hover { border-color: #00a99d; color: #00776f; }

.ml-therapists .employee-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
}

.employee-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #dfe4e8;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, .06);
	transition: transform .25s ease, box-shadow .25s ease;
}

.employee-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, .1);
}

.employee-photo {
	width: 100%;
	/* 4:5 portrait. The old 4:3 landscape box cropped the top and bottom off
	   every headshot, because these photos are portrait. */
	padding-top: 125%;
	background-size: cover;
	/* Not "center". Faces sit in the upper third of a portrait photo, so
	   centring the crop cuts foreheads off. 28% keeps the head in frame and
	   trims the empty space below the shoulders instead. */
	background-position: center var(--ml-photo-focus, 20%);
	background-repeat: no-repeat;
	background-color: #eef1f3;
}

@supports (aspect-ratio: 4 / 5) {
	.employee-photo { padding-top: 0; aspect-ratio: 4 / 5; }
}

.employee-body {
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 18px;
	flex: 1;
}

.employee-name { margin: 0; font-size: 20px; }

.employee-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 14px;
}

.ml-stars { letter-spacing: 1px; }
.ml-star { color: #dfe4e8; }
.ml-star.is-on { color: #f5b301; }

.employee-rating { font-weight: 700; }

.employee-reviews-link {
	border: 0;
	background: none;
	padding: 0;
	color: #00a99d;
	font-size: 14px;
	text-decoration: underline;
	cursor: pointer;
}

.employee-new {
	padding: 3px 10px;
	border-radius: 10px;
	background: #eef7f6;
	color: #00776f;
	font-size: 12px;
	font-weight: 600;
}

.employee-years,
.employee-quals,
.employee-langs {
	margin: 0;
	font-size: 14px;
	color: #46525d;
	line-height: 1.45;
}

.employee-label {
	color: #6b7883;
}

.employee-quals { text-transform: none; }

.employee-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.employee-badge {
	padding: 3px 9px;
	border: 1px solid #dfe4e8;
	border-radius: 10px;
	font-size: 12px;
	color: #6b7883;
}

.employee-price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	margin-top: auto;
	padding-top: 10px;
}

.employee-price-from { font-size: 13px; color: #6b7883; }
.employee-price-value { font-size: 24px; font-weight: 800; color: #1e2a37; }

/* Divi emits ID-scoped rules such as #et_pb_text_0 a { color: … }. An ID
   selector outranks a class, so a bare .employee-book { color: #fff } loses
   and the label ends up the same colour as the button. Matching on the
   wrapper class as well raises specificity above Divi's, and every link
   state is set explicitly — Divi styles :visited and :hover separately. */
.ml-therapists .employee-card .employee-book,
.ml-therapists .employee-card .employee-book:link,
.ml-therapists .employee-card .employee-book:visited,
.ml-therapists .employee-card .employee-book:hover,
.ml-therapists .employee-card .employee-book:focus,
.ml-therapists .employee-card .employee-book:active {
	display: block;
	margin-top: 10px;
	padding: 13px 14px;
	border-radius: 6px;
	background-color: #00a99d;
	/* !important on the colour only. Divi ships link colours via ID-scoped
	   rules and, for some button styles, with !important of its own — which
	   an ordinary class rule cannot beat at any specificity. The label
	   rendering in the same colour as the button is a worse outcome than one
	   deliberate override, so this is the one place it earns its keep. */
	color: #ffffff !important;
	text-align: center;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	border: 0;
	text-shadow: none;
	opacity: 1;
	visibility: visible;
	text-indent: 0;
	min-height: 0;
}

.ml-therapists .employee-card .employee-book:hover { filter: brightness(1.08); }

.ml-therapists .employee-card .employee-book:focus-visible {
	outline: 3px solid #1e2a37;
	outline-offset: 2px;
}

.loading-spinner,
.ml-no-therapists {
	grid-column: 1 / -1;
	padding: 30px;
	text-align: center;
	color: #6b7883;
}

/* Reviews modal */

.reviews-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(30, 42, 55, .6);
	padding: 20px;
}

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

.reviews-modal .modal-content-wrapper {
	position: relative;
	width: 100%;
	max-width: 620px;
	max-height: 80vh;
	overflow-y: auto;
	padding: 28px;
	border-radius: 12px;
	background: #fff;
}

.reviews-modal .modal-close {
	position: absolute;
	top: 12px;
	right: 16px;
	border: 0;
	background: none;
	font-size: 28px;
	line-height: 1;
	color: #6b7883;
	cursor: pointer;
}

.ml-review {
	padding: 14px 0;
	border-bottom: 1px solid #dfe4e8;
}

.ml-review-head {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 6px;
	font-size: 14px;
}

.ml-review-date { color: #6b7883; font-size: 13px; }
.ml-review-text { margin: 0; line-height: 1.55; }

/* Leave-a-review form */

.ml-review-form { max-width: 560px; }
.ml-review-stars { display: flex; gap: 4px; margin-bottom: 18px; }

.ml-review-star {
	border: 0;
	background: none;
	font-size: 34px;
	line-height: 1;
	color: #dfe4e8;
	cursor: pointer;
	padding: 0;
}

.ml-review-star.is-on { color: #f5b301; }

.ml-review-field { display: block; margin-bottom: 16px; }

.ml-review-field > span {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	font-size: 14px;
}

.ml-review-field input,
.ml-review-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #dfe4e8;
	border-radius: 6px;
	font-size: 16px;
	font-family: inherit;
}

.ml-review-submit {
	padding: 12px 26px;
	border: 0;
	border-radius: 6px;
	background: #00a99d;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
}

.ml-review-result { margin-top: 12px; font-size: 14px; }
.ml-review-result.is-ok { color: #1a7f37; font-weight: 600; }
.ml-review-result.is-bad { color: #b32d2e; font-weight: 600; }
.ml-review-notice { padding: 16px; border-left: 3px solid #00a99d; background: #f4fbfa; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.employee-noreviews {
	font-size: 13px;
	color: #6b7883;
}
