/**
 * Styles for resource custom post type.
 * (videos, publications, websites, articles, reports, etc)
 */
.resources-list-table {
	width: 100%;
	--ffs-table-inline-padding: calc(var(--ffs-posts-gap) * 0.75);
}
.resources-list-header-row th {
	padding-block: var(--ffs-posts-gap);
	font-weight: var(--ffs-font-wt-normal);
	text-align: left;
}
.resources-list-header-row th:not(:first-of-type):not(:last-of-type) {
	padding-inline: var(--ffs-table-inline-padding);
}
.resources-list-header-row th:first-of-type {
	padding-left: 0;
	padding-right: var(--ffs-table-inline-padding);
}
.resources-list-tbody {
	border-top: 1px solid var(--ffs-border-colour);
}
.resources-list-header-row th:last-of-type {
	padding-left: var(--ffs-table-inline-padding);
	padding-right: 0;
}
.resources-list-item-row td {
	vertical-align: top;
	position: relative;
}
.resources-list-item-row a {
	text-decoration: none;
}
.resources-list-item-row a * {
	color: var(--ffs-paragraph-text-colour);
}
.resources-list-item-row a:hover * {
	color: var(--ffs-text-rollover-colour);
}
.resource-td-title,
.resource-td-description,
.resource-td-type,
.resource-td-thumbnail {
	margin: 0;
	padding-block: var(--ffs-posts-gap);
}
.resource-td-description, .resource-td-thumbnail {
	padding-left: var(--ffs-table-inline-padding);
}
.resource-td-title,
.resource-td-detail-wrap,
.resource-td-description,
.resource-td-type {
	padding-right: var(--ffs-table-inline-padding);
}
.resource-td-title,
.resource-td-detail-wrap {
	padding-bottom: calc(var(--ffs-posts-gap) / 2);
}
.resource-td-title {
	font-size: var(--ffs-item-title-size);
	font-weight: var(--ffs-font-wt-bold);
	letter-spacing: var(--ffs-item-title-letter-spacing);
	text-rendering: geometricPrecision;
	line-height: 1.25 !important;
}
.resource-td-type {
	font-size: 11pt;
	font-weight: var(--ffs-font-wt-bold);
	padding-top: 0;
}
.resource-td-detail-wrap {
	display: flex;
	flex-direction: column;
	row-gap: calc(var(--ffs-posts-gap) / 2);
	font-size: var(--ffs-small-text);
}
.resource-td-description {
	font-size: var(--ffs-item-text-content-size);
	font-weight: var(--ffs-font-wt-light);
}
/* hide excerpt on list (table) view */
.resources-list-item-td-resource .resources-list-item-link:nth-of-type(2) {
	display: none;
}
.resources-list-item-link {
	display: block;
	position: relative;
	line-height: 1.5;
}
.sort-by-header {
	white-space: nowrap;
	cursor: pointer;
	color: var(--ffs-header-colour);
	font-size: var(--ffs-item-title-size);
	letter-spacing: var(--ffs-item-title-letter-spacing);
}
.sort-by-header-3 {
	visibility: hidden;
}
.sort-by-header::after {
	display: inline-block;
	content: '';
	background-position: center right;
	background-size: 16px auto;
	background-repeat: no-repeat;
	height: 16px;
	width: 24px;
}
.sort-by-header-asc::after {
	background-image: url('https://www.futurefoodsystems.com.au/wp-content/themes/dt-the7-child/img/up-arrow.svg');
}
.sort-by-header-desc::after {
	background-image: url('https://www.futurefoodsystems.com.au/wp-content/themes/dt-the7-child/img/down-arrow.svg');
}
.resources-list-item-row {
	display: none;
}
.resources-list-item-row.show {
	display: table-row;
	border-bottom: 1px solid var(--ffs-border-colour);
}
.no-resources-list-found {
	display: none;
}
.no-resources-list-found.show {
	display: block;
}
.resources-list-thumbnail-small .sort-by-header-1,
.resources-list-thumbnail-small .resources-list-item-col-1 {
	width: 75%;
}
.resources-list-thumbnail-medium .sort-by-header-1,
.resources-list-thumbnail-medium .resources-list-item-col-1 {
	width: 66.666%;
}
.sort-by-header-2, .resources-list-item-col-2 {
	display: none;
}
.resource-td-thumbnail {
	display: flex;
}
.resources-list-item-td-thumbnail .resources-list-item-link .media-container::before {
	content: '';
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--ffs-tint-colour);
    opacity: 0;
    transition: opacity 500ms ease;
}
.resources-list-item-td-thumbnail .resources-list-item-link:hover .media-container::before {
	opacity: 1;
}
.resource-td-thumbnail .media-container {
	flex: 1;
	overflow: hidden;
    border-radius: var(--ffs-img-border-radius);
}
.resource-td-thumbnail .ffs-fallback-img-post-text {
	padding: var(--ffs-post-item-intra-gap);
}
.resource-td-thumbnail .ffs-fallback-img-post-title,
.resource-td-thumbnail .ffs-fallback-img-post-subtext {
	margin: 0;
	-webkit-line-clamp: 2;
    line-clamp: 2;
}
.resource-td-thumbnail .ffs-fallback-img-post-title {
	font-size: calc(var(--ffs-item-title-size) * 0.65);
    line-height: calc(var(--ffs-header-line-height) * 0.8);
    letter-spacing: calc(var(--ffs-item-title-letter-spacing) * 0.65);
}
.resource-td-thumbnail .ffs-fallback-img-post-subtext {
    font-size: calc(var(--ffs-item-text-content-size) - 5pt);
}

