/*
 * TXBP Tenant Directory: styles for the [txbp_tenants] shortcode.
 *
 * Everything is scoped under .txbp-tenants so it cannot change the rest of the site.
 * Change the colors and fonts in the block of variables just below; nothing else needs editing.
 *
 * Layout follows Elementor's own breakpoints: phones up to 767px (1 column),
 * tablets 768px to 1024px (2 columns), desktops from 1025px (4 columns).
 *
 * Selectors are deliberately a little more specific than the Hello Elementor theme's
 * reset styles (its button, link, heading and form-field rules), so the theme cannot
 * turn the filter buttons pink or underline the card links.
 */

.txbp-tenants {
	/* Colors */
	--txbp-navy: #23324E;
	--txbp-navy-deep: #161E30;
	--txbp-slate: #3A5488;
	--txbp-gray: #F7F6F3;
	--txbp-hairline: #E3E2DD;
	--txbp-card: #FCFCFA;
	--txbp-white: #FFFFFF;
	--txbp-tint: #ECF0F8;
	--txbp-text: #5E6571;
	--txbp-rule: #D9D8D2;
	--txbp-seg-line: #B9C1CF;
	--txbp-field-line: #8A94A6;
	--txbp-placeholder: #6B7587;

	/* Fonts (the site already loads Roboto Slab and Inter; add fonts="google" to the shortcode if it does not) */
	--txbp-font-heading: "Roboto Slab", Georgia, serif;
	--txbp-font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	font-family: var(--txbp-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: #333333;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

.txbp-tenants,
.txbp-tenants *,
.txbp-tenants *::before,
.txbp-tenants *::after {
	box-sizing: border-box;
}

/* Author styles beat the browser's [hidden] rule, so restate it. */
.txbp-tenants [hidden] {
	display: none !important;
}

/* Visually hidden text for screen readers. */
.txbp-tenants .txbp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Keyboard focus */
.txbp-tenants a:focus-visible,
.txbp-tenants button:focus-visible,
.txbp-tenants select:focus-visible,
.txbp-tenants input:focus-visible {
	outline: 3px solid var(--txbp-slate);
	outline-offset: 2px;
	box-shadow: none;
}

.txbp-tenants .txbp-notice,
.txbp-tenants-notice {
	padding: 16px 20px;
	background: #fff8e5;
	border: 1px solid #dba617;
	font-size: 14px;
}

/* ------------------------------------------------------------------
 * Filter bar (phone layout first)
 * ---------------------------------------------------------------- */

.txbp-tenants .txbp-filters {
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 0;
	padding: 20px;
	background: var(--txbp-gray);
	border: 1px solid var(--txbp-hairline);
	/* Lets the bar rearrange itself when it sits in a narrow column (see the @container rules below). */
	container-type: inline-size;
	container-name: txbp-filters;
}

.txbp-tenants .txbp-filter-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
}

.txbp-tenants .txbp-label {
	display: block;
	margin: 0;
	padding: 0;
	font-family: var(--txbp-font-body);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--txbp-slate);
	vertical-align: baseline;
}

