/*!
 * Amelia Nearby Locations - front-end widget styles.
 * Intentionally light so it inherits the active theme.
 */

.anl-anchor {
	display: none;
}

.anl-filter {
	box-sizing: border-box;
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
}

.anl-filter *,
.anl-filter *::before,
.anl-filter *::after {
	box-sizing: inherit;
}

.anl-label {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
}

.anl-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.anl-fields input.anl-input {
	flex: 1 1 12rem;
	min-width: 0;
	margin: 0;
	padding: 0.5rem 0.65rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font-size: inherit;
	line-height: 1.4;
}

.anl-fields select.anl-radius,
.anl-fields select.anl-gear,
.anl-fields button {
	margin: 0;
	padding: 0.5rem 0.7rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font-size: inherit;
	line-height: 1.4;
	cursor: pointer;
}

/*
 * Many themes set `select, button { width: 100% }`, which stretches the radius dropdown across
 * the row and pushes Clear onto its own line. `width: auto` restores content sizing; the mobile
 * breakpoint below still stacks full width via flex-basis.
 */
.anl-filter .anl-fields select.anl-radius,
.anl-filter .anl-fields select.anl-gear,
.anl-filter .anl-fields button,
.anl-filter .anl-book-btn {
	width: auto !important;
	max-width: 100%;
}

.anl-fields button.anl-geo,
.anl-fields button.anl-clear {
	white-space: nowrap;
}

.anl-fields button:disabled {
	opacity: 0.6;
	cursor: default;
}

.anl-fields input.anl-input:focus,
.anl-fields select.anl-radius:focus,
.anl-fields select.anl-gear:focus,
.anl-fields button:focus {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.anl-status {
	margin: 0.6rem 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	opacity: 0.85;
}

.anl-status:empty {
	display: none;
}

.anl-filter.anl-is-active {
	border-color: currentColor;
	border-color: color-mix(in srgb, currentColor 45%, transparent);
}

.anl-filter.anl-is-active .anl-status {
	font-weight: 600;
	opacity: 1;
}

.anl-fields button.anl-clear {
	border-style: dashed;
}

@media (max-width: 480px) {
	.anl-fields input.anl-input,
	.anl-fields select.anl-radius,
	.anl-fields select.anl-gear,
	.anl-fields button {
		flex: 1 1 100%;
	}
}

/* ---------------------------------------------------------------------------
 * Standalone directory: employee cards, courses and booking triggers
 * ------------------------------------------------------------------------ */

/* Pre-rendered triggers + Amelia dialogs must stay in the DOM, just not visible. */
.anl-booking-bank {
	display: none !important;
}

.anl-cards {
	display: grid;
	gap: 1.25rem;
	margin: 1.25rem 0 0;
	grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
}

.anl-card {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1.1rem;
	margin: 0;
	padding: 1.1rem;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px -18px rgba(15, 23, 42, 0.35);
	text-align: left;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.anl-card:hover {
	box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08), 0 18px 36px -20px rgba(15, 23, 42, 0.45);
	transform: translateY(-1px);
}

.anl-card-photo {
	flex: 0 0 auto;
	width: 8rem;
	max-width: 100%;
}

.anl-card-photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center top;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.05);
}

.anl-card-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.08);
	font-size: 2rem;
	font-weight: 600;
	letter-spacing: 0.05em;
}

.anl-card-body {
	flex: 1 1 14rem;
	min-width: 0;
}

.anl-card-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0;
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
	line-height: 1.25;
}

/*
 * Themes routinely override heading display/margin rules, which made the badge collide with the
 * name. Scoped to .anl-filter so nothing else on the site is affected.
 */
.anl-filter .anl-card-name {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	/* The space between name and badge is a margin on .anl-name, not a flex gap - see below. */
	gap: 0 !important;
	margin: 0 0 0.35rem !important;
	padding: 0 !important;
}

/*
 * The gap between the name and the badge is a margin on the name rather than a flex `gap`: a
 * margin still applies when a theme forces the heading back to `display: block`, where `gap` has
 * no effect and the badge would end up sitting on top of the name.
 */
.anl-name {
	display: inline-block;
	margin: 0 0.5rem 0 0;
	vertical-align: middle;
}

.anl-filter .anl-card-name .anl-name {
	display: inline-block !important;
	margin: 0 0.5rem 0 0 !important;
	padding: 0 !important;
	vertical-align: middle !important;
	position: static !important;
	white-space: normal !important;
}

/* Badge: plain white text on the Amelia badge colour, fully rounded corners. */
.anl-badge {
	display: inline-block;
	flex: 0 0 auto;
	margin: 0;
	padding: 0.2rem 0.6rem;
	border: 0;
	border-radius: 999px;
	background: #2563eb;
	color: #ffffff;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
	white-space: nowrap;
}

/*
 * Post-content themes win over a single class with rules like `.entry-content h3 span`, so every
 * property that makes the badge a badge is pinned here. The front-end script sets the same
 * properties as inline `!important` declarations for the cases this still cannot reach.
 */
