/*
 * MembershipWorks embed styling (SOW 1): home-page calendar and Find an Attorney.
 * The same rules are pasted into Customizer > Additional CSS on the live site,
 * which has no file access; keep the two in step until the hosting move.
 *
 * Theme tokens (GeneratePress global colors): --contrast-2 #1f2d3d (navy),
 * --accent #ffaa00 (gold), --accent-2 #406080 (slate blue), --base-2 #f5f8fa.
 */

/* ---- Home page: Event Calendar section ---------------------------------- */

.pba-calendar-section {
	max-width: 1240px;
	margin: 0 auto;
	padding: 70px 20px 80px;
}

.pba-calendar-heading {
	margin: 0 0 30px;
	padding-left: 20px;
	border-left: 2px solid var(--accent);
}

.pba-events-links a {
	font-weight: 600;
}

/* Month bar: title, prev/next, Show (category filter), Subscribe (iCal). */
.pba-home-calendar #SFevtcalnav a,
.pba-home-calendar #SFevtcalnav a:visited {
	color: var(--accent-2);
	font-weight: 600;
}

.pba-home-calendar #SFevtcalnav a:hover,
.pba-home-calendar #SFevtcalnav a:focus-visible {
	color: var(--contrast-2);
}

.pba-home-calendar #SFevtcalmon {
	color: var(--contrast-2);
}

/* Weekday header row. MembershipWorks' own sheet (cdn.membershipworks.com/all.css)
   loads with #SFctr selectors, so these rules need the extra specificity. */
.pba-home-calendar #SFctr .SFevtcal.SFevtcaltop {
	background: var(--contrast-2) !important;
	color: #fff !important;
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Day cells. */
.pba-home-calendar .SFevtcal:not(.SFevtcaltop) {
	min-height: 120px;
}

.pba-home-calendar #SFctr .SFevtcal.SFevtcalout {
	background: var(--base-2) !important;
}

/* Today: MembershipWorks draws the marker as a ::before overlay (black inset). */
.pba-home-calendar #SFctr .SFevtcal.SFevtcaltod::before {
	box-shadow: inset 0 0 0 3px var(--accent) !important;
}

/* Event chips keep MembershipWorks' per-category colours; just tidy shape. */
.pba-home-calendar .SFevtcal a.SFevt {
	border-radius: 4px;
	line-height: 1.3;
}

.pba-home-calendar .SFevtcal a.SFevt:focus-visible,
.pba-home-calendar #SFevtcalnav a:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.pba-calendar-section {
		padding: 50px 15px 60px;
	}

	.pba-home-calendar .SFevtcal:not(.SFevtcaltop) {
		min-height: 70px;
	}
}

/* ---- Find an Attorney (MembershipWorks directory) ------------------------ */
/* The #SFylp* ids exist only in the directory view, so other MembershipWorks embeds are untouched. */

/* Search panel: practice area first, name search second. */
#SFctr #SFylpfnd {
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin-bottom: 0;
	padding: 24px;
	background: var(--base-2);
	border-top: 3px solid var(--accent);
}

#SFctr #SFylpfnd .SFfndopt {
	order: -1;
	margin: 0;
	padding: 12px 20px;
	background: var(--contrast-2) !important;
	border: 0 !important;
	border-radius: 4px;
	color: #fff !important;
	font-size: 16px;
	font-weight: 600;
}

#SFctr #SFylpfnd .SFfndopt:hover,
#SFctr #SFylpfnd .SFfndopt.SFsel {
	background: var(--accent-2) !important;
}

#SFctr #SFylpfnd .SFfndopt i {
	margin-left: 8px;
}

/* Selected practice area(s): MembershipWorks positions this absolutely below the
   button, where it overlaps the name search on mobile. Show it inside the button. */
#SFctr #SFylpfnd .SFfndopt .SFfndtxt {
	position: static !important;
	display: block;
	margin-top: 4px;
	color: var(--accent) !important;
	font-size: 13px;
	font-weight: 600;
	white-space: normal;
	text-align: left;
}

#SFctr #SFylpfnd .SFfndopt .SFfndtxt:empty {
	display: none;
}

#SFctr #SFylpfnd .SFfndtag {
	display: flex;
	width: auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

#SFctr #SFylpfnd .SFfndtag::before {
	content: "or search by name";
	margin-right: 4px;
	color: var(--contrast-3, #555);
	font-size: 14px;
}