/* Park buttons: a swipeable row of pills on phones */
.txbp-tenants .txbp-seg-group {
	display: flex;
	gap: 8px;
	margin: 0 -20px;
	padding: 0 20px 4px;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.txbp-tenants .txbp-seg-group::-webkit-scrollbar {
	display: none;
}

.txbp-tenants button.txbp-seg {
	flex: 0 0 auto;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--txbp-field-line);
	border-radius: 0;
	background: var(--txbp-white);
	color: var(--txbp-navy);
	font-family: var(--txbp-font-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: normal;
	text-align: center;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.txbp-tenants button.txbp-seg:focus {
	background: var(--txbp-white);
	color: var(--txbp-navy);
}

.txbp-tenants button.txbp-seg:hover {
	background: var(--txbp-tint);
	color: var(--txbp-navy);
}

.txbp-tenants button.txbp-seg[aria-pressed="true"],
.txbp-tenants button.txbp-seg[aria-pressed="true"]:hover,
.txbp-tenants button.txbp-seg[aria-pressed="true"]:focus {
	border-color: var(--txbp-navy);
	background: var(--txbp-navy);
	color: var(--txbp-card);
	font-weight: 600;
}

/* Category, search, result count */
.txbp-tenants .txbp-filter-row {
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 0;
	padding: 0;
}

.txbp-tenants .txbp-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.txbp-tenants select.txbp-select,
.txbp-tenants input.txbp-input {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--txbp-field-line);
	border-radius: 0;
	background-color: var(--txbp-white);
	color: var(--txbp-navy);
	font-family: var(--txbp-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.3;
	box-shadow: none;
	transition: none;
}

.txbp-tenants select.txbp-select:focus,
.txbp-tenants input.txbp-input:focus {
	border-color: var(--txbp-navy);
	background-color: var(--txbp-white);
	color: var(--txbp-navy);
}

.txbp-tenants select.txbp-select {
	padding-right: 44px;
	font-weight: 500;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--txbp-navy) 50%), linear-gradient(135deg, var(--txbp-navy) 50%, transparent 50%);
	background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

.txbp-tenants input.txbp-input::placeholder {
	color: var(--txbp-placeholder);
	opacity: 1;
}

.txbp-tenants .txbp-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 24px;
	margin: 0;
	padding: 0;
}

.txbp-tenants .txbp-count {
	font-size: 14px;
	line-height: 1.4;
	color: var(--txbp-text);
}

.txbp-tenants button.txbp-clear {
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--txbp-navy);
	font-family: var(--txbp-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
	box-shadow: none;
}

.txbp-tenants button.txbp-clear:hover,
.txbp-tenants button.txbp-clear:focus {
	background: transparent;
	color: var(--txbp-slate);
}

/* ------------------------------------------------------------------
 * Parks and cards (phone layout first)
 * ---------------------------------------------------------------- */

/* "gap" (rather than margins) so a park hidden by a filter leaves no empty space. */
.txbp-tenants .txbp-parks {
	display: flex;
	flex-direction: column;
	gap: 52px;
	margin: 52px 0 0;
	padding: 0;
}

.txbp-tenants--no-filters .txbp-parks {
	margin-top: 0;
}

.txbp-tenants .txbp-park {
	margin: 0;
	padding: 0;
}

.txbp-tenants .txbp-park-head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0 0 14px;
	border-bottom: 1px solid var(--txbp-rule);
}

.txbp-tenants .txbp-park-title {
	margin: 0;
	padding: 0;
	font-family: var(--txbp-font-heading);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.18;
	letter-spacing: -0.5px;
	text-transform: none;
	text-align: left;
	color: var(--txbp-navy);
	text-wrap: balance;
}

.txbp-tenants .txbp-park-count {
	font-size: 14px;
	line-height: 1.4;
	color: var(--txbp-text);
	white-space: nowrap;
}

.txbp-tenants .txbp-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
	margin: 20px 0 0;
	padding: 0;
}

/* With headings="no" the grid is the only thing in the section, so it needs no top gap. */
.txbp-tenants .txbp-park > .txbp-grid:only-child {
	margin-top: 0;
}

.txbp-tenants .txbp-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: var(--txbp-card);
	border: 1px solid var(--txbp-hairline);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.txbp-tenants .txbp-card:hover {
	border-color: var(--txbp-navy);
	box-shadow: 0 12px 28px rgba(27, 36, 56, 0.1);
}

/* Logo tile: fixed height, so nothing moves when the image loads */
.txbp-tenants .txbp-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 120px;
	margin: 0;
	padding: 18px 22px;
	background: var(--txbp-white);
	border-bottom: 1px solid var(--txbp-hairline);
}

.txbp-tenants .txbp-tile--dark {
	background: var(--txbp-navy);
	border-bottom-color: var(--txbp-navy);
}

.txbp-tenants .txbp-tile--initials {
	padding: 0;
	background: var(--txbp-tint);
}

.txbp-tenants .txbp-tile img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
}

.txbp-tenants .txbp-initials {
	font-family: var(--txbp-font-heading);
	font-size: 40px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 2px;
	color: var(--txbp-slate);
}

.txbp-tenants .txbp-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 18px 20px 20px;
}

