.tm-query-posts,
.publication-children-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--small);
    padding: 0;
    margin: 0;
}

.tm-query-posts + .wp-block-buttons {
    margin-top: var(--wp--preset--spacing--medium);
}

.tm-query-post {
    display: flex; 
    flex-direction: column;
}

.tm-query-post.no-background {
    background-color: transparent !important;
}

.tm-query-post.type-insight {
    background-color: var(--wp--preset--color--insight-eggplant);
}

.tm-query-post.type-resource {
    background-color: var(--wp--preset--color--resource-eggplant);
}

.tm-query-post.type-publication {
    background-color: var(--wp--preset--color--accent);
}

.tm-query-post.type-program,
.tm-query-post.type-announcement {
    background-color: var(--wp--preset--color--accent-mint);
}

.tm-query-post.type-page { 
    background-color: var(--wp--preset--color--lightest-blue);
}

.browse-all-query .tm-query-post.type-publication, .search-results .tm-query-post.type-publication,
.global-search-grid .tm-query-post.type-publication, .search-results .tm-query-post.type-publication {
    background-color: var(--wp--preset--color--white) !important;
}

ul.columns-3 .tm-query-post {
    flex-basis: calc((100% - 2 * var(--wp--preset--spacing--small)) / 3);
}

ul.columns-2 .tm-query-post {
    flex-basis: calc((100% - var(--wp--preset--spacing--small)) / 2);
}

ul.columns-1 .tm-query-post .tm-query-post-content {
    flex-basis: calc(66.67% - (var(--wp--preset--spacing--small) / 2));
}

ul.columns-1 .tm-query-post .tm-query-post-image {
    flex-basis: calc(33.33% - (var(--wp--preset--spacing--small) / 2));
}

ul.columns-1 .tm-query-post .tm-query-post-image,
.tm-query-post.no-background .tm-query-post-image {
    border-radius: 5px;
}

ul.columns-1 .tm-query-post.type-person .tm-query-post-image {
    border-radius: 100%;
    order: 1;
    flex-basis: auto;
    width: 150px;
    height: 150px;
}

.tm-query-post-image {
    margin: 0;
    width: 100%;
    overflow: hidden;
}

.tm-query-post-image a {
    height: 100%;
    display: flex;
}

.tm-query-post-image img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    max-width: 100%;
}

ul.columns-3 .tm-query-post-image,
ul.columns-2 .tm-query-post-image,
ul.columns-3 .tm-query-post-image img,
ul.columns-2 .tm-query-post-image img {
    aspect-ratio: 16/9;
}

.tm-query-post-content {
    padding: var(--wp--preset--spacing--x-small);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: var(--wp--custom--spacing--gap);
}

.tm-query-post-content * {
    margin: 0 !important;
}

.tm-query-post .wp-block-post-terms {
	gap: 0;
}

.tm-query-post.no-background .tm-query-post-content {
    padding: 0;
}

.tm-query-post.no-background > .wp-block-group {
    gap: var(--wp--preset--spacing--x-small);
}

.tm-query-post-upper {
    display: flex;
    flex-direction: column;
    gap: var(--wp--custom--spacing--gap);
}

.tm-query-post-upper > * {
    margin: 0;
}

.tm-query-post-meta {
    display: flex; 
    align-items: center; 
    font-weight: 600;
    white-space: pre;
}

.tm-query-post-meta * {
    margin: 0;
}

.tm-query-post-meta p {
    padding: 0 var(--wp--preset--spacing--xxx-small);
}

/* .tm-query-post.is-editors-note .tm-query-post-image::after { 
    z-index: 20;
    position: absolute; 
    top: 220px;
    right: 20px;
    content: url(../../../assets/images/wave-icon.svg);
    mix-blend-mode: multiply;
} */

.tm-query-post.is-editors-note .tm-query-post-content, .tm-query-post.is-call-for-submission .tm-query-post-content {
    position: relative; /* Ensure positioning context */
    z-index: 1; /* Create stacking context */
}
.tm-query-post.is-editors-note, .tm-query-post.is-call-for-submission {
    position: relative; /* Ensure positioning context */
    z-index: 1; /* Create stacking context */
}

.tm-query-post.is-editors-note .tm-query-post-content::after, .tm-query-post.is-call-for-submission .tm-query-post-content::after {
    content: url(../../../assets/images/wave-icon.svg);
    position: absolute;
    pointer-events: none;
    z-index: 4;
    top: -10%;
    right: 20px;
    mix-blend-mode: multiply !important;
	filter: brightness(0.6) contrast(2.5) saturate(1.2);
    opacity: 0.6;
}



