/*
Theme Name: Meridian Clinic
Theme URI: https://example.com/meridian-clinic
Template: meridian
Author: Edgewater Medical Centre
Author URI: https://example.com
Description: A ready-to-use template for medical clinics, general practices and allied health. Adds structured opening hours with a live open/closed indicator, a multi-provider online booking panel, practitioner profiles with qualifications and languages, MedicalClinic structured data for search engines, and a one-click setup that builds the whole site. Built as a child of Meridian; no page builder, no jQuery, no CSS framework.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meridian-clinic
Tags: block-patterns, full-site-editing, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, template-editing, translation-ready, wide-blocks, accessibility-ready, one-column, two-columns, right-sidebar

Meridian Clinic is distributed under the terms of the GNU GPL v2 or later.
*/

/*
 * The parent theme's stylesheet is enqueued separately (see inc/assets.php in
 * the parent, and functions.php here). Design tokens live in theme.json.
 * This file carries only clinic-specific rules that theme.json cannot express.
 */

/* -------------------------------------------------------------------------
 * Emergency notice bar
 *
 * Always first in the DOM and never hidden on small screens: if someone is
 * having an emergency, the number to call must not be behind a menu toggle.
 * ---------------------------------------------------------------------- */

.clinic-emergency-bar {
	background-color: var(--wp--preset--color--alert);
	color: #fff;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	padding: 0.6rem var(--wp--preset--spacing--30);
	text-align: center;
}

.clinic-emergency-bar a {
	color: #fff;
	text-underline-offset: 0.2em;
}

/* -------------------------------------------------------------------------
 * Open / closed status
 * ---------------------------------------------------------------------- */

.clinic-status {
	align-items: center;
	display: inline-flex;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	gap: 0.5em;
	line-height: 1.3;
}

.clinic-status__dot {
	border-radius: 50%;
	flex: 0 0 auto;
	height: 0.65em;
	width: 0.65em;
}

.clinic-status--open .clinic-status__dot {
	background-color: var(--wp--preset--color--accent);
}

.clinic-status--closed .clinic-status__dot {
	background-color: var(--wp--preset--color--muted);
}

/*
 * Colour is never the only signal: the label always spells out the state,
 * and the dot is decorative.
 */
.clinic-status__label {
	color: inherit;
}

.clinic-status__next {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

/* -------------------------------------------------------------------------
 * Opening hours table
 * ---------------------------------------------------------------------- */

.clinic-hours {
	border-collapse: collapse;
	width: 100%;
}

.clinic-hours caption {
	caption-side: top;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	padding-bottom: 0.75em;
	text-align: left;
	text-transform: uppercase;
}

.clinic-hours th,
.clinic-hours td {
	border-bottom: 1px solid var(--wp--custom--border-color);
	font-size: var(--wp--preset--font-size--small);
	padding: 0.6em 0;
	text-align: left;
	vertical-align: top;
}

.clinic-hours th {
	font-weight: 500;
	white-space: nowrap;
	width: 45%;
}

.clinic-hours td {
	font-variant-numeric: tabular-nums;
	text-align: right;
}

.clinic-hours tr:last-child th,
.clinic-hours tr:last-child td {
	border-bottom: 0;
}

/* Today's row is bolded and marked up with <mark>, not colour alone. */
.clinic-hours .is-today th,
.clinic-hours .is-today td {
	font-weight: 700;
}

.clinic-hours .is-today mark {
	background: none;
	color: inherit;
}

.clinic-hours__closed {
	color: var(--wp--preset--color--muted);
}

.clinic-hours__note {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	margin-top: 1em;
}

/* -------------------------------------------------------------------------
 * Booking panel
 *
 * The previous site opened a Bootstrap modal containing three iframes that
 * each loaded a third-party booking widget on page load. This is a plain
 * list of links: nothing third-party loads until the patient chooses.
 * ---------------------------------------------------------------------- */

.clinic-booking {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.clinic-booking__provider {
	align-items: center;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--custom--border-color);
	border-radius: var(--wp--custom--border-radius);
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	justify-content: center;
	min-height: 5.5rem;
	padding: var(--wp--preset--spacing--30);
	text-align: center;
	text-decoration: none;
	transition: border-color var(--wp--custom--transition),
		box-shadow var(--wp--custom--transition);
}

.clinic-booking__provider:hover,
.clinic-booking__provider:focus-visible {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--md);
}

.clinic-booking__name {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}

.clinic-booking__hint {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
}

.clinic-booking__apps {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--30);
}

/* -------------------------------------------------------------------------
 * Practitioner profiles
 * ---------------------------------------------------------------------- */

.clinic-practitioner-meta {
	display: grid;
	gap: 0.75em var(--wp--preset--spacing--30);
	grid-template-columns: auto 1fr;
	margin: 0;
}

.clinic-practitioner-meta dt {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.clinic-practitioner-meta dd {
	font-size: var(--wp--preset--font-size--small);
	margin: 0;
}

@media (max-width: 600px) {
	.clinic-practitioner-meta {
		grid-template-columns: 1fr;
		gap: 0.25em;
	}

	.clinic-practitioner-meta dd {
		margin-bottom: 0.75em;
	}
}

/* Billing badge on a service or practitioner. */
.clinic-badge {
	border-radius: 999px;
	display: inline-block;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.25em 0.8em;
}

.clinic-badge--bulk {
	background-color: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--accent);
}

.clinic-badge--private {
	background-color: var(--wp--preset--color--primary-soft);
	color: var(--wp--preset--color--primary);
}

/* -------------------------------------------------------------------------
 * Print: a patient printing the contact page wants hours and address.
 * ---------------------------------------------------------------------- */

@media print {
	.clinic-booking,
	.clinic-emergency-bar {
		display: none !important;
	}

	.clinic-hours {
		page-break-inside: avoid;
	}
}