.txbp-tenants .txbp-name {
	margin: 0;
	padding: 0;
	font-family: var(--txbp-font-heading);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.28;
	letter-spacing: -0.2px;
	text-transform: none;
	text-align: left;
	color: var(--txbp-navy);
	text-wrap: balance;
}

.txbp-tenants .txbp-desc {
	margin: 0;
	padding: 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--txbp-text);
	text-wrap: pretty;
}

.txbp-tenants a.txbp-link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	min-height: 44px;
	margin: auto 0 0;
	padding: 8px 0 0;
	background: transparent;
	font-family: var(--txbp-font-body);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--txbp-navy);
}

.txbp-tenants a.txbp-link:hover,
.txbp-tenants a.txbp-link:focus {
	color: var(--txbp-navy);
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* No matches */
.txbp-tenants .txbp-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 44px 0 0;
	padding: 48px 20px;
	text-align: center;
	background: var(--txbp-card);
	border: 1px dashed var(--txbp-seg-line);
}

.txbp-tenants .txbp-empty-title {
	margin: 0;
	padding: 0;
	font-family: var(--txbp-font-heading);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.3px;
	text-transform: none;
	text-align: center;
	color: var(--txbp-navy);
}

.txbp-tenants .txbp-empty-text {
	max-width: 440px;
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--txbp-text);
}

.txbp-tenants button.txbp-btn {
	display: inline-block;
	margin: 8px 0 0;
	padding: 17px 28px;
	border: 0.8px solid var(--txbp-navy);
	border-radius: 0;
	background: var(--txbp-navy);
	color: var(--txbp-card);
	font-family: var(--txbp-font-body);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 1.8px;
	text-align: center;
	text-transform: uppercase;
	white-space: normal;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.txbp-tenants button.txbp-btn:hover,
.txbp-tenants button.txbp-btn:focus {
	border-color: var(--txbp-navy-deep);
	background: var(--txbp-navy-deep);
	color: var(--txbp-card);
}

/* ------------------------------------------------------------------
 * Tablet: 768px and up
 * ---------------------------------------------------------------- */

@media (min-width: 768px) {
	.txbp-tenants .txbp-filters {
		gap: 26px;
		padding: 28px;
	}

	/* Park buttons wrap onto as many lines as they need */
	.txbp-tenants .txbp-seg-group {
		flex-wrap: wrap;
		margin: 0;
		padding: 0;
		overflow: visible;
	}

	/* Category and search side by side (they stack in a narrow column: see the @container rules below). */
	.txbp-tenants .txbp-filter-row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.txbp-tenants .txbp-filter-row--no-category {
		grid-template-columns: minmax(0, 1fr);
	}

	.txbp-tenants .txbp-status {
		grid-column: 1 / -1;
	}

	.txbp-tenants .txbp-parks {
		gap: 72px;
		margin-top: 72px;
	}

	.txbp-tenants--no-filters .txbp-parks {
		margin-top: 0;
	}

	.txbp-tenants .txbp-park-head {
		flex-direction: row;
		align-items: baseline;
		justify-content: space-between;
		gap: 24px;
		padding-bottom: 18px;
	}

	.txbp-tenants .txbp-park-title {
		font-size: 32px;
		line-height: 1.15;
		letter-spacing: -0.7px;
	}

	/*
	 * At most 2 columns, fewer when the space is narrow (a card never gets narrower than 200px).
	 * "auto-fill" keeps a short row's cards card-sized instead of stretching them across the page;
	 * the "- 1px" stops rounding from ever dropping the last column.
	 */
	.txbp-tenants .txbp-grid {
		grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 24px) / 2 - 1px)), 1fr));
		gap: 24px;
		margin-top: 28px;
	}

	.txbp-tenants .txbp-tile {
		height: 132px;
		padding: 20px 24px;
	}

	.txbp-tenants .txbp-body {
		padding: 20px 22px 22px;
	}

	.txbp-tenants .txbp-desc {
		font-size: 14px;
	}

	.txbp-tenants .txbp-empty {
		margin-top: 72px;
		padding: 72px 24px;
		gap: 14px;
	}

	.txbp-tenants .txbp-empty-title {
		font-size: 26px;
		line-height: 1.2;
		letter-spacing: -0.4px;
	}

	.txbp-tenants button.txbp-btn {
		margin-top: 10px;
	}
}

