/*
 * Scoped styles for the creole-solutions/hubdb-directory block.
 *
 * RECOVERED, not designed: every value is the live HubSpot module's own —
 * the card grid from docs/reference/hubspot-module-css/module_HubDB.min.css
 * (verified byte-identical to the live module asset on the four source
 * pages), the button base from the source theme's template_main.css, and
 * the select arrow from template_child.css. Each selector is prefixed with
 * the block container class so nothing leaks outside the four directories;
 * scripts/tests/hubdb-directory.test.mjs pins that scoping.
 */

/* --- card grid (module_HubDB.min.css) --- */
.creole-hubdb-directory .block-results {
	display: -webkit-box;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-start;
	margin-bottom: 0;
	padding-bottom: 0;
	padding-top: 16px;
}

.creole-hubdb-directory .block-item {
	display: flex;
	-webkit-box-flex: 1;
	flex: 1 1 33.33%;
	margin: 1rem;
	max-width: calc(33.33% - 2rem);
}

/* A hidden card must actually hide: without this rule the flex display
 * above would override the UA default [hidden]{display:none} and filtered-
 * out cards would stay on screen. Specificity (0,3,0) beats .block-item's
 * (0,2,0). NOTE: the cascade was reasoned from the CSS spec, not pinned in
 * a real browser this session (no browser tooling available in-project). */
.creole-hubdb-directory .block-item[hidden] {
	display: none;
}

.creole-hubdb-directory .block-item-content {
	align-items: stretch;
	background-color: #fff;
	border: .5px solid rgba(100, 146, 253, .2);
	border-radius: 9px;
	box-shadow: 0 11px 30px rgba(154, 161, 177, .17);
	display: flex;
	width: 100%;
}