.anl-filter .anl-card-name .anl-badge,
.anl-filter .anl-card .anl-badge {
	display: inline-block !important;
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 0.2rem 0.6rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #ffffff !important;
	font-size: 0.8125rem !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	white-space: nowrap !important;
	position: static !important;
	float: none !important;
	box-shadow: none !important;
}

.anl-card-meta {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #475569;
	opacity: 1;
}

/* Manual / automatic / both, as a chip under the distance. */
.anl-card-gear {
	display: inline-block;
	margin: 0 0 0.6rem;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.1);
	color: #1d4ed8;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.01em;
}

/* "A little about you" - the employee's Description in Amelia - beside the photo. */
.anl-card-bio {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #334155;
	text-align: left;
	overflow-wrap: break-word;
}

/*
 * A long introduction is clipped to a few lines so every card in a row is the same height,
 * with the rest behind the "Read more" button the script adds. The script only clips when the
 * text really does overflow, and only adds the button when it has.
 *
 * `--anl-bio-lines` is set by the script from the plugin settings, so the number of lines
 * shown is a setting rather than a stylesheet edit.
 */
.anl-card-bio.anl-bio-clamped {
	display: -webkit-box;
	overflow: hidden;
	margin-bottom: 0.15rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--anl-bio-lines, 3);
	line-clamp: var(--anl-bio-lines, 3);
}

/* Opened again by the button. */
.anl-card-bio.anl-bio-open {
	display: block;
	overflow: visible;
	-webkit-line-clamp: unset;
	line-clamp: unset;
}

/* Stands in for an introduction withheld for review, so the card keeps its shape. */
.anl-card-bio-flagged {
	padding-left: 0.6rem;
	border-left: 3px solid rgba(180, 83, 9, 0.35);
	font-style: italic;
	color: #64748b;
}

.anl-bio-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.75rem;
	padding: 0.1rem 0;
	border: 0;
	background: none;
	color: #1d4ed8;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

/* The little arrow: a triangle that turns over when the introduction is opened. */
.anl-bio-toggle::after {
	content: '';
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.15s ease;
}

.anl-bio-toggle[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

/*
 * Result pages. Buttons, not links: paging has to work in place, on whatever page the search
 * box happens to be on, without a reload or a change to the address bar.
 */
.anl-signup-wrap .anl-check-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
	gap: 0.25rem 0.75rem;
	margin: 0 0 0.35rem;
}

.anl-signup-wrap .anl-check-grid .anl-check {
	margin: 0;
}

.anl-pager-host {
	margin: 0;
	padding: 0;
}

.anl-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin: 1.25rem 0 0;
}

.anl-page {
	margin: 0;
	padding: 0.35rem 0.7rem;
	border: 1px solid rgba(15, 23, 42, 0.15);
	border-radius: 8px;
	background: #fff;
	color: inherit;
	font-size: 0.875rem;
	line-height: 1.4;
	cursor: pointer;
}

.anl-page:hover:not([disabled]) {
	border-color: rgba(37, 99, 235, 0.5);
	color: #1d4ed8;
}

.anl-page[disabled] {
	opacity: 0.45;
	cursor: default;
}

.anl-page-current {
	border-color: transparent;
	background: #2563eb;
	color: #fff;
	font-weight: 600;
}

.anl-page-current:hover:not([disabled]) {
	color: #fff;
}

.anl-page-range {
	margin-left: 0.4rem;
	font-size: 0.8125rem;
	color: #475569;
}

.anl-courses-toggle {
	margin: 0;
	padding: 0.45rem 0.9rem;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font-size: 0.9375rem;
	line-height: 1.3;
	cursor: pointer;
}