/* Fine pointers (a mouse) do not need the big tap target on the card links. */
@media (min-width: 768px) and (pointer: fine) {
	.txbp-tenants a.txbp-link {
		min-height: 0;
	}
}

/* ------------------------------------------------------------------
 * Desktop: 1025px and up
 * ---------------------------------------------------------------- */

@media (min-width: 1025px) {
	/* Park buttons become one joined bar */
	.txbp-tenants .txbp-seg-group {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
		gap: 1px;
		background: var(--txbp-seg-line);
		border: 1px solid var(--txbp-seg-line);
	}

	.txbp-tenants button.txbp-seg {
		height: auto;
		min-height: 56px;
		padding: 8px 14px;
		border: 0;
		white-space: normal;
	}

	.txbp-tenants button.txbp-seg[aria-pressed="true"],
	.txbp-tenants button.txbp-seg[aria-pressed="true"]:hover,
	.txbp-tenants button.txbp-seg[aria-pressed="true"]:focus {
		border: 0;
	}

	.txbp-tenants button.txbp-seg:focus-visible {
		outline-offset: -3px;
	}

	.txbp-tenants .txbp-filter-row {
		grid-template-columns: 320px minmax(0, 1fr) auto;
		align-items: end;
	}

	.txbp-tenants .txbp-filter-row--no-category {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.txbp-tenants select.txbp-select,
	.txbp-tenants input.txbp-input {
		font-size: 15px;
	}

	.txbp-tenants .txbp-status {
		grid-column: auto;
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 18px;
		min-height: 48px;
		white-space: nowrap;
	}

	.txbp-tenants button.txbp-clear {
		min-height: 0;
	}

	/* At most 4 columns, fewer in a narrow column (same idea as the tablet rule above). */
	.txbp-tenants .txbp-grid {
		grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 72px) / 4 - 1px)), 1fr));
	}

	/*
	 * A desktop screen, but the filter bar itself is narrow (the directory sits in a column):
	 * use the wrapping pill buttons and a two-column field row instead of the joined bar.
	 */
	@container txbp-filters (max-width: 899px) {
		.txbp-tenants .txbp-seg-group {
			display: flex;
			flex-wrap: wrap;
			gap: 8px;
			background: transparent;
			border: 0;
		}

		.txbp-tenants button.txbp-seg,
		.txbp-tenants button.txbp-seg[aria-pressed="true"],
		.txbp-tenants button.txbp-seg[aria-pressed="true"]:hover,
		.txbp-tenants button.txbp-seg[aria-pressed="true"]:focus {
			height: 44px;
			min-height: 0;
			padding: 0 16px;
			border: 1px solid var(--txbp-field-line);
			white-space: nowrap;
		}

		.txbp-tenants button.txbp-seg[aria-pressed="true"],
		.txbp-tenants button.txbp-seg[aria-pressed="true"]:hover,
		.txbp-tenants button.txbp-seg[aria-pressed="true"]:focus {
			border-color: var(--txbp-navy);
		}

		.txbp-tenants button.txbp-seg:focus-visible {
			outline-offset: 2px;
		}

		.txbp-tenants .txbp-filter-row {
			grid-template-columns: repeat(2, minmax(0, 1fr));
			align-items: stretch;
		}

		.txbp-tenants .txbp-filter-row--no-category {
			grid-template-columns: minmax(0, 1fr);
		}

		.txbp-tenants .txbp-status {
			grid-column: 1 / -1;
			flex-wrap: wrap;
			justify-content: space-between;
			gap: 12px;
			min-height: 24px;
			white-space: normal;
		}
	}
}

/* A very narrow filter bar (a small column at any screen size): stack the fields. */
@media (min-width: 768px) {
	@container txbp-filters (max-width: 520px) {
		.txbp-tenants .txbp-filter-row {
			grid-template-columns: minmax(0, 1fr);
		}
	}
}

/* ------------------------------------------------------------------
 * Motion
 * ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.txbp-tenants .txbp-card,
	.txbp-tenants button.txbp-seg,
	.txbp-tenants button.txbp-btn {
		transition: none;
	}
}
