/*
 * WP Medical Directory — Single entity styles
 * Hero / tab bar / two-column content+sidebar layout.
 *
 * Ported from v1.5.4 assets/css/single.css for the v2.0 templates.
 *
 * Changes from v1.5.4:
 *   - Google Fonts @import removed; fonts loaded via wp_head action in each
 *     single-wpmd_*.php template instead (avoids render-blocking CSS request).
 *   - .wpmd-hero__credentials added to style credential suffix inline in h1.
 *   - .wpmd-map-embed added to complete the map section styles.
 *   - Scoping is unchanged: all rules live under .wpmd-single-wrap, which is
 *     the outer div in both single-wpmd_provider.php and
 *     single-wpmd_location.php.
 *
 * Enqueue registration (add to Render\Assets::enqueue() after wpmd-frontend):
 *
 *   if ( is_singular( [ PostTypes::PROVIDER, PostTypes::LOCATION, PostTypes::BRAND ] ) ) {
 *       wp_enqueue_style(
 *           'wpmd-single',
 *           $plugin_url . '/assets/css/single.css',
 *           [ 'wpmd-frontend' ],
 *           '2.0.0'
 *       );
 *   }
 *
 * @package WP Medical Directory
 * @since   2.0.0
 */

/* ── Fonts ------------------------------------------------------------------ */
.wpmd-single-wrap {
	font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Wrap & Reset ----------------------------------------------------------- */
.wpmd-single-wrap {
	background: #f5f7fa;
	color: #2a3f52;
	padding-bottom: 64px; /* breathing room before footer */
	margin: 0 auto 30px;
	max-width: 1200px;
}

.wpmd-single-wrap a {
	color: #3a7cc2;
	text-decoration: none;
}

.wpmd-single-wrap a:hover {
	text-decoration: underline;
}

.wpmd-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Breadcrumb ------------------------------------------------------------- */
.wpmd-breadcrumb {
	background: #fff;
	border-bottom: 1px solid #e5eaf0;
	padding: 10px 0;
	font-size: 13px;
	color: #7a8ea0;
}

.wpmd-sep {
	margin: 0 8px;
}

.wpmd-current {
	color: #4a6680;
}

/* ── Hero ------------------------------------------------------------------- */
.wpmd-hero {
	background: linear-gradient(135deg, #1a3c5e 0%, #2a5f8f 60%, #3a7cc2 100%);
	padding: 48px 0 24px;
	position: relative;
}

.wpmd-hero__inner {
	display: flex;
	gap: 32px;
	align-items: flex-start;
	flex-wrap: wrap;
}

/* Provider photo */
.wpmd-hero__photo {
	width: 180px;
	height: 180px;
	border-radius: 16px;
	overflow: hidden;
	border: 4px solid rgba(255,255,255,0.25);
	background: #c2d4e6;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0;
	position: relative;
	box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.wpmd-hero__photo .hero-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Org / location logo */
.wpmd-hero__logo {
	width: 180px;
	height: 180px;
	border-radius: 16px;
	overflow: hidden;
	border: 4px solid rgba(255,255,255,0.25);
	background: #fff;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0;
	position: relative;
	box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.wpmd-hero__logo .wpmd-hero__logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 8px;
}

/* Placeholder — photographic fill, no white padding */
.wpmd-hero__logo--placeholder {
	background: #c2d4e6;
}

.wpmd-hero__logo--placeholder .wpmd-hero__logo-img {
	object-fit: cover;
	padding: 0;
}

.wpmd-hero__info {
	flex: 1;
	padding-bottom: 24px;
	min-width: 280px;
}

.wpmd-hero__org-type {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: rgba(255,255,255,0.6);
	margin-bottom: 6px;
}

.wpmd-hero__name {
	font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 36px;
	font-weight: 700;
	color: #fff;
	line-height: 1.15;
	margin: 0 0 6px;
}

/* Credential suffix appended inline to the h1 */
.wpmd-hero__credentials {
	font-weight: 400;
	font-size: 0.75em;
	color: rgba(255,255,255,0.8);
}

.wpmd-hero__specialty {
	color: rgba(255,255,255,0.8);
	font-size: 17px;
	margin: 0 0 6px;
	font-weight: 500;
}

.wpmd-hero__additional-specs {
	color: rgba(255,255,255,0.55);
	font-size: 14px;
	margin: 0 0 16px;
	font-weight: 400;
	line-height: 1.4;
}

.wpmd-hero__nickname {
	color: rgba(255,255,255,0.65);
	font-size: 15px;
	font-style: italic;
	margin: 0 0 6px;
}

.wpmd-hero__networks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}
.wpmd-hero .wpmd-badge--network-hero {
	font-size: 13px;
	padding: 5px 14px;
	border-radius: 14px;
	background: #fff;
	color: #1e3a5f;
	border: 1px solid rgba(255,255,255,0.9);
	text-decoration: none;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background 0.15s ease;
}
.wpmd-hero .wpmd-badge--network-hero:hover {
	background: #e8eef5;
	color: #1e3a5f;
	text-decoration: none;
}
/* When a custom color is set via inline style, the white fallback
   background/border above are overridden. The font-size and padding
   from this class still apply. */

.wpmd-hero__badges {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

/* Hero contact card */
.wpmd-hero__contact {
	background: rgba(255,255,255,0.1);
	border-radius: 12px 12px 0 0;
	padding: 20px 24px;
	min-width: 240px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,0.15);
	border-bottom: none;
}

.wpmd-hero__phone {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #fff !important;
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 8px;
	text-decoration: none !important;
}

.wpmd-hero__detail {
	display: flex;
	align-items: center;
	gap: 10px;
	color: rgba(255,255,255,0.7);
	font-size: 14px;
	margin-top: 6px;
}

/* Open/closed status */
.wpmd-hours-status {
	cursor: default;
}

.wpmd-status--open {
	color: #81c784 !important;
}

.wpmd-status--closed {
	color: #ef9a9a !important;
}

/* Badges */
/* Badge overrides scoped to .wpmd-single-wrap so card grid badges
 * (styled by frontend.css) are not affected. */
.wpmd-single-wrap .wpmd-badge {
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	line-height: 1;
}

.wpmd-single-wrap .wpmd-badge--accepting {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #c8e6c9;
}

.wpmd-single-wrap .wpmd-badge--pcp {
	background: #e3f2fd;
	color: #1565c0;
	border: 1px solid #bbdefb;
}
/* Ensure PCP badge is visible inside the dark hero */
.wpmd-hero__badges .wpmd-badge.wpmd-badge--pcp {
	background: #e3f2fd;
	color: #1565c0;
	border: 1px solid #bbdefb;
}

.wpmd-single-wrap .wpmd-badge--not {
	background: #fce4ec;
	color: #c62828;
	border: 1px solid #f8bbd0;
}

.wpmd-single-wrap .wpmd-badge--managed {
	background: rgba(255,255,255,0.15);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.25);
}

.wpmd-single-wrap .wpmd-badge--count {
	background: rgba(255,255,255,0.15);
	color: #fff;
	border: 1px solid rgba(255,255,255,0.25);
}

.wpmd-single-wrap .wpmd-badge--sm {
	padding: 4px 10px;
	font-size: 11px;
}

/* Hero badges: suppress frontend.css ::before/::after icon characters */
.wpmd-hero__badges .wpmd-badge::before { content: none; }
.wpmd-hero__badges .wpmd-badge::after  { content: none; }

/* Booking / telehealth CTAs in hero */
.wpmd-hero__book-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	padding: 10px 20px;
	background: rgba(255,255,255,0.15);
	color: #fff !important;
	border: 1px solid rgba(255,255,255,0.3);
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	transition: background 0.15s;
	backdrop-filter: blur(4px);
}