/* SEARCH AND FILTER CSS */
.search-filter-container,
.contributors-search-filter-container { 
    margin-block-start: var(--wp--preset--spacing--medium) !important;
}

.search-filter-container form .controls,
.contributors-search-filter-container form .controls { 
    display: flex; 
    flex-direction: row;
    gap: var(--wp--preset--spacing--xxx-small);
}

.search-filter-container form .search-filter-inputs,
.contributors-search-filter-container form .search-filter-inputs { 
    display: flex; 
    flex-direction: row; 
    flex-wrap: wrap;
    gap: var(--wp--preset--spacing--x-small);
    font-family: var(--wp--preset--font-family--primary);
    font-weight: 600;
}

.search-filter-container form .search-filter-inputs .search-input-wrapper,
.contributors-search-filter-container form .search-filter-inputs .search-input-wrapper { 
    /* flex-basis: 75%; */
    flex-grow: 1; 
}

.search-filter-container form .search-filter-inputs .search-input-wrapper input,
.contributors-search-filter-container form .search-filter-inputs .search-input-wrapper input { 
    border: 2px solid var(--wp--preset--color--eggplant);
    font-family: var(--wp--preset--font-family--primary);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    height: 100%; 
    padding: 10px 14px; 
    display: flex; 
    font-size: 16px;
    color: var(--wp--preset--color--eggplant);
}

.search-filter-container form .search-filter-inputs .publication-type-wrapper,
.search-filter-container form .search-filter-inputs .tag-type-wrapper { 
    position: relative; 
    display: inline-flex;
    align-items: center; 
    flex-basis: 100%; 
    gap: var(--wp--preset--spacing--xxx-small);
}

.search-filter-container form .search-filter-inputs .publication-type-wrapper select:focus-visible, 
.contributors-search-filter-container form .search-filter-inputs:focus-visible,
.search-filter-container form .search-filter-inputs .tag-type-wrapper select:focus-visible
 { 
    outline: none; 
}

/* Or if you want to style it */
input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

.search-filter-container form .search-filter-inputs .publication-type-wrapper select,
.search-filter-container form .search-filter-inputs .tag-type-wrapper select { 
    background-color: transparent !important; 
    appearance: none;
    display: flex; 
    color: var(--wp--preset--color--eggplant);
    font-family: var(--wp--preset--font-family--primary);
    font-size: var(--wp--preset--font-size--body);
    font-weight: 600;
    cursor: pointer; 
    background-color: var(--wp--preset--color--white);
}

.publication-type-wrapper::after,
.tag-type-wrapper::after {
    font: var(--fa-font-solid);
	content: "\f063";
	transform: translateX(-100%);
    pointer-events: none;
    color: var(--wp--preset--color--eggplant);
    padding-right: 20px;
}

.publication-type-select,
.tag-type-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: auto; 
    flex-grow: 0;
    flex-shrink: 0;
    padding: 10px 30px 10px 14px;
    border-radius: 50px;
    border: 2px solid var(--wp--preset--color--eggplant);
}

.publication-type-select:hover,
.tag-type-select:hover {
    text-decoration: none !important; 
}

.search-filter-container form button, .contributors-search-filter-container form button {
	background-color: var(--wp--preset--color--eggplant);
    font-weight: 600;
    font-family: var(--wp--preset--font-family--primary);
    padding-top: 10px;
    padding-right: 14px;
    padding-bottom: 10px;
    padding-left: 14px;
	height: auto;
	line-height: 1;
	font-size: var(--wp--preset--font-size--body);
	border: 0;
    border-radius: 5px; 
    color: var(--wp--preset--color--white);
    display: inline-flex; 
    align-items: center; 
    cursor: pointer; 
    height: 100%; 
}

.search-filter-container form button::after, .contributors-search-filter-container form button::after {
	font: var(--fa-font-solid);
	content: " \f002" !important;
    font-size: 0.8em;
	display: inline-block;
	margin-left: .4em;
    transition: transform 150ms cubic-bezier(0.770, 0.000, 0.175, 1.000); /* easeInOutQuart */ 
}

.search-filter-container form button:hover, .contributors-search-filter-container form button:hover {
	opacity: 0.7; 
}

.search-filter-container form button:hover::after, .contributors-search-filter-container form button:hover::after {
	transform: translateX(20%);
}


.wp-block-button__link.clear-submit-button::after { 
    font: var(--fa-font-solid);
	content: " \f00d" !important;
}

.contributors-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(min(22rem, 100%), 1fr));
    container-type: inline-size;
    gap: var(--wp--preset--spacing--medium);
}