.creole-hubdb-directory .block-text-container {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.creole-hubdb-directory .head-shot-image-team {
	aspect-ratio: 16 / 9;
	background-position: top;
	background-repeat: no-repeat;
	background-size: cover;
}

.creole-hubdb-directory .textingrid {
	padding: 20px;
	text-align: left;
}

.creole-hubdb-directory .carddesc {
	margin: 0 0 15px;
}

/* --- card action button: the source theme's own base button --- */
.creole-hubdb-directory button {
	font: inherit;
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	margin: 0;
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	text-align: center;
	transition: color 0.15s linear;
	white-space: normal;
	border-radius: 0 !important; /* the source stylesheet's own declaration */
	box-shadow: none !important;
	overflow: visible;
	text-transform: none;
	-webkit-appearance: button;
}

/* --- LinkedIn glyph (module_HubDB.min.css) --- */
.creole-hubdb-directory .social-div {
	margin: 10px 0;
}

.creole-hubdb-directory .social-div svg {
	width: 24px;
	height: 24px;
}

.creole-hubdb-directory .social-icon {
	width: 28px;
}

/* --- filter select: the source theme's own form select --- */
.creole-hubdb-directory .creole-hubdb-filter {
	margin: 0 auto;
	padding: 10px 0;
}

.creole-hubdb-directory .selectarrow select {
	appearance: none;
	-webkit-appearance: none;
	padding: 15px;
	display: inline-block;
	width: 100%;
	font-family: inherit;
	font-size: 100%;
	line-height: 1.15;
	text-transform: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 1rem center;
	background-repeat: no-repeat;
	background-size: 1em;
}

/* --- source module's own narrow-viewport adjustment --- */
@media only screen and (max-width: 900px) {
	.creole-hubdb-directory .block-item {
		margin: 1rem auto;
		max-width: 400px;
	}
}

/* --- portfolio table: the source module's own rules --- */
/*
 * Copied from the live module stylesheet
 * (hub_generated/module_assets/1/79012982365/…/module_Portfolio_DB.min.css),
 * scoped to the portfolio kind so the five card directories are untouched.
 * The source's `!important` flags are kept: they are what makes the table's
 * own border collapse the way it looks on the live page, and dropping them
 * would let the theme's generic table rules win instead.
 */
.creole-hubdb-directory[data-kind="portfolio"] .tableclass {
	/* THE LIVE TABLE IS 1220px FIXED, NOT FULL WIDTH. Measured at four
	 * viewports: x=350 w=1220 at 1920, x=190 at 1600, x=30 at 1280 —
	 * `max-width: none` and `width: 1220px` computed. The block therefore
	 * centres a 1220px table and lets it shrink on narrower screens, which
	 * is what the live page does too (its rows grow to 98px at 1024).
	 * Rendering it edge to edge was the first mistake here: it made the
	 * Description column 1392px against the live 958px.
	 */
	width: 100%;
	max-width: 1220px;
	margin-left: auto;
	margin-right: auto;
	scroll-margin-block-start: var(--space-3);
}

/* Extend the theme's .pagination component for native <button> controls. */
.creole-hubdb-directory[data-kind="portfolio"] .creole-portfolio-pagination {
	width: 100%;
	max-width: 1220px;
	margin-inline: auto;
	font-size: 16px;
}

.creole-hubdb-directory[data-kind="portfolio"] .creole-portfolio-pagination .nav-links {
	align-items: center;
}

.creole-hubdb-directory[data-kind="portfolio"] .creole-portfolio-pagination button {
	justify-content: center;
	min-height: 44px;
	background: var(--color-surface);
	color: var(--color-brand);
	border-radius: var(--radius) !important; /* Override the legacy directory button reset. */
}

.creole-hubdb-directory[data-kind="portfolio"] .creole-portfolio-pagination button:not(:disabled):hover {
	border-color: var(--color-brand);
	text-decoration: underline;
}

.creole-hubdb-directory[data-kind="portfolio"] .creole-portfolio-pagination button:focus-visible {
	outline: 2px solid var(--color-brand);
	outline-offset: 2px;
}

.creole-hubdb-directory[data-kind="portfolio"] .creole-portfolio-pagination button:disabled {
	cursor: default;
	opacity: .6;
}

.creole-hubdb-directory[data-kind="portfolio"] tr[data-filter-value][hidden] {
	display: none;
}

.creole-hubdb-directory[data-kind="portfolio"] .headertable {
	background-color: #f5f8fa;
	text-align: left;
	width: 100%;
}

.creole-hubdb-directory[data-kind="portfolio"] .linepaddingtd {
	padding: 15px;
}

.creole-hubdb-directory[data-kind="portfolio"] .headertable,
.creole-hubdb-directory[data-kind="portfolio"] tr.tr {
	border: 1px solid #e8ecee !important;
}

.creole-hubdb-directory[data-kind="portfolio"] .linepaddingtd,
.creole-hubdb-directory[data-kind="portfolio"] .titleth {
	border-left: 0 !important;
	border-right: 0 !important;
	border-top: 1px solid #e8ecee !important;
	border-bottom: 1px solid #e8ecee !important;
}

/* The live select sits at the content's own left edge (its wrapper is a
 * plain `div style="width: 300px"`), aligned with the table's first
 * column: measured x=110 at 1440, the same x as the table. The shared
 * filter control carries `width: 300px; margin-left: 1rem` inline for the
 * Resources/Talent grids, so here the wrapper is widened to the table's
 * own centred column and the SELECT is the thing held to 300px. Centring
 * the 300px wrapper instead put the select at x=570, mid-page. */
.creole-hubdb-directory[data-kind="portfolio"] .creole-hubdb-filter {
	width: 100% !important;
	max-width: 1220px;
	margin-left: auto !important;
	margin-right: auto !important;
}

.creole-hubdb-directory[data-kind="portfolio"] .creole-hubdb-filter select {
	width: 300px;
}

/* THE LIVE TABLE'S TEXT IS 16px, NOT THE PAGE'S 18px. Measured: the live
 * cell resolves to Poppins 16px / line-height 22.4px and its rows stand
 * 76px tall; inheriting the page's 18px made our rows 89px and pushed the
 * columns to 192/910/117 against the live 155/958/106. The bundled
 * "CS Hero Poppins" is the same typeface, so only the size is set here. */
.creole-hubdb-directory[data-kind="portfolio"] .linepaddingtd,
.creole-hubdb-directory[data-kind="portfolio"] .titleth {
	font-size: 16px;
	line-height: 1.4;
}

/* A filtered-out row must actually disappear: `hidden` is enough for a
 * block element, but table rows need their display reset explicitly. */
.creole-hubdb-directory[data-kind="portfolio"] tr[hidden] {
	display: none;
}