.wpmd-hero__book-btn:hover {
	background: rgba(255,255,255,0.25);
}

.wpmd-hero__telehealth-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	margin-left: 8px;
	padding: 10px 20px;
	background: #5b21b6;
	color: #fff !important;
	border: 1px solid #5b21b6;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none !important;
	transition: background 0.15s;
}

.wpmd-hero__telehealth-btn:hover {
	background: #4c1d95;
}

/* ── Tab bar ---------------------------------------------------------------- */
.wpmd-tabs-bar {
	margin-top: 16px;
}

.wpmd-tabs-nav,
.wpmd-tabs-nav--org {
	display: flex;
	gap: 6px;
}

.wpmd-tab-btn {
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	border-radius: 8px 8px 0 0;
	background: transparent;
	color: rgba(255,255,255,0.7);
	font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	transition: color 0.15s, background 0.15s;
	white-space: nowrap;
	position: relative;
}

/* Separator between adjacent inactive tabs */
.wpmd-tab-btn + .wpmd-tab-btn::before {
	content: '';
	position: absolute;
	left: 0;
	top: 25%;
	height: 50%;
	width: 1px;
	background: rgba(255,255,255,0.25);
}

.wpmd-tab-btn.is-active::before,
.wpmd-tab-btn.is-active + .wpmd-tab-btn::before {
	display: none;
}

.wpmd-tab-btn:not(.is-active):hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

.wpmd-tab-btn.is-active {
	background: #f5f7fa;
	color: #1a3c5e;
}

