/**
 * 220 Listings — Shared Stylesheet
 *
 * Always loaded by AssetLoader::maybe_enqueue_assets() on any page that
 * surfaces plugin content. Owns the rules that 2 or more listing-type
 * stylesheets depend on, so they only live in one canonical place.
 *
 * Contents:
 *   1. Reset & box-sizing (scoped to plugin roots)
 *   2. Buttons (.twotwenty-btn family)
 *   3. Contact links (phone, email)
 *   4. Social icons
 *   5. Pagination + no-results
 *   6. Accessibility helpers
 *   7. Beaver Builder defensive rules
 *
 * Rule for additions: only add a rule here if it's used by 2+ listing
 * types. Single-listing-type rules belong in the listing-type stylesheet.
 *
 * @package TwoTwenty\Listings
 */

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

.twotwenty-staff-list,
.twotwenty-single-profile,
.twotwenty-reco-pro-list,
.twotwenty-rp-single,
.twotwenty-rp-accordion,
.twotwenty-rp-search-hero,
.twotwenty-lr-list,
.twotwenty-lr-archive,
.twotwenty-lr-accordion,
.twotwenty-re-list,
.twotwenty-re-grouped,
.twotwenty-re-single {
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.6;
	color: var(--220-color-secondary, #333333);
}

.twotwenty-staff-list *,
.twotwenty-single-profile *,
.twotwenty-reco-pro-list *,
.twotwenty-rp-single *,
.twotwenty-rp-accordion *,
.twotwenty-rp-search-hero *,
.twotwenty-lr-list *,
.twotwenty-lr-archive *,
.twotwenty-lr-accordion *,
.twotwenty-re-list *,
.twotwenty-re-grouped *,
.twotwenty-re-single *,
.twotwenty-staff-list *::before,
.twotwenty-single-profile *::before,
.twotwenty-reco-pro-list *::before,
.twotwenty-rp-single *::before,
.twotwenty-rp-accordion *::before,
.twotwenty-rp-search-hero *::before,
.twotwenty-lr-list *::before,
.twotwenty-lr-archive *::before,
.twotwenty-lr-accordion *::before,
.twotwenty-re-list *::before,
.twotwenty-re-grouped *::before,
.twotwenty-re-single *::before,
.twotwenty-staff-list *::after,
.twotwenty-single-profile *::after,
.twotwenty-reco-pro-list *::after,
.twotwenty-rp-single *::after,
.twotwenty-rp-accordion *::after,
.twotwenty-rp-search-hero *::after,
.twotwenty-lr-list *::after,
.twotwenty-lr-archive *::after,
.twotwenty-lr-accordion *::after,
.twotwenty-re-list *::after,
.twotwenty-re-grouped *::after,
.twotwenty-re-single *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   2. Buttons
   ========================================================================== */

.twotwenty-btn {
	display: inline-block;
	padding: 9px 20px;
	font-size: 0.85em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	border: 1.5px solid transparent;
	border-radius: var(--220-radius, 6px);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
	line-height: 1.4;
}

.twotwenty-btn:focus-visible {
	outline: 2px solid var(--220-color-primary, #2D5F8A);
	outline-offset: 2px;
}

.twotwenty-btn-primary {
	background-color: var(--220-color-primary, #2D5F8A);
	border-color: var(--220-color-primary, #2D5F8A);
	color: #ffffff;
}

.twotwenty-btn-primary:hover {
	background-color: color-mix(in srgb, var(--220-color-primary, #2D5F8A) 83%, black);
	border-color: color-mix(in srgb, var(--220-color-primary, #2D5F8A) 83%, black);
	color: #ffffff;
}

.twotwenty-btn-primary:active {
	transform: translateY(1px);
}

.twotwenty-btn-block {
	display: block;
	width: 100%;
}

/* ==========================================================================
   3. Phone / Email Links
   ========================================================================== */

.twotwenty-phone-link,
.twotwenty-email-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--220-color-primary, #2D5F8A);
	text-decoration: none;
	transition: color 0.2s ease;
	overflow-wrap: break-word;
	word-break: break-all;  /* handles long email addresses in narrow sidebars */
	min-width: 0;           /* allows flex children to shrink below content size */
}

.twotwenty-phone-link:hover,
.twotwenty-email-link:hover {
	color: var(--220-color-accent, #c9972b);
	text-decoration: underline;
}

.twotwenty-phone-link svg,
.twotwenty-email-link svg {
	flex-shrink: 0;
}

/* ==========================================================================
   4. Social Icons
   ========================================================================== */

.twotwenty-social-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.twotwenty-social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 7px;
	background: var(--220-color-bg-light, #f0f4ff);
	color: var(--220-color-secondary, #333333);
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.twotwenty-social-icon:hover {
	background: var(--220-color-primary, #2D5F8A);
	color: #ffffff;
	transform: translateY(-2px);
}

.twotwenty-social-icon:focus-visible {
	outline: 2px solid var(--220-color-primary, #2D5F8A);
	outline-offset: 2px;
}

.twotwenty-social-icon svg {
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   5. Pagination + No Results
   ========================================================================== */

.twotwenty-pagination {
	margin: 32px 0;
	text-align: center;
}

.twotwenty-pagination ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: center;
	gap: 4px;
	flex-wrap: wrap;
}

.twotwenty-pagination li {
	margin: 0;
}

.twotwenty-pagination a,
.twotwenty-pagination span {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--220-color-border, #DDDDDD);
	border-radius: var(--220-radius, 6px);
	text-decoration: none;
	color: var(--220-color-primary, #2D5F8A);
	font-size: 0.9em;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.twotwenty-pagination a:hover {
	background-color: var(--220-color-primary, #2D5F8A);
	color: #ffffff;
	border-color: var(--220-color-primary, #2D5F8A);
}

.twotwenty-pagination .current {
	background-color: var(--220-color-primary, #2D5F8A);
	color: #ffffff;
	border-color: var(--220-color-primary, #2D5F8A);
}

/* No results */
.twotwenty-no-results {
	text-align: center;
	padding: 40px 20px;
	color: #777;
	font-size: 1em;
}

/* ==========================================================================
   6. Accessibility
   ========================================================================== */

.twotwenty-phone-link:focus-visible,
.twotwenty-email-link:focus-visible,
.twotwenty-contact-val:focus-visible {
	outline: 2px solid var(--220-color-primary, #2D5F8A);
	outline-offset: 2px;
	border-radius: 2px;
}

.twotwenty-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   7. Defensive — empty headings emitted by Beaver Builder Rich Text modules
   ========================================================================== */

/* When a BB Rich Text module wraps one of our shortcodes and has its
 * "Heading" field configured but blank, BB still emits an empty <h*>
 * before our content. That empty heading is visually invisible but is
 * flagged by accessibility tools (WAVE / axe). This rule hides empty
 * headings that sit inside a BB module so they don't take up vertical
 * space. The DOM-level fix (configure or remove the BB Heading field)
 * still has to happen on the site side; this rule is just visual
 * armor. (Feedback round 1, T6.) */
.fl-module-rich-text h1:empty,
.fl-module-rich-text h2:empty,
.fl-module-rich-text h3:empty,
.fl-module-rich-text h4:empty,
.fl-module-rich-text h5:empty,
.fl-module-rich-text h6:empty {
	display: none;
}