/* single resource */
.post-main-content-resource {
	padding: var(--ffs-posts-gap) 0;
}
.single-resource-info {
	margin-bottom: 16px;
}
.video-iframe-container {
	position: relative;
	aspect-ratio: 16/9;
	border-radius: calc(var(--ffs-posts-gap) / 2);
	overflow: hidden;
}
.video-iframe-container ~ h3,
.in-content-resource-link {
	margin-top: 16px;
}
.resource-iframe-container {
	margin-top: 32px;
	position: relative;
	aspect-ratio: 100/141;
}
.resource-iframe-container iframe {
	border: none;
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
}
.post-main-content-resource .entry-content h1,
.post-main-content-resource .entry-content h2,
.post-main-content-resource .entry-content h3,
.post-main-content-resource .entry-content h4,
.post-main-content-resource .entry-content h5,
.post-main-content-resource .entry-content h6 {
	margin: 0.8em 0;
}
.ffs-embedded-content-title {
	color: var(--ffs-header-colour);
	font-size: var(--ffs-large-item-title-size);
	letter-spacing: var(--ffs-large-item-title-letter-spacing);
}

/**
 * Media Queries
 */
@media (min-width: 960px) and (max-width: 1199px) {
	.resource-td-thumbnail .ffs-fallback-img-post-title {
		margin-bottom: 0.6em;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
}
@media (min-width: 1200px) {
	.sort-by-header-2, .resources-list-item-col-2 {
		display: table-cell;
	}
	.resources-list-thumbnail-small .sort-by-header-1,
	.resources-list-thumbnail-small .resources-list-item-col-1,
	.resources-list-thumbnail-small .sort-by-header-2,
	.resources-list-thumbnail-small .resources-list-item-col-2 {
		width: 41.666%;
	}
	.resources-list-thumbnail-medium .sort-by-header-1,
	.resources-list-thumbnail-medium .resources-list-item-col-1 {
		width: 33.333%;
	}
	.resources-list-thumbnail-medium .sort-by-header-2,
	.resources-list-thumbnail-medium .resources-list-item-col-2 {
		width: 41.666%;
	}
	.post-main-content-resource .entry-content-video {
		width: 66.6%;
		margin: 0 auto;
	}
	/* table layout as grid */
	.ffs-grid-layout .resources-list-container {
		padding: var(--ffs-posts-gap) 0;
	}
	.ffs-grid-layout .resources-list-table thead {
		display: none;
	}
	.ffs-grid-layout .resources-list-tbody {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		row-gap: var(--ffs-posts-row-gap);
    	column-gap: var(--ffs-posts-gap);
		border-style: none;
	}
	.ffs-grid-layout .resources-list-item-row.show {
		display: flex;
		flex-direction: column;
		border-style: none;
	}
	.ffs-grid-layout .resources-list-item-row.show td {
		width: 100%;
	}
	.ffs-grid-layout .resources-list-item-td-thumbnail {
		order: 1;
	}
	.ffs-grid-layout .resources-list-item-td-resource {
		display: flex;
		flex-direction: column;
		order: 2;
		row-gap: var(--ffs-post-item-intra-gap);
		padding-top: var(--ffs-post-item-intra-gap);
	}
	.ffs-grid-layout .resources-list-item-td-description {
		display: none;
	}
	.ffs-grid-layout .resources-list-item-td-resource .resources-list-item-link:nth-of-type(2) {
		display: block;
	}
	.ffs-grid-layout .resources-list-item-link .resource-td-thumbnail,
	.ffs-grid-layout .resources-list-item-link .resource-td-title,
	.ffs-grid-layout .resources-list-item-link .resource-td-description,
	.ffs-grid-layout .resources-list-item-link .resource-td-type,
	.ffs-grid-layout .resources-list-item-link .resource-td-detail-wrap,
	.ffs-grid-layout .resources-list-item-link .resource-td-detail-wrap div {
		padding: 0;
	}
	.ffs-grid-layout .resource-td-detail-wrap {
		row-gap: var(--ffs-post-item-intra-gap);
	}
	.ffs-grid-layout .resource-td-title,
	.ffs-grid-layout .resource-td-description,
	.ffs-grid-layout .resource-td-authors,
	.ffs-grid-layout .resource-td-publisher {
		-webkit-box-orient: vertical;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		overflow-wrap: anywhere;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
	.ffs-grid-layout .resources-list-item-td-resource .resources-list-item-link:nth-of-type(1) {
		order: 2;
	}
	.ffs-grid-layout .resources-list-item-td-resource .resources-list-item-link:nth-of-type(2) {
		order: 3;
	}
	.ffs-grid-layout .resources-list-item-td-resource .resources-list-item-link:nth-of-type(3) {
		order: 4;
	}
	.ffs-grid-layout .resources-list-item-td-resource .resources-list-item-link:nth-of-type(4) {
		order: 1;
	}
}
@media (min-width: 1600px) {
	.resource-td-thumbnail .ffs-fallback-img-post-title,
	.resource-td-thumbnail .ffs-fallback-img-post-subtext {
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
	.resource-td-thumbnail .ffs-fallback-img-post-title {
		margin-bottom: 0.6em;
		font-size: calc(var(--ffs-item-title-size) * 0.75);
		line-height: calc(var(--ffs-header-line-height) * 0.85);
		letter-spacing: calc(var(--ffs-item-title-letter-spacing) * 0.75);
	}
}
@media (min-width: 2400px) {
	.resource-td-thumbnail .ffs-fallback-img-post-text {
		padding: var(--ffs-posts-gap);
	}
	.resource-td-thumbnail .ffs-fallback-img-post-title {
		margin-bottom: 0.6em;
		font-size: calc(var(--ffs-item-title-size) * 0.9);
		line-height: calc(var(--ffs-header-line-height) * 0.9);
		letter-spacing: calc(var(--ffs-item-title-letter-spacing) * 0.9);
	}
	.ffs-fallback-img-post-subtext {
		line-height: 1.25;
		font-size: var(--ffs-small-text);
	}
}