.wpmd-tab-btn:hover:not(.is-active) {
	color: #fff;
}

/* ── Content layout --------------------------------------------------------- */
.wpmd-content-layout {
	display: flex;
	gap: 28px;
	margin-top: 24px;
	align-items: flex-start;
	flex-wrap: wrap;
	padding-bottom: 48px;
}

.wpmd-main-col {
	flex: 1;
	min-width: 400px;
}

.wpmd-main-col > .wpmd-card {
	position: relative;  /* required: ::after overlay link inside cards needs this anchor */
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Tab panels ------------------------------------------------------------- */
.wpmd-tab-panel {
	display: none;
}

.wpmd-tab-panel.is-active {
	display: block;
}

/* ── Sections inside card --------------------------------------------------- */
.wpmd-section {
	margin-bottom: 32px;
}

.wpmd-section:last-child {
	margin-bottom: 0;
}

.wpmd-section-title {
	font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 20px;
	font-weight: 700;
	color: #1a3c5e;
	margin: 0 0 14px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e0e8f0;
}

.wpmd-subheading {
	font-size: 15px;
	font-weight: 600;
	color: #4a6680;
	margin: 16px 0 10px;
}

.wpmd-bio {
	line-height: 1.75;
	font-size: 15px;
	color: #3a5068;
}

.wpmd-empty-note {
	color: #7a8ea0;
	font-style: italic;
	font-size: 14px;
}

/* Detail rows */
.wpmd-detail-row {
	display: flex;
	gap: 12px;
	margin-bottom: 10px;
	line-height: 1.5;
}

.wpmd-detail-label {
	min-width: 160px;
	font-weight: 600;
	color: #4a6680;
	font-size: 14px;
	flex-shrink: 0;
}

.wpmd-detail-value {
	color: #2a3f52;
	font-size: 14px;
}

/* Location / address card */
.wpmd-addr-block {
	background: #f8fafc;
	border-radius: 10px;
	padding: 20px;
	border: 1px solid #e5eaf0;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.wpmd-addr-block svg {
	margin-top: 2px;
	flex-shrink: 0;
	color: #4a6680;
}

.wpmd-addr-main {
	font-weight: 600;
	font-size: 15px;
}

.wpmd-addr-city {
	color: #5a7a94;
	font-size: 14px;
}

.wpmd-directions {
	color: #3a7cc2;
	font-size: 13px;
	font-weight: 600;
	margin-top: 6px;
	display: inline-block;
}

/* Additional location rows */
.wpmd-add-loc {
	background: #f8fafc;
	border-radius: 10px;
	padding: 16px;
	border: 1px solid #e5eaf0;
	margin-bottom: 8px;
}

.wpmd-add-loc__addr {
	font-weight: 600;
	font-size: 14px;
}

.wpmd-add-loc__city {
	color: #5a7a94;
	font-size: 13px;
}

.wpmd-add-loc__sched {
	color: #7a8ea0;
	font-size: 13px;
	margin-top: 4px;
}

/* Map embed */
/* Map embed: scoped so border:0 doesn't override frontend.css globally */
.wpmd-single-wrap .wpmd-map-embed {
	width: 100%;
	height: 320px;
	border: 0;
	border-radius: 10px;
	display: block;
	margin: 0;       /* reset frontend.css margin since we're on the iframe directly */
	overflow: visible; /* iframe overflow:hidden is meaningless; clear it */
}

/* Lazy-resolved OSM placeholder (div, not iframe). Same outer
   dimensions as the iframe state so the layout doesn't shift
   when JS swaps the placeholder for the iframe. Subtle loading
   shimmer makes it obvious that something's about to render. */
.wpmd-single-wrap .wpmd-map-embed--lazy {
	background:
		linear-gradient(90deg, #f7f8f9 0%, #eef0f2 50%, #f7f8f9 100%);
	background-size: 200% 100%;
	animation: wpmd-map-shimmer 1.4s ease-in-out infinite;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6b7785;
	font-size: 13px;
}
.wpmd-single-wrap .wpmd-map-embed--lazy::before {
	content: 'Loading map…';
}
@keyframes wpmd-map-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
.wpmd-single-wrap .wpmd-map-embed--fallback {
	height: auto;
	background: none;
	animation: none;
	border-radius: 0;
}
.wpmd-single-wrap .wpmd-map-embed--fallback::before {
	content: none;
}

/* Address click-through link — makes the street address clickable
   (opens in maps). Reset link styling to match the surrounding
   plain-text address presentation, but pick up the primary color
   on hover so it's discoverable as a link. */
.wpmd-single-wrap .wpmd-addr-link {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	display: inline-block;
}
.wpmd-single-wrap .wpmd-addr-link:hover,
.wpmd-single-wrap .wpmd-addr-link:focus {
	color: var(--wpmd-color-primary, #2271b1);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Address actions row — sits below the city/state line. Holds
   the "Get Directions" link plus (on Provider pages) the location
   single-page link. */
.wpmd-single-wrap .wpmd-addr-actions {
	margin-top: 8px;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	align-items: center;
}
.wpmd-single-wrap .wpmd-addr-actions .wpmd-directions,
.wpmd-single-wrap .wpmd-addr-actions .wpmd-addr-loc-link {
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: var(--wpmd-color-primary, #2271b1);
}
.wpmd-single-wrap .wpmd-addr-actions a:hover,
.wpmd-single-wrap .wpmd-addr-actions a:focus {
	text-decoration: underline;
}

/* Map fallback CTA when no embed can render */
.wpmd-single-wrap .wpmd-map-fallback {
	margin: 0;
}

/* Additional-location address gets the same click-through treatment
   as the primary address. The schedule link row is shared. */
.wpmd-single-wrap .wpmd-add-loc__addr.wpmd-addr-link {
	font-weight: 600;
}

/* Patient resources (downloadable files / forms) */
.wpmd-patient-resources__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}
.wpmd-patient-resources__item {
	border: 1px solid #e5eaf0;
	border-radius: 8px;
	padding: 12px 14px;
	background: #fff;
	transition: border-color 120ms ease, box-shadow 120ms ease;
}
.wpmd-patient-resources__item:hover {
	border-color: var(--wpmd-color-primary, #2271b1);
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.wpmd-patient-resources__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--wpmd-color-primary, #2271b1);
	font-weight: 600;
	text-decoration: none;
	font-size: 15px;
	line-height: 1.3;
}
.wpmd-patient-resources__link:hover,
.wpmd-patient-resources__link:focus {
	text-decoration: underline;
}
.wpmd-patient-resources__icon {
	color: var(--wpmd-color-primary, #2271b1);
	font-size: 20px;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}
.wpmd-patient-resources__title { word-break: break-word; }
.wpmd-patient-resources__desc {
	margin: 6px 0 0 30px;
	font-size: 13px;
	color: #50606e;
	line-height: 1.4;
}

/* Org / affiliation links */
.wpmd-org-link {
	display: block;
	padding: 12px 16px;
	border-radius: 8px;
	border: 1px solid #e5eaf0;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.15s;
	color: #3a7cc2;
}

.wpmd-org-link:hover {
	background: #f8fafc;
	text-decoration: none;
}

.wpmd-org-link__note {
	color: #7a8ea0;
	font-weight: 400;
}

.wpmd-org-link--secondary {
	display: block;
	margin-top: 8px;
}

.wpmd-detail-year {
	color: #7a8ea0;
	font-size: 13px;
}

/* Specialty / insurance pills */
.wpmd-specialty-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wpmd-pill {
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
	background: #eef3f9;
	color: #2a5f8f;
	border: 1px solid #d0dde8;
}

/* Provider grid (location providers tab) */
.wpmd-provider-grid-sm {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 14px;
}

.wpmd-prov-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px;
	border-radius: 12px;
	border: 1px solid #e5eaf0;
	background: #fff;
	transition: box-shadow 0.15s;
	text-decoration: none !important;
	color: inherit;
}

.wpmd-prov-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.wpmd-prov-avatar {
	width: 48px;
	height: 48px;
	border-radius: 10px;
	background: #eef3f9;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
}

.wpmd-prov-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wpmd-prov-info {
	flex: 1;
	min-width: 0;
}

.wpmd-prov-name {
	font-weight: 600;
	font-size: 14px;
	color: #1a3c5e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wpmd-prov-meta {
	font-size: 13px;
	color: #5a7a94;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Awards list */
.wpmd-awards-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.wpmd-award {
	display: flex;
	flex-direction: column;
	padding: 0.625rem 0.875rem;
	background: #fffbeb;
	border-left: 3px solid #f59e0b;
	border-radius: 0 4px 4px 0;
}

.wpmd-award__title {
	font-weight: 600;
	color: #78350f;
	font-size: 0.9375rem;
}

.wpmd-award__meta {
	font-size: 0.8125rem;
	color: #92400e;
	margin-top: 0.125rem;
}

/* ── Sidebar ---------------------------------------------------------------- */
.wpmd-sidebar {
	width: 300px;
	flex-shrink: 0;
}

.wpmd-sidebar-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
	margin-bottom: 20px;
}

.wpmd-sidebar-card--sm {
	padding: 20px;
}

.wpmd-cta-primary {
	display: block;
	text-align: center;
	padding: 14px 20px;
	border-radius: 10px;
	background: #1a3c5e;
	color: #fff !important;
	font-weight: 700;
	font-size: 16px;
	margin-bottom: 12px;
	text-decoration: none !important;
}

.wpmd-cta-primary:hover {
	background: #15304d;
}

.wpmd-cta-secondary {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border-radius: 10px;
	border: 2px solid #1a3c5e;
	color: #1a3c5e !important;
	font-weight: 600;
	font-size: 14px;
	margin-top: 8px;
	text-decoration: none !important;
}

.wpmd-cta-secondary:hover {
	background: #f0f4f8;
}

.wpmd-sidebar-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: #7a8ea0;
	margin-bottom: 10px;
}

.wpmd-sidebar-link {
	color: #3a7cc2;
	font-weight: 600;
	font-size: 15px;
}

.wpmd-quick-item {
	margin-bottom: 10px;
}

.wpmd-quick-label {
	font-size: 12px;
	color: #7a8ea0;
	font-weight: 600;
}

.wpmd-quick-value {
	font-size: 14px;
	color: #2a3f52;
}

/* Hours table in sidebar and hours tab */
.wpmd-sidebar-hours-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	font-size: 15px;
	font-weight: 700;
	color: #1a3c5e;
}

/* ── Hours table ──────────────────────────────────────────────
   One block, simple rules. Each day row has a <th> (day name)
   + <td> (hours / "Closed"). Browsers render <th> bold by
   default — we don't override that. Today's row is the only
   row-level differentiation: pale-blue background highlight.
   "Closed" cells are red regardless of today/not-today.
   ───────────────────────────────────────────────────────────── */

.wpmd-hours-table {
	width: 100%;
	font-size: 13px;
	border-collapse: collapse;
	background: transparent;
}

/* Override any zebra striping / hover paint the parent theme
   may apply to <table> rows globally. Without this, every
   other day picks up an alternating grey/white background
   from the theme and the table looks inconsistent. */
.wpmd-hours-table tr,
.wpmd-hours-table tr:nth-child(odd),
.wpmd-hours-table tr:nth-child(even),
.wpmd-hours-table tr:hover {
	background: transparent !important;
}

.wpmd-hours-table th {
	text-align: left;
	padding: 6px 8px;
	color: #1a3c5e;
	background: transparent;
	border: 0;
	/* font-weight intentionally not set — let <th> use the
	   browser default (bold) so all day names are bold. */
}
.wpmd-hours-table td {
	text-align: right;
	padding: 6px 8px;
	color: #2a3f52;
	background: transparent;
	border: 0;
}

/* Today's row: pale-blue background pill. The !important is
   load-bearing — it has to win against any theme rule like
   `tr:nth-child(even) { background: #f5f5f5 }` that targets
   the same row by structural position. */
.wpmd-hours-table tr.wpmd-today,
.wpmd-hours-table tr.wpmd-today:nth-child(odd),
.wpmd-hours-table tr.wpmd-today:nth-child(even) {
	background: #f0f6ff !important;
}
.wpmd-hours-table .wpmd-today th { border-radius: 4px 0 0 4px; }
.wpmd-hours-table .wpmd-today td { border-radius: 0 4px 4px 0; }

/* "Closed" cells are red, including on today's row. The
   td.wpmd-closed selector matches the .wpmd-closed-on-today
   case explicitly so today doesn't accidentally win on
   specificity. */
.wpmd-hours-table .wpmd-closed,
.wpmd-hours-table .wpmd-today td.wpmd-closed {
	color: #c62828;
}

/* .wpmd-sr-only defined globally in frontend.css — no duplicate needed */


/* ── Accessibility: focus indicators for single entity pages ──────────────
 * frontend.css scopes these to .wpmd-directory; single pages use
 * .wpmd-single-wrap without that class, so we mirror the rule here.     */
.wpmd-single-wrap :focus-visible,
.wpmd-single-wrap a:focus-visible,
.wpmd-single-wrap button:focus-visible,
.wpmd-single-wrap input:focus-visible,
.wpmd-single-wrap select:focus-visible,
.wpmd-single-wrap textarea:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 2px;
	box-shadow: 0 0 0 5px rgba(37,99,235,0.3);
}
/* ── Responsive — 900px ---------------------------------------------------- */
@media (max-width: 900px) {
	.wpmd-content-layout {
		flex-direction: column;
		align-items: stretch;
		flex-wrap: nowrap;
	}

	.wpmd-main-col {
		min-width: 0;
		width: 100%;
		max-width: 100%;
		order: 1;  /* content below CTAs on mobile */
	}

	.wpmd-sidebar {
		width: 100%;
		max-width: 100%;
		order: 0;  /* Call/Visit/Book CTAs above content on mobile */
	}

	/* Quick Details card is redundant with the hero badges and the
	   At a Glance section in the overview tab. Hide on mobile to
	   avoid repeating the same info twice. */
	.wpmd-sidebar-card--quick-details {
		display: none;
	}

	.wpmd-hero__contact {
		flex-basis: 100%;
		width: 100%;
		min-width: 0;
		border-radius: 12px;
		border-bottom: 1px solid rgba(255,255,255,0.15);
		margin-top: 48px;
	}

	.wpmd-tabs-nav,
	.wpmd-tabs-nav--org {
		padding-left: 0;
		padding-right: 16px;
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
		scrollbar-width: none;
	}

	.wpmd-tabs-nav::-webkit-scrollbar,
	.wpmd-tabs-nav--org::-webkit-scrollbar {
		display: none;
	}

	.wpmd-tab-btn {
		flex-shrink: 0;
	}
}

/* ── Responsive — 760px ---------------------------------------------------- */
@media (max-width: 760px) {
	.wpmd-hero__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.wpmd-hero__photo {
		width: 120px;
		height: 120px;
	}

	.wpmd-hero__logo {
		width: 80px;
		height: 80px;
	}

	.wpmd-hero__name {
		font-size: 26px;
	}

	.wpmd-tabs-nav,
	.wpmd-tabs-nav--org {
		padding-left: 0;
		padding-right: 16px;
		width: 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.wpmd-tabs-nav::-webkit-scrollbar,
	.wpmd-tabs-nav--org::-webkit-scrollbar {
		display: none;
	}

	.wpmd-tab-btn {
		flex-shrink: 0;
	}

	.wpmd-main-col > .wpmd-card {
		padding: 20px;
	}

	.wpmd-detail-row {
		flex-direction: column;
		gap: 2px;
	}

	.wpmd-detail-label {
		min-width: auto;
	}

	.wpmd-provider-grid-sm {
		grid-template-columns: 1fr;
	}

	.wpmd-hero__info {
		min-width: 0;
		width: 100%;
	}

	.wpmd-hero__contact {
		min-width: 0;
		width: 100%;
		border-radius: 12px;
		margin-top: 16px;
	}

	.wpmd-tab-btn {
		padding: 10px 14px;
		font-size: 13px;
	}

	.wpmd-hours-table th,
	.wpmd-hours-table td {
		padding: 8px 10px;
	}

	.wpmd-prov-card {
		flex-wrap: wrap;
	}

	.wpmd-prov-info {
		min-width: 0;
	}

	.wpmd-specialty-pills {
		gap: 6px;
	}

	.wpmd-pill {
		font-size: 12px;
		padding: 6px 12px;
	}

	.wpmd-sidebar-card {
		padding: 18px;
	}

	.wpmd-addr-block {
		padding: 14px;
	}
}

/* ── Responsive — 480px ---------------------------------------------------- */
@media (max-width: 480px) {
	.wpmd-wrap {
		padding: 0 16px;
	}

	.wpmd-hero {
		padding: 24px 0 0;
	}

	.wpmd-hero__photo {
		width: 96px;
		height: 96px;
	}

	.wpmd-hero__logo {
		width: 64px;
		height: 64px;
	}

	.wpmd-hero__name {
		font-size: 22px;
	}

	.wpmd-hero__specialty {
		font-size: 14px;
	}

	.wpmd-hero__phone {
		font-size: 15px;
	}

	.wpmd-tabs-nav,
	.wpmd-tabs-nav--org {
		width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		flex-wrap: nowrap;
		padding-bottom: 2px;
		scrollbar-width: none;
	}

	.wpmd-tabs-nav::-webkit-scrollbar,
	.wpmd-tabs-nav--org::-webkit-scrollbar {
		display: none;
	}

	.wpmd-tab-btn {
		padding: 10px 12px;
		font-size: 12px;
		flex-shrink: 0;
	}

	.wpmd-main-col > .wpmd-card {
		padding: 16px;
		border-radius: 8px;
	}

	.wpmd-section-title {
		font-size: 17px;
	}

	.wpmd-cta-primary,
	.wpmd-cta-secondary {
		font-size: 15px;
		padding: 12px 16px;
	}

	.wpmd-breadcrumb {
		font-size: 12px;
	}

	.wpmd-single-wrap .wpmd-map-embed {
		height: 240px;
	}
}

/* ── Brand locations tab — full-card links ---------------------------------- */
.wpmd-brand-loc-card {
	display: block;
	padding: 18px 20px;
	border-radius: 10px;
	border: 1px solid #e5eaf0;
	background: #f8fafc;
	margin-bottom: 10px;
	text-decoration: none !important;
	color: inherit;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.wpmd-brand-loc-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
	border-color: #c5d5e8;
	text-decoration: none !important;
}

.wpmd-brand-loc-card__name {
	font-weight: 700;
	font-size: 15px;
	color: #1a3c5e;
	margin-bottom: 3px;
}

.wpmd-brand-loc-card:hover .wpmd-brand-loc-card__name {
	color: #3a7cc2;
}

.wpmd-brand-loc-card__type {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: #7a8ea0;
	margin-bottom: 6px;
}

.wpmd-brand-loc-card__addr {
	font-size: 14px;
	color: #2a3f52;
}

.wpmd-brand-loc-card__city {
	font-size: 13px;
	color: #5a7a94;
}

.wpmd-brand-loc-card__phone {
	font-size: 13px;
	color: #3a7cc2;
	margin-top: 6px;
	font-weight: 600;
}

/* ── Get Directions fallback (no embeddable map available) ----------- */
.wpmd-directions-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 24px;
	background: #f8fafc;
	border: 1.5px solid #c5d5e8;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	color: #3a7cc2;
	text-decoration: none !important;
	transition: background 0.15s, border-color 0.15s;
}

.wpmd-directions-cta:hover {
	background: #eef3f9;
	border-color: #3a7cc2;
}

/* ─── Print Stylesheet ──────────────────────────────────────────── */
/* Optimizes single entity pages for printing. Strips chrome (tabs,
   sidebar CTAs, map embeds, appointment forms), linearizes the layout,
   forces black-on-white text, and adds page-break rules so each
   section starts cleanly. */
@media print {
	/* Reset colors to black-on-white */
	*, *::before, *::after {
		color: #000 !important;
		background: #fff !important;
		box-shadow: none !important;
		text-shadow: none !important;
	}

	/* Full-width, no wasted margins */
	body {
		font-size: 12pt;
		line-height: 1.5;
	}
	.wpmd-single-wrap,
	.wpmd-content-layout,
	.wpmd-main-col,
	.wpmd-wrap {
		max-width: 100% !important;
		width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
		display: block !important;
	}

	/* Hero — keep content but strip gradient background */
	.wpmd-hero {
		background: #fff !important;
		padding: 0 0 12pt !important;
		border-bottom: 2pt solid #000;
		margin-bottom: 12pt;
	}
	.wpmd-hero__inner {
		padding: 0 !important;
	}
	.wpmd-hero h1 {
		font-size: 18pt !important;
		color: #000 !important;
	}
	.wpmd-hero__specialty,
	.wpmd-hero__additional-specs,
	.wpmd-hero__nickname {
		color: #333 !important;
	}
	.wpmd-hero__photo,
	.wpmd-hero__logo {
		width: 80px !important;
		height: 80px !important;
	}

	/* Hide interactive/non-printable elements */
	.wpmd-tabs-bar,
	.wpmd-tab-btn,
	.wpmd-hero__contact,
	.wpmd-cta-primary,
	.wpmd-cta-secondary,
	.wpmd-sidebar-card .wpmd-cta-primary,
	.wpmd-sidebar-card .wpmd-cta-secondary,
	.wpmd-map-embed,
	.wpmd-map-embed + *,
	.wpmd-appointment-request,
	.wpmd-load-more-btn,
	.wpmd-directions,
	.wpmd-directions-cta,
	.wpmd-skip-link,
	.wpmd-lateral-module,
	.wpmd-ai-bio-buttons,
	.wpmd-breadcrumb,
	nav,
	footer,
	.site-header,
	.site-footer,
	#wpadminbar {
		display: none !important;
	}

	/* Show ALL tab panels (they're hidden by default except active) */
	.wpmd-tab-panel {
		display: block !important;
		padding: 0 !important;
	}
	.wpmd-tab-panel[hidden] {
		display: block !important;
	}

	/* Sidebar — display inline after main content */
	.wpmd-sidebar {
		float: none !important;
		width: 100% !important;
		margin-top: 12pt;
		page-break-before: auto;
	}
	.wpmd-sidebar-card {
		border: 1pt solid #ccc !important;
		padding: 8pt !important;
		margin-bottom: 8pt;
	}

	/* Cards */
	.wpmd-card {
		border: 1pt solid #ccc !important;
		box-shadow: none !important;
		page-break-inside: avoid;
	}

	/* Section breaks */
	.wpmd-section {
		page-break-inside: avoid;
		margin-bottom: 12pt;
	}
	.wpmd-section-title {
		font-size: 14pt;
		border-bottom: 1pt solid #999;
		padding-bottom: 4pt;
		margin-bottom: 8pt;
	}

	/* Detail rows */
	.wpmd-detail-row {
		border-bottom-color: #ddd !important;
	}

	/* Links — show URL for external links */
	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
		color: #666 !important;
		word-break: break-all;
	}
	/* Don't show URLs for internal nav links */
	a[href^="#"]::after,
	a[href^="tel:"]::after,
	.wpmd-breadcrumb a::after,
	.wpmd-hero a::after,
	nav a::after {
		content: none !important;
	}

	/* Provider mini-cards */
	.wpmd-prov-card {
		page-break-inside: avoid;
		border: 1pt solid #ddd !important;
	}
	.wpmd-provider-grid-sm {
		display: block !important;
	}

	/* Badges — print as text labels */
	.wpmd-badge--accepting,
	.wpmd-badge--not-accepting,
	.wpmd-badge--managed,
	.wpmd-badge--count {
		border: 1pt solid #999 !important;
		padding: 2pt 6pt !important;
	}

	/* Hero badges */
	.wpmd-hero__badges .wpmd-badge--accepting {
		border: 1pt solid #000 !important;
	}

	/* Images — reasonable size */
	img {
		max-width: 200px !important;
		height: auto !important;
	}
	.hero-photo-img {
		max-width: 100px !important;
	}
}


