/**
 * "Where the doctor sees patients" — the clinic address line.
 *
 * Shown in the doctor header (template-parts/doctor/header.php), on the doctor
 * cards of the booking modal (doctor-card.php + booking-modal.js
 * renderDoctorCard), and above the calendar in the final booking step
 * (step-final-booking.php, filled by booking-modal.js updateLocationNote).
 * The address comes from zdraveto_get_doctor_location().
 *
 * Plain CSS (no build step), enqueued from inc/register-scripts.php. Colours
 * follow currentColor so the same markup works on the dark header and the
 * light modal. Tokens: primary #292521, base-dark #6F6963, border #D2CCC5.
 */

.zd-location {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.25rem;
}

.zd-location[hidden] {
	display: none;
}

.zd-location__icon {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
}

.zd-location__label {
	font-weight: 300;
}

.zd-location__address {
	font-weight: 600;
}

/* ---------- Doctor header (dark) ----------
 * A stacked list: one row per clinic — pin, clinic name (semibold), street
 * (light, dimmed). Name and street sit on one line when they fit and the
 * street drops under the name (aligned to the text, not the pin) when not.
 */

.doctor-header__locations {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
	color: var(--wp--preset--color--white);
	font-size: 1rem;
	line-height: 1.5rem;
}

.doctor-header__locations li {
	margin: 0;
	padding: 0;
}

.doctor-header__location-link {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.5rem;
	color: inherit;
	text-decoration: none;
}

.doctor-header__location-icon {
	flex: 0 0 auto;
	width: 1rem;
	height: 1rem;
	margin-top: 0.25rem; /* centre on the first 1.5rem text line */
	opacity: 0.8;
}

.doctor-header__location-text {
	display: flex;
	flex-wrap: wrap;
	column-gap: 0.5rem;
}

.doctor-header__location-name {
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	text-decoration-color: color-mix(in srgb, var(--wp--preset--color--white) 40%, transparent);
	transition: text-decoration-color 0.15s ease;
}

.doctor-header__location-address {
	font-weight: 300;
	opacity: 0.75;
}

.doctor-header__location-link:hover .doctor-header__location-name,
.doctor-header__location-link:focus-visible .doctor-header__location-name {
	text-decoration-color: currentColor;
}

.doctor-header__location-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Several clinics in one line (header, doctor card). */
.zd-location__sep {
	opacity: 0.6;
}

/* ---------- Booking modal ---------- */

.booking-location {
	color: var(--wp--preset--color--primary);
	margin-bottom: 1.5rem;
	padding: 0.75rem 1rem;
	border: 0.0625rem solid var(--wp--preset--color--footer-border-light);
	border-radius: 0.75rem;
	background-color: var(--wp--preset--color--surface-muted);
	font-size: 1rem;
	line-height: 1.5rem;
}

.booking-location[hidden],
.booking-location [hidden] {
	display: none;
}

.booking-location__doctor:not([hidden]) + * {
	margin-top: 0.5rem;
}

.booking-location .zd-location__label {
	color: var(--wp--preset--color--base-dark);
}

/* Doctor in several clinics: pick one (switches the booking calendar). */
.booking-location__question {
	margin: 0 0 0.75rem;
	font-weight: 600;
}

.booking-location__options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.booking-location__pill {
	background-color: var(--wp--preset--color--white);
}

/* Clinic name (semibold, primary) over the street (light, muted) — same
 * hierarchy as the doctor header's address list. */
.booking-location__pill-text {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.booking-location__pill-name {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	line-height: 1.375rem;
}

.booking-location__pill-street {
	font-weight: 300;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--wp--preset--color--base-dark);
}

.booking-doctor-card__location {
	color: var(--wp--preset--color--base-dark);
	margin-top: 0.5rem;
	font-size: 0.8125rem;
}

.booking-doctor-card__location .zd-location__address {
	font-weight: 500;
	color: var(--wp--preset--color--primary);
}

/* 2026-11-22: the pin stays on the address's first line. With the base
 * `flex-wrap: wrap` a long address dropped whole under a lone pin. */
.booking-doctor-card__location.zd-location {
	flex-wrap: nowrap;
	align-items: flex-start;
}

.booking-doctor-card__location .zd-location__icon {
	margin-top: 0.125rem; /* centre on the first 1.25rem text line */
}

.booking-doctor-card__location .zd-location__address {
	flex: 1 1 auto;
	min-width: 0;
}