#SFctr #SFylpfnd .SFfndtag input[name="tag"] {
	height: 44px;
	padding: 0 12px;
	border: 1px solid rgba(0, 0, 0, 0.25);
	border-radius: 4px;
	font-size: 15px;
}

#SFctr #SFylpfnd .SFfndtag button {
	height: 44px;
	margin: 0;
	padding: 0 18px;
	background: var(--accent-2) !important;
	border-radius: 4px;
	font-weight: 600;
}

#SFctr #SFylpfnd .SFfndtag button:hover {
	background: var(--contrast-2) !important;
}

/* "Clear" appears after a search; keep it a quiet text button so the name box keeps its width. */
#SFctr #SFylpfnd #SFylpclr {
	padding: 0 8px;
	background: transparent !important;
	color: var(--accent-2) !important;
	text-decoration: underline;
}

/* Practice-area picker. */
#SFctr #SFylpqry {
	margin: 0 0 30px;
	padding: 20px 24px 24px;
	background: #fff !important;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-top: 0;
}

#SFctr #SFylpqry .SFinr {
	margin: 0 6px 8px 0;
	padding: 6px 12px;
	background: #fff !important;
	border: 1px solid rgba(64, 96, 128, 0.35) !important;
	border-radius: 999px !important;
	color: var(--contrast-2) !important;
	font-size: 14px;
	cursor: pointer;
}

#SFctr #SFylpqry .SFinr:hover {
	border-color: var(--accent-2) !important;
}

#SFctr #SFylpqry .SFinr[aria-checked="true"] {
	background: var(--contrast-2) !important;
	border-color: var(--contrast-2) !important;
	color: #fff !important;
}

#SFctr #SFylpqry button {
	padding: 10px 20px;
	border-radius: 4px;
	font-weight: 600;
}

/* Results summary line (e.g. the selected practice area). */
#SFctr #SFylptxt {
	margin: 24px 0 12px;
	color: var(--contrast-2);
	font-weight: 600;
}

/* Result cards. */
#SFctr #SFylpcrd {
	margin-top: 24px;
}

#SFctr #SFylpcrd .SFcrd {
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(31, 45, 61, 0.06);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#SFctr #SFylpcrd .SFcrd:hover,
#SFctr #SFylpcrd .SFcrd:focus-visible {
	border-color: var(--accent) !important;
	box-shadow: 0 4px 14px rgba(31, 45, 61, 0.12);
}

#SFctr #SFylpcrd .SFcrdnam {
	color: var(--contrast-2);
	font-weight: 700;
}

#SFctr #SFylpcrd .SFcrdlgo {
	border-radius: 4px;
}

#SFctr #SFylpfnd button:focus-visible,
#SFctr #SFylpqry .SFinr:focus-visible,
#SFctr #SFylpcrd .SFcrd:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

@media (max-width: 768px) {
	#SFctr #SFylpfnd {
		padding: 16px;
	}

	#SFctr #SFylpfnd .SFfndopt,
	#SFctr #SFylpfnd .SFfndtag {
		width: 100%;
	}

	#SFctr #SFylpfnd .SFfndtag::before {
		width: 100%;
	}

	#SFctr #SFylpfnd .SFfndtag input[name="tag"] {
		flex: 1 1 100%;
		width: auto;
		min-width: 0;
	}
}

/* ---- Home page sidebar: Upcoming Events list ([pba_upcoming_events]) ---- */

.pba-upcoming-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pba-upcoming-item + .pba-upcoming-item {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.pba-upcoming-link {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 12px 0;
	color: inherit;
	text-decoration: none;
}

.pba-upcoming-link:hover .pba-upcoming-title,
.pba-upcoming-link:focus-visible .pba-upcoming-title {
	color: var(--accent-2);
	text-decoration: underline;
}

.pba-upcoming-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.pba-upcoming-date {
	flex: 0 0 52px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 6px 0;
	background: var(--contrast-2);
	border-bottom: 3px solid var(--accent);
	border-radius: 4px;
	color: #fff;
	line-height: 1.1;
}

.pba-upcoming-mon {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.pba-upcoming-day {
	font-size: 22px;
	font-weight: 700;
}

.pba-upcoming-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.pba-upcoming-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	color: var(--contrast-2);
	font-weight: 700;
	line-height: 1.3;
}

.pba-upcoming-meta {
	color: var(--contrast-3, #555);
	font-size: 14px;
}

.pba-upcoming-more {
	margin: 12px 0 0;
	font-weight: 600;
}