/* ── Patient Reviews ────────────────────────────────────────────── */
.wpmd-reviews-section { margin-top: 32px; }
.wpmd-reviews-summary { display: flex; align-items: center; gap: 10px; margin: 12px 0 20px; }
.wpmd-reviews-avg { font-size: 28px; font-weight: 700; color: #1e293b; }
.wpmd-reviews-count { font-size: 14px; color: #6b7280; }
.wpmd-reviews-list { list-style: none; padding: 0; margin: 0; }
.wpmd-review-item { padding: 16px 0; border-bottom: 1px solid #e5e7eb; }
.wpmd-review-item:last-child { border-bottom: none; }
.wpmd-review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.wpmd-review-author { font-weight: 600; color: #1e293b; }
.wpmd-review-date { font-size: 13px; color: #9ca3af; }
.wpmd-review-body { font-size: 15px; line-height: 1.6; color: #374151; }

/* Review form */
.wpmd-review-form-wrap { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e5e7eb; }
.wpmd-review-form { max-width: 500px; }
.wpmd-review-field { margin-bottom: 16px; }
.wpmd-review-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; color: #374151; }
.wpmd-review-input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 15px; font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; }
.wpmd-review-input:focus { outline: 2px solid var(--wpmd-accent, #2271b1); outline-offset: 1px; border-color: transparent; }
.wpmd-review-hint { font-size: 12px; color: #9ca3af; margin-top: 2px; display: block; }

/* Star input */
.wpmd-review-stars { margin-bottom: 16px; }
.wpmd-review-stars__label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #374151; }
.wpmd-review-stars__input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.wpmd-star-radio { display: none; }
.wpmd-star-label { cursor: pointer; color: #d1d5db; transition: color 0.1s; }
.wpmd-star-radio:checked ~ .wpmd-star-label { color: #f59e0b; }
.wpmd-star-label:hover, .wpmd-star-label:hover ~ .wpmd-star-label { color: #f59e0b; }

.wpmd-review-submit {
    background: var(--wpmd-accent, #2271b1); color: #fff; border: none;
    padding: 12px 28px; border-radius: 6px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: opacity 0.15s;
}
.wpmd-review-submit:hover { opacity: 0.9; }
.wpmd-review-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.wpmd-review-message { padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-top: 12px; }
.wpmd-review-message--success { background: #ecfdf5; border: 1px solid #10b981; color: #065f46; }
.wpmd-review-message--error { background: #fef2f2; border: 1px solid #ef4444; color: #991b1b; }

/* ── Personal Statement ─────────────────────────────────────────── */
.wpmd-personal-statement {
    margin: 0;
    padding: 16px 24px;
    border-left: 4px solid var(--wpmd-accent, #2271b1);
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
}
.wpmd-personal-statement p { margin: 0 0 8px; }
.wpmd-personal-statement p:last-child { margin-bottom: 0; }

/* ── Video Embed ────────────────────────────────────────────────── */
.wpmd-video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.wpmd-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* ── Photo Gallery ──────────────────────────────────────────────── */
.wpmd-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.wpmd-photo-gallery__item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.wpmd-photo-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.wpmd-photo-gallery__item:hover .wpmd-photo-gallery__img {
    transform: scale(1.03);
}
@media (max-width: 600px) {
    .wpmd-photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