.anl-courses {
	margin: 0.85rem 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.anl-course {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 0.6rem;
	row-gap: 0.5rem;
	/* Roomy rows: the Book now buttons sit in a column and must not look like one block. */
	padding: 0.8rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

/*
 * One course row per service, so several Book now buttons end up stacked directly above each
 * other. The vertical margin keeps them apart even when a theme tightens button padding; the
 * front-end script pins the same values inline, because a theme rule on `button` wins over this.
 */
.anl-courses .anl-book-btn,
.anl-filter .anl-courses .anl-book-btn {
	margin: 0.2rem 0 !important;
	padding: 0.45rem 0.9rem !important;
	line-height: 1.35 !important;
}

.anl-course-name {
	flex: 1 1 8rem;
	min-width: 0;
	font-weight: 500;
}

.anl-course-price {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
	opacity: 0.85;
}

.anl-book-btn,
.anl-courses .anl-book-btn {
	flex: 0 0 auto;
	align-self: center;
	min-height: 0;
	margin: 0;
	padding: 0.4rem 0.85rem;
	border: 0;
	border-radius: 4px;
	background: #2563eb;
	color: #fff;
	font-size: 0.875rem;
	line-height: 1.3;
	cursor: pointer;
}

.anl-book-btn:hover,
.anl-book-btn:focus {
	background: #1d4ed8;
}

.anl-empty {
	margin: 1rem 0 0;
	font-size: 0.9375rem;
	opacity: 0.8;
}

@media (max-width: 640px) {
	.anl-cards {
		grid-template-columns: 1fr;
	}

	/*
	 * The photo stays beside the details on a phone, just smaller: a full-width portrait pushes
	 * the name, the distance and the courses below the fold for no good reason.
	 */
	.anl-card {
		padding: 0.9rem;
		gap: 0.85rem;
	}

	.anl-card-photo {
		width: 5.5rem;
	}

	.anl-card-name {
		font-size: 1.1rem;
	}
}

/*!
 * Instructor application form.
 *
 * Rendered wherever [amelia_nearby_instructor_signup] is placed, so it has to survive a block
 * theme, a page builder and a theme that styles every `input` on the site: no layout
 * assumptions, no fixed widths, and every control sized explicitly.
 */

.anl-signup-wrap {
	box-sizing: border-box;
	max-width: 42rem;
	margin: 0 0 1.5rem;
}

.anl-signup-wrap *,
.anl-signup-wrap *::before,
.anl-signup-wrap *::after {
	box-sizing: inherit;
}

.anl-signup-title {
	margin: 0 0 0.5rem;
}

.anl-signup-intro,
.anl-signup-help {
	margin: 0 0 1rem;
	opacity: 0.85;
}

.anl-signup-grid {
	display: grid;
	gap: 0.9rem;
}

.anl-field {
	margin: 0;
}

.anl-field > label {
	display: block;
	margin: 0 0 0.3rem;
	font-weight: 600;
}

.anl-req {
	opacity: 0.6;
}

.anl-signup input[type="text"],
.anl-signup input[type="email"],
.anl-signup input[type="tel"],
.anl-signup input[type="date"],
.anl-signup select,
.anl-signup textarea {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0.55rem 0.65rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.4;
}

.anl-input-row,
.anl-code-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.anl-input-row input {
	flex: 1 1 12rem;
	min-width: 0;
}

.anl-code-row {
	margin-top: 0.5rem;
}

.anl-code-row[hidden] {
	display: none;
}

.anl-code-label {
	flex: 1 1 100%;
	font-weight: 600;
}

.anl-code-input {
	flex: 0 1 9rem;
	font-size: 1.05rem;
	letter-spacing: 0.25em;
}

.anl-signup button {
	margin: 0;
	padding: 0.55rem 0.9rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	background: #f6f7f7;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.anl-signup button:disabled {
	opacity: 0.55;
	cursor: default;
}

.anl-verify-state {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.85rem;
}

.anl-verify-state.anl-ok {
	color: #0a7d28;
	font-weight: 600;
}

.anl-verify-state.anl-bad,
.anl-signup-status.anl-bad {
	color: #b32d2e;
}

.anl-hint {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.82rem;
	opacity: 0.75;
}

.anl-check {
	display: flex;
	gap: 0.45rem;
	align-items: flex-start;
	font-weight: 400;
}

.anl-check input {
	margin: 0.25rem 0 0;
}

.anl-field-set {
	margin: 0;
	padding: 0.75rem 0.9rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
}

.anl-field-set legend {
	padding: 0 0.4rem;
	font-weight: 600;
}

.anl-field-set .anl-check {
	display: inline-flex;
	margin: 0 1rem 0.35rem 0;
}

.anl-signup-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin: 1.25rem 0 0;
}

.anl-signup-submit {
	padding: 0.65rem 1.25rem !important;
	border-color: #1d4ed8 !important;
	background: #1d4ed8 !important;
	color: #fff !important;
	font-weight: 600 !important;
}

.anl-signup-submit:hover,
.anl-signup-submit:focus {
	background: #1a45bd !important;
}

.anl-signup-status {
	margin: 0.85rem 0 0;
	font-size: 0.95rem;
}

.anl-signup-status:empty {
	display: none;
}

.anl-signup-status.anl-ok {
	color: #0a7d28;
	font-weight: 600;
}

/* Once the application has gone, only the thank-you is left. */
.anl-signup-done .anl-signup-grid,
.anl-signup-done .anl-signup-actions,
.anl-signup-done .anl-signup-help,
.anl-signup-done .anl-honeypot {
	display: none;
}

/* Off-screen rather than hidden: bots fill in what they can still read. */
.anl-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.anl-signup-noscript {
	margin: 0.75rem 0 0;
	font-size: 0.9rem;
}

/* File inputs: a theme's `input` rules regularly break these, so they are sized here. */
.anl-field-file input[type="file"] {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0.45rem;
	border: 1px dashed rgba(0, 0, 0, 0.35);
	border-radius: 4px;
	background: #fbfbfc;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.anl-file-state {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.85rem;
	word-break: break-word;
}

.anl-file-state.anl-ok {
	color: #0a7d28;
}

.anl-file-state.anl-bad {
	color: #b32d2e;
	font-weight: 600;
}

@media (min-width: 560px) {
	.anl-signup-grid {
		grid-template-columns: 1fr 1fr;
	}

	.anl-field-wide {
		grid-column: 1 / -1;
	}
}

