/**
 * Physician / Advanced Practice Provider care-team block.
 *
 * A dark header strip above a light table of associated providers, sitting
 * above the collapsible sections on a provider profile.
 *
 * Every colour, radius and breakpoint below is taken from the theme rather
 * than introduced here, so the block ages with the site instead of drifting
 * from it. ihs-barebones-3 defines no CSS custom properties, so the values are
 * repeated as literals with the theme rule they come from noted alongside.
 *
 *   #233a48  dark navy      .menu-header-wid, .sub-menu, #scroll-to-top-link
 *   #238ec2  primary blue   .view-btn, h1 titles
 *   #e58139  orange accent  .view-btn:hover, .more-link
 *   #366583  steel blue     .sow-accordion-open-close-button
 *   #f8fbfd  light panel    .blue-content-row, .location-row, .pe-widget
 *   #eee     hairline       theme borders
 *   #333/#555 body/secondary text
 */

.mdbonedocs-care-team {
	/* 15px echoes .sow-accordion-open-close-button, the block this sits above. */
	margin: 1.75rem 0 2rem;
	border: 1px solid #eee;
	border-radius: 15px;
	overflow: hidden;
	background: #fff;
}

/* Header strip ----------------------------------------------------------- */

.mdbonedocs-care-team__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	padding: 1rem 1.5rem;
	background: #233a48;
}

/*
 * site-custom.css carries `.single-provider .provider-container h2
 * { font-size: 55px }`, which ties a two-class selector on specificity and
 * then wins on source order. Prefixing the page and container classes raises
 * this rule above it without resorting to !important.
 */
.single-provider .provider-container .mdbonedocs-care-team h2.mdbonedocs-care-team__title,
.mdbonedocs-care-team h2.mdbonedocs-care-team__title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
	color: #fff;
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
}

/* The people glyph is decorative, so it is drawn in CSS rather than markup. */
.mdbonedocs-care-team__title::before {
	content: "";
	flex: 0 0 auto;
	width: 1.25rem;
	height: 1.25rem;
	background-color: #e58139;
	-webkit-mask: var(--mdbonedocs-care-team-icon) center / contain no-repeat;
	mask: var(--mdbonedocs-care-team-icon) center / contain no-repeat;
}

.mdbonedocs-care-team {
	--mdbonedocs-care-team-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3zm-8 0c1.66 0 3-1.34 3-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E");
}

.mdbonedocs-care-team__subtitle {
	margin: 0;
	/* Derived from #fff rather than a new grey, so it tracks the header. */
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
	line-height: 1.4;
}

/* Column labels ---------------------------------------------------------- */

.mdbonedocs-care-team__columns,
.mdbonedocs-care-team__row {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 1.5rem;
}

.mdbonedocs-care-team--has-focus .mdbonedocs-care-team__columns,
.mdbonedocs-care-team--has-focus .mdbonedocs-care-team__row {
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

/*
 * An APP profile lists physicians by name and headshot only, with no second
 * data column, so the name takes the free space and the link sits hard right.
 */
.mdbonedocs-care-team--app .mdbonedocs-care-team__columns,
.mdbonedocs-care-team--app .mdbonedocs-care-team__row {
	grid-template-columns: minmax(0, 1fr) auto;
}

.mdbonedocs-care-team__columns {
	background: #f8fbfd;
	border-bottom: 1px solid #eee;
	color: #555;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Rows ------------------------------------------------------------------- */

.mdbonedocs-care-team__rows {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mdbonedocs-care-team__row + .mdbonedocs-care-team__row {
	border-top: 1px solid #eee;
}

.mdbonedocs-care-team__cell {
	min-width: 0;
	color: #333;
}

.mdbonedocs-care-team__cell--provider {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.mdbonedocs-care-team__photo {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
}

.mdbonedocs-care-team__name {
	font-weight: 600;
	line-height: 1.35;
}

.mdbonedocs-care-team__pill {
	display: inline-block;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	/* Tint of the theme's primary blue rather than a new light blue. */
	background: rgba(35, 142, 194, 0.1);
	color: #366583;
	font-size: 0.85rem;
	line-height: 1.3;
}

.mdbonedocs-care-team__subrole {
	display: block;
	margin-top: 0.3rem;
	color: #555;
	font-size: 0.85rem;
	line-height: 1.35;
}

.mdbonedocs-care-team__cell--focus {
	font-size: 0.92rem;
	line-height: 1.4;
}

.mdbonedocs-care-team__cell--action {
	justify-self: end;
}

/* Action ----------------------------------------------------------------- */

/*
 * Matches the theme's .view-btn convention: primary blue, white label, 17px
 * radius, orange on hover. The class itself is not reused because .view-btn
 * carries min-width: 250px, which is far too wide for a table cell.
 */
.mdbonedocs-care-team__button {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	border: 1px solid #238ec2;
	border-radius: 17px;
	background: #238ec2;
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.mdbonedocs-care-team__button:hover,
.mdbonedocs-care-team__button:focus {
	border-color: #e58139;
	background: #e58139;
	color: #fff;
	text-decoration: none;
}

/* Keyboard focus must stay visible against the button fill. */
.mdbonedocs-care-team__button:focus-visible {
	outline: 2px solid #233a48;
	outline-offset: 2px;
}

/* Small screens ---------------------------------------------------------- */

/*
 * 780px is the theme's own mobile boundary, not a new one introduced here.
 * ihs-barebones-3 pairs `max-width: 780px` with `min-width: 781px` throughout,
 * and uses 782px nowhere. Picking 782px (the WordPress admin bar breakpoint)
 * would leave a 781-782px band where this block collapsed to its stacked
 * layout while the surrounding page was still desktop.
 */
@media (max-width: 780px) {
	.mdbonedocs-care-team__columns {
		display: none;
	}

	.mdbonedocs-care-team__row,
	.mdbonedocs-care-team--has-focus .mdbonedocs-care-team__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.6rem;
	}

	.mdbonedocs-care-team__cell--action {
		justify-self: start;
	}

	.mdbonedocs-care-team__header {
		flex-direction: column;
		align-items: flex-start;
	}
}
