:root{
	--border: #ccc;
	--text-color: rgb(51, 51, 51);
	--white-text-color: #fff;
	--size: 324px; /* pour harmoniser les tailles des img, peut être modifiée avec d'autres sélecteurs */
}

body{
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	color: var(--text-color);
}

a{
	text-decoration: none;
}

a, a:visited{
	color: var(--primary)
}

a:hover, a:focus{
	color: var(--primary);
	text-decoration: underline;
}

@media (min-width: 768px) {
	h1{
		margin-bottom: 2rem;
	}
}

/* header */
.main-header{
	z-index: 1101;
}

.main-header__top-bar{
	gap: 8px;
	align-items: center;
	justify-content: space-between;
}

@media (max-width: 767px){
	.main-header__top-bar{
		flex-direction: column;
	}
}

.main-header__site-title{
	max-width: 50%;
}

@media (max-width: 767px){
	.main-header__site-title{
		max-width: 100%;
	}
}

.main-header__site-title a{
	font-weight: normal;
}

.main-header__site-title a:has(> *:not(img)){
	display: flex;
	align-items: center;
	gap: 8px;
}

.main-header__site-title a:hover{
	text-decoration: none;
}

.main-header__site-title img{
	max-height: var(--logoHeight);
}

.main-header__site-title *{
	font-size: 1.5rem;
	color: var(--navbarTextColor);
}

.main-header__top-bar-menu{
	display: flex;
	align-items: center;
	gap: 8px;
}

.main-header__top-bar-menu:only-child{
	margin-left: auto;
}

.main-header__top-bar i{
	font-size: 24px;
	color: var(--topbarIconColor);
}

.main-header__top-bar i:hover,
.main-header__top-bar i:focus{
	text-shadow: 1px 1px 1px rgba(51,51,51,.5);
	transition: all 0.25s ease-in-out;
}

.main-header__top-bar #share{
	position: relative;
}

.main-header__top-bar #share > div{
	display: none;
}

.main-header__top-bar #share > div.show{
	display: flex;
}

.main-header__top-bar #share > i{
	cursor: pointer;
}

.main-header__top-bar #share > div{
	position: absolute;
	top: 2.5rem;
	right: 0;
	z-index: 2000;
	display: none;
	flex-direction: column;
	padding: 1rem;
	align-items: center;
	background-color: white;
	border: 1px solid var(--border);
	box-shadow: 0px 1px 6px rgba(51,51,51,.25);
}

.main-header__top-bar #share #qrcode img{
	max-width: none;
}

.main-header__top-bar #share span{
	display: flex;
	margin-top: 1rem;
	align-items: center;
	color: var(--navbarTextColor);
	cursor: pointer
}

.main-header__top-bar #share span:hover,
.main-header__top-bar #share span:focus{
	color: var(--navbarTextColor);
	text-decoration: underline;
	cursor: pointer
}

.main-header__top-bar #share span i{
	margin-left: .5rem;
}

.main-header hr{
	background-color: var(--border);
}

.main-header__main-bar.container{
	padding: 10px 30px;
}

.main-header--center .main-header__main-bar.container,
.main-header--inline-top .main-header__main-bar.container{
	max-width: none;
	padding: 0;
}

@media (max-width: 1024px){
	.main-header--center .main-header__main-bar.container,
	.main-header--inline-top .main-header__main-bar.container{
		padding: 0 .5rem;
	}
}

@media (min-width: 1024px){
	.main-header--center .main-header__main-bar{
		padding: .5rem 0 0;
	}
}

@media (min-width: 768px){
	.main-header--center .main-header__main-bar.container .main-header__site-title,
	.main-header--inline-top .main-header__main-bar.container .main-header__site-title{
		padding: .5rem 0;
	}
}

/* navigation */
.main-header--center .main-navigation,
.main-header--inline-top .main-navigation{
	width: 100%;
}

@media screen and (max-width:1024px){
	.main-header--center .main-navigation,
	.main-header--inline-top .main-navigation{
		width: fit-content;
		margin-left: auto;
	}
}

.main-header--center .main-navigation .navigation,
.main-header--inline-top .main-navigation .navigation{
	justify-content: center;
}

.main-header--center .main-navigation .navigation > li > a,
.main-header--inline-top .main-navigation .navigation > li > a{
	margin: 0;
	padding: 16px;
}

.main-navigation .navigation > li{
	margin: 0;
	cursor: default;
}

.main-navigation.submenu-fitcontent .navigation > li{
	position: relative;
}

.main-navigation .navigation > li > ul{
	display: none;
	opacity: 1;
}

.main-navigation .navigation > li:hover > ul{
	display: flex;
}

.main-navigation.submenu-fitcontent .navigation > li:hover > ul{
	position: absolute;
	left: 0;
	gap: 1rem;
	width: max-content;
	padding: 1rem;
}

.main-navigation .navigation > li > a{
	color: var(--navbarTextColor);
	text-transform: none;
	cursor: pointer;
}

.main-navigation .navigation > li > a:hover{
	font-weight: 600;
}

.main-navigation .navigation > li > a::after,
.main-navigation .navigation > li.active > a::after{
	height: 2px;
}

.main-navigation .navigation > li > a::after,
.main-navigation .navigation > li.active > a::after{
	background: var(--navbarUnderlineColor);
}

.main-navigation .navigation > li > ul{
	border-top: 3px solid var(--navbarUnderlineColor);
	background-color: var(--headerBackground);
	box-shadow: 0px 4px 6px 2px rgba(0,0,0,.11);
}

.main-navigation .navigation > li > a + ul:not(:has(ul)){
	flex-direction: column;
	gap: 0;
	align-items: center;
}

.main-navigation .navigation > li > a + ul li{
	width: max-content;
	max-width: none;
	padding-left: 8px;
}

.main-navigation .navigation > li > ul a,
.main-navigation .navigation > li > ul a:hover,
.main-navigation .navigation > li > ul a:focus{
	color: var(--navbarTextColor);
}

.main-navigation__toggle span{
	background: var(--navbarTextColor);
}

@media (max-width: 1023px){
	.main-navigation__toggle span{
		background: var(--topbarIconColor);
	}
}

.menu-drawer{
	background-color: var(--headerBackground);
}

.menu-drawer .menu-header{
	border-bottom: 0;
}

.menu-drawer .menu-container li.active{
	background-color: var(--headerBackground);
}

.menu-drawer .menu-container a{
	border-bottom: 1px solid var(--navbarTextColor);
	color: var(--navbarTextColor);
}

.menu-drawer .menu-container li.active > a{
	border-bottom: 2px solid var(--navbarTextColor);
}

.menu-drawer .menu-container span{
	display: block;
	border-bottom: 1px solid var(--navbarTextColor);
	color: var(--navbarTextColor);
	padding: 1rem;
	text-align: left;
	text-decoration: none;
}

.menu-drawer .menu-item-has-children > a::after{
	content: "\f054";
	font-family: "Font Awesome 5 Free";
	font-weight: 700;
	background-image: none;
}

.menu-drawer .menu-container li.active .menu-header > a{
	border-bottom: 2px solid var(--navbarTextColor);
}

/* banner */
.banner.alignfull{
	margin: 0;
}

.jcarousel-banner{
	position: relative;
	padding: 0;
    overflow: hidden;
}

.jcarousel-banner.has-text::before{
	content: "";
	position: absolute;
	background-color: #000;
	opacity: .6;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.jcarousel-banner .jcarousel{
    position: relative;
    overflow: hidden;
}

.jcarousel-banner .jcarousel > div{
    position: relative;
    width: 10000em;
	height: fit-content;
}

.jcarousel-banner .jcarousel > div img{
	object-fit: cover;
	width: 100vw;
	height: 100%;
}

.jcarousel-banner .banner__content{
	position: absolute;
	top: 0;
	max-width: none;
	width: 100%;
	height: 100%;
}

.jcarousel-banner .jcarousel-pagination{
	position: absolute;
	z-index: 2;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
}

.jcarousel-banner .jcarousel-pagination a{
	color: white;
}

.jcarousel-banner .jcarousel-pagination a{
	display: inline-block;
    width: 30px;
    height: 4px;
	margin: 3px;
    border-radius: 2px;
    background: #fff;
	opacity: .3;
	transition: opacity .5s ease-in-out;
}

.jcarousel-banner .jcarousel-pagination a.active{
	opacity: 1;
}

/* body */
#content{
	flex-grow: 1;
	background-color: var(--background);
}

@media (min-width: 1024px){
	#main-content{
		padding-top: 2rem;
	}
}

/* fil d'ariane */
#main-content > .breadcrumbs{
	margin-bottom: 1rem;
}

/* footer */
.main-footer{
	margin-top: auto;
	border-top: 2px solid var(--footerBorderTop);
	background-color: var(--footerBackground);
}

.main-footer.theme-bg-color{
	background-color: var(--background);
}

.main-footer.alignfull{
	margin: 0;
	padding: 0 30px;
}

.main-footer .alignfull{
	margin: 0;
}

.main-footer *, .main-footer a, .main-footer__top-menu .navigation a, .main-footer__top-menu .navigation a:hover, .main-footer__top-menu .navigation a:visited{
	color: var(--footerTextColor);
}

.main-footer a{
	text-decoration: none;
}

.main-footer a:hover,
.main-footer a:focus{
	text-decoration: underline;
}

.main-footer__top, .main-footer__bottom{
	background-color: var(--footerBackground);
}

.main-footer.theme-bg-color .main-footer__top,
.main-footer.theme-bg-color .main-footer__bottom{
	background-color: var(--background);
}

.main-footer__top-container{
	display: flex;
	gap: 40px;
	align-items: center;
	justify-content: center;
}

@media screen and (max-width: 1024px){
	.main-footer__top-container{
		flex-direction: column;
		gap: 20px;
	}
}

@media(min-width: 1024px){
	.main-footer__top {
		padding: 80px 0 40px;
	}
}

.main-footer__top-left, .main-footer__top-right{
	max-width: fit-content;
}

.main-footer__bottom{
	padding: 40px 0;
}

.main-footer__bottom-container{
	display: block;
}

.main-footer .links{
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	margin-bottom: 40px;
	justify-content: center;
}

.main-footer .logos{
	--size: 80px;
	display: flex;
	flex-wrap: wrap;
	gap: calc(var(--size) / 2);
	margin: calc(var(--size) / 2) 0;
	justify-content: center;
}

/* charte graphique logo CNRS si ± 4 logos autour */
.main-footer .logos:has(img[alt="CNRS"]):has(> :last-child:nth-child(1)),
.main-footer .logos:has(img[alt="CNRS"]):has(> :last-child:nth-child(2)),
.main-footer .logos:has(img[alt="CNRS"]):has(> :last-child:nth-child(3)){
	margin: var(--size) 0;
}

.main-footer .logos:has(img[alt="CNRS"]):has(> :last-child:nth-child(1)),
.main-footer .logos:has(img[alt="CNRS"]):has(> :last-child:nth-child(2)),
.main-footer .logos:has(img[alt="CNRS"]):has(> :last-child:nth-child(3)){
	gap: var(--size);
	margin: var(--size) 0;
}

.main-footer .logos img{
	max-height: var(--size);
	line-height: normal;
}

@media (min-width: 1024px){
	.main-footer__top-container > div:nth-child(2)::before, .main-footer__top-container > div:nth-child(3)::before{
		background-color: transparent;
	}
}

/* resource show */
.regions-container .sidebar-region::after{
	height: calc(100% + 80px);
	top: -30px;
}

.resource.show .title{
	font-size: 2rem;
}

@media (min-width: 768px){
	.regions-container:not(:has(.main-region)) .sidebar-region{
		width: calc(50% - 30px);
	}
}

@media (min-width: 1200px){
	.regions-container--all:not(:has(.main-region)) .sidebar-region{
		width: calc(50% - 30px) !important;
	}
}

.accordion__trigger:hover, .accordion__trigger:active, .accordion__trigger:focus{
	background-color: var(--primary) !important;
}

/* resource page block - values */
/* property */
.metadata dl{
	margin-bottom: 0.65rem;
}

.metadata dl > .property{
	display: flex;
	align-items: start;
	gap: 0 16px;
	margin-bottom: 0.65rem;
}

@media (max-width: 767px){
	.metadata dl > .property{
		flex-direction: column;
	}
}

.regions-container--all .metadata dl > .property,
.sidebar-region .metadata dl > .property{
	flex-direction: column;
}

.metadata dl > .property dt{
	margin: 0;
	font-size: 1rem;
}

.metadata dl > .property dt,
.metadata dl > .property:last-child,
.metadata dl > .property:last-child dt{
	margin-bottom: 0;
}

.metadata dl > .property dt:not(.sidebar-region .metadata dl > .property dt){
	float: none;
	padding: 0;
}

.regions-container--all .metadata dl > .property dt:not(.sidebar-region .metadata dl > .property dt),
.sidebar-region .metadata dl > .property dt:not(.sidebar-region .metadata dl > .property dt){
	float: none;
	width: 100%;
	padding: 0;
}

.regions-container--all .metadata dl > .property dt,
.sidebar-region .metadata dl > .property dt{
	width: 100%;
	padding: 0;
}

/* property - values */
.property .values{
	width: calc(100% - 160px);
}

@media (max-width: 767x){
	.property .values{
		width: 100%;
	}
}

.regions-container--all .metadata dl > .property .values,
.sidebar-region .metadata dl > .property .values{
	width: 100%;
}

.property .values.inline{
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

#main-content .property .values.inline{
	margin: 0;
}

#main-content .property .values.inline .value:not(:last-child) .value-content::after{
	content: ";";
}

.metadata dl > .property .values dd{
	margin: 0 0 4px;
}

.metadata dl > .property .values.inline dd{
	margin: 0;
}

.metadata dl > .property dd:not(.sidebar-region .metadata dl > .property dd){
	margin-left: 0;
}

.metadata dl > .property dd:last-child,
.metadata dl > .property .values:not(.inline) dd:last-child,
.metadata dl > .property dd p:last-child{
	margin-bottom: 0 !important;
}

.value[class*="cc-"] a{
	display: flex;
	align-items: center;
	gap: 4px;
	width: fit-content;
}

.value.cc-zero a::before{content: url(../img/cc-zero.png);}
.value.cc-by a::before{content: url(../img/cc-by.png);}
.value.cc-by-sa a::before{content: url(../img/cc-by-sa.png);}
.value.cc-by-nc a::before{content: url(../img/cc-by-nc.png);}
.value.cc-by-nd a::before{content: url(../img/cc-by-nd.png);}
.value.cc-by-nc-sa a::before{content: url(../img/cc-by-nc-sa.png);}
.value.cc-by-nc-nd a::before{content: url(../img/cc-by-nc-nd.png);}

.value a:not(.logoUrl, :has(+ .logoUrl))[target="_blank"]::after{
	content: "\f35d";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	margin-left: 4px;
}

.value .logoUrl img{
	width: auto;
	height: 24px;
	margin-left: 1rem;
	vertical-align: middle;
}

.linked-resource .resource-link{
	display: inline-flex;
	align-items: center;
}

.linked-resource img{
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	margin-right: 1rem;
	object-fit: cover;
}

/* affichage liste medias */
.resource.show .media-list > .property{
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.metadata .media-list dd{
	margin: 0 !important;
}

.metadata .media-list .resource dd{
	border: 0;
}

/* affichage liste medias - metadata */
.resource.show .media-list-metadata > .property{
	gap: .5rem;
}

.media-list-metadata .resource{
	padding: .5rem;
}

.media-list-metadata .resource-metadata{
	width: 100%;
	gap: 4px;
}

.resource.show .media-list-metadata .property .resource-link img{
	width: 100%;
	height: 200px;
	object-fit: cover;
}

/* affichage liste medias - grille */
.resource.show .media-list.grid.small{
	--size: 200px;
}

.resource.show .media-list.grid.large{
	--size: 400px;
}

.resource.show .media-list.grid .property{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--size), 1fr));
	gap: .5rem;
}

.resource.show .media-list.grid .property > dt{
	grid-column: 1/-1;
}

.resource.show .metadata .media-list.grid .resource-link{
	flex-direction: column;
}

.resource.show .metadata .media-list.grid .resource-link img{
	width: 100%;
	height: var(--size);
	object-fit: cover;
}

.resource.show .metadata .media-list .resource{
	display: flex;
	gap: 4px;
	width: 100%;
}

/* pages */
/* pages blocks */
.block{
	height: fit-content;
}

/* la classe "small" est à indiquer dans les classes d'un bloc */
.small .grid{
	--size: 200px;
}

/* la classe "large" est à indiquer dans les classes d'un bloc */
.large .grid{
	--size: 400px;
}

/* asset */
.assets.grid{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--size), 1fr));
	gap: 16px;
}

.assets.grid .asset{
	display: flex;
	flex-direction: column;
	height: fit-content;
	gap: 8px;
	padding-bottom: .5rem;
	border: var(--border);
	background-color: #fff;
	box-shadow: 0px 1px 6px rgba(51,51,51,.25);
}

.assets.grid .asset .link-title{
	padding: 0 1rem;
	font-size: 1rem;
}

.assets.grid .asset .caption{
	padding: 0 1rem;
}

.assets.grid.crop .asset img{
	width: 100%;
	height: var(--size);
	object-fit: cover;
}

/* browse preview */
.preview-block{
	margin-bottom: 0 !important;
}

/* browse preview list */
.preview-block.list .resource-list .resource__thumbnail{
	order: 0;
	margin: 0;
	padding: 16px;
}

.resource-list .resource__thumbnail img{
	width: 200px;
	height: 200px;
}

.preview-block.list .resource-list .resource__content{
	padding: 16px;
}

/* browse preview grid */
.preview-block.grid .resource-grid{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--size), 1fr));
	gap: 16px;
	height: fit-content;
}

.preview-block.grid .resource-grid .resource{
	position: relative;
	height: fit-content;
}

.preview-block.grid .resource-grid .resource__thumbnail img{
	height: var(--size);
}

/* item sets tree */
.block-item-sets-tree ul{
	padding: 0;
	list-style: none;
}

.block-item-sets-tree ul li{
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	padding: 16px;
}

.block-item-sets-tree > ul > li:not(:last-child){
	border-bottom: 1px solid var(--border);
}

.block-item-sets-tree > ul > li > ul{
	flex-basis: 100%;
	margin-left: 32px;
}

.block-item-sets-tree .thumbnail{
	flex: 0 0 var(--size);
	text-align: center;
}

.block-item-sets-tree .thumbnail img{
	width: auto;
	max-width: var(--size);
	height: auto;
	max-height: var(--size);
}

.block-item-sets-tree .item-set{
	display: block;
	flex: 1;
}

.block-item-sets-tree .item-set > a{
	font-size: 1.25rem;
}

.block-item-sets-tree .item-set .description{
	display: -webkit-box;
	margin-top: 16px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

/* html */
.block-html p:last-child{
	margin-bottom: 0;
}

/* line break */
/* le template ajoute la variable en attribut style */
.block-lineBreak:has(.break[style]){
	background-color: transparent !important;
}

.block.block-lineBreak:has(.break[style]) .break{
	border-bottom: 2px solid var(--blockBgColor);
}

/* list of pages */
.block-listOfPages ul:empty{
	margin: 0;
}

/* list of sites */
.list-of-sites{
	margin: 0;
}

.list-of-sites .site-list{
	gap: 16px;
}

.list-of-sites.grid .site-list{
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(var(--size), 1fr));
}

.list-of-sites .site-list .site{
	gap: 8px;
	margin: 0 !important;
}

.list-of-sites.grid .site-list .site{
	display: block;
	height: fit-content;
	border: var(--border);
	background-color: #fff;
	box-shadow: 0px 1px 6px rgba(51,51,51,.25);
}

.list-of-sites .site-list .site .site-thumbnail{
	flex: 0 0 var(--size);
}

.list-of-sites .site .site-thumbnail img{
	width: 100%;
	max-height: var(--size);
}

.list-of-sites.grid .site-thumbnail img{
	width: 100%;
	height: var(--size);
	max-height: var(--size);
	object-fit: cover;
}

.list-of-sites.grid .site-text{
	padding: 15px;
}

.list-of-sites.grid .site-summary{
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

/* media */
.media-embed.layout-vertical .resource .iiif_presentation{
	width: auto;
}

/* advanced search */
.block-searchingForm.hide-searchbar #advanced-search-form-wrapper{
	display: none;
}

#advanced-search-form form{
	max-width: 840px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 25px;
}

#advanced-search-form form > fieldset{
	display: flex;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 25px;
	margin-bottom: 25px;
	padding: 20px 25px;
}

#advanced-search-form form > fieldset > div{
	flex-basis: 100%;
}

#advanced-search-form form fieldset .field{
	margin: 0;
}

#advanced-search-form form fieldset .field .field-meta label{
	font-size: 1rem;
}

#advanced-search-form form fieldset .field input[type="search"]{
	height: auto;
	padding: 10px 15px;
	border: 1px solid var(--border);
	border-radius: 3px;
	line-height: 1.4;
	text-overflow: ellipsis;
}

#advanced-search-form form .field .inputs input[type="checkbox"]{
	flex: 0;
	width: fit-content;
	min-width: 1.2rem;
	max-width: none;
}

#advanced-search-form-wrapper #advanced-search-form form .field .inputs:has(> label){
	flex-direction: column;
	flex-wrap: nowrap;
	max-height: 240px;
	padding-left: 1rem;
	border-left: 3px solid #ececec;
	overflow-y: scroll;
}

#advanced-search-form-wrapper #advanced-search-form form .field .inputs > label{
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 0;
	width: fit-content;
	min-width: fit-content;
	max-width: none;
	margin: 0;
}

#advanced-search-form-wrapper #advanced-search-form form .field .inputs > label input{
	margin: 0 !important;
}

#advanced-search-form-wrapper #advanced-search-form form .field .inputs > label input{
	transform: translateY(0.1125rem);
}

.range-double .range-numerics{
	margin-top: 8px;
}

.range-double .range-numeric{
	display: flex;
	align-items: center;
	gap: 4px;
}

#advanced-search-form .range-double .range-numeric input{
	margin: 0 !important;
	border: 1px solid var(--border);
}

#search-filters.search-filters-advanced{
	padding: 0;
	box-shadow: none;
}

#search-filters.search-filters-advanced .filter{
	gap: 4px;
	justify-content: flex-start;
	box-shadow: none;
}

#search-filters.search-filters-advanced .filter select{
	width: fit-content;
	margin: 0;
}

#search-filters.search-filters-advanced .filter > input[type="text"]{
    width: stretch;
    flex: 1 0 auto;
	margin: 0;
}

#search-filters.search-filters-advanced .filter .field{
	flex: 0;
	width: auto;
	height: fit-content;
	min-width: fit-content;
	max-width: none;
	align-self: center;
	margin-left: 0;
}

#search-filters .filter .field .inputs button{
	flex: 0;
	width: auto;
	min-width: fit-content;
	max-width: none;
}

fieldset#search-item-sets-tree{
	padding: 0;
	box-shadow: none;
}

select#search-item-sets-tree{
	padding: 10px 15px;
}

.search-form-buttons{
	display: flex;
	gap: 4px;
	justify-content: end;
}

.search-form-buttons .search-submit{
	float: none;
}

.search-results .search-filters .filter{
	background-color: var(--primary);
}

.search-results .search-filters .filter .filter-value,
.search-results .search-filters .filter .filter-value::after{
	color: white;
}

#search-filters .search-filter-action{
	font-weight: bold;
}

button.add-value, button.remove-value{
	padding: 0 10px;
}

/* reference */
.reference-block h3{
	margin: 1.5rem 0;
}

.reference-block h3:first-child{
	margin-top: 0;
}

.reference-block .pagination{
	border: 0;
}

.reference-block.columns .references-list{
	column-count: 3;
	column-gap: 1rem;

	& > h3{
		column-span: all;
	}
}

/* Advanced Search - search page */
#search-page .metadata{
	margin-bottom: 2rem;
}

#search-page #advanced-search-form-wrapper{
	display: none;
}

/* facets */
.search-results-wrapper .search-facets{
	flex: 1;
	min-width: auto;
	max-width: none;
}

.facets-actions{
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
	align-items: flex-start;
}

#facets-apply{
	margin-bottom: 4px;
}

.facets-reset, .facets-reset:hover, .facets-reset:focus{
	text-decoration: none;
}

#search-refine{
	display: block;
	width: 100%;
	padding: 10px 15px;
	border: 1px solid var(--border);
	border-radius: 3px;
	line-height: 1.4;
	text-overflow: ellipsis;
}

.facets-list{
	margin-top: 16px;
}

.facet-elements{
	width: 100%;
	padding: 0 0 0 1rem;
	margin: 0 0 1rem;
	border-left: 3px solid #ececec;
}

#form-facets .facet h4,
#form-facets .facet > button{
	font-size: 20px;
}

.facets #form-facets .facet-button{
	background-color: transparent;
	border-bottom: 2px solid var(--border);
	font-weight: normal;
	text-transform: none;
	color: black;
}

.facets #form-facets .facet-button::after{
	position: relative;
}

#form-facets .facet button:hover:not(.disabled){
	color: black;
	background-color: transparent;
	border-bottom-color: var(--primary);
}

#form-facets .facet button.facet-button.collapse{
	border-bottom-width: 4px;
	border-bottom-color: var(--primary);
}

.facet-elements:has(.facet-see-more) ul{
	margin-bottom: 0;
	scrollbar-gutter: stable;
	overflow-y: hidden;
}

.facet-elements:has(.facet-see-more):not(:has(ul [hidden])) ul{
	overflow-y: scroll;
}

.facet-item{
	display: flex;
	gap: 4px;
}

.facet-item input[data-url],
.facet-items .facet-item a::before{
	display: none;
}

.facet-item label, .facet-item a span{
	color: var(--primary);
}

.facet-item label:hover{
	cursor: pointer;
	text-decoration: underline;
}

.facet-item .count{
	color: var(--text-color);
}

.facet-see-more-or-less,
.facet-see-more-or-less:focus{
	color: var(--text-color);
}

select{
	background-image: url("../img/arrow-down-blue.svg");
	background-position: calc(100% - 8px) center;
}

/* results */
.search-results-wrapper .search-results{
	flex: 3;
}

.search-results-part.search-results-header,
.search-results-part.search-results-footer{
	align-items: center;
}

.search-filters{
	list-style: none;
}

.search-results-count .pagination{
	margin: 0;
	padding: 0;
	border: 0;
}

.search-results-wrapper{
	gap: 2rem;
}

.search-results .resource-list.list{
	flex-direction: column;
	gap: 4px
}

.resource-list > .resource{
	box-shadow: 0px 1px 6px rgba(51,51,51,.25);
	transition: all 0.25s ease-in-out;
}

.resource-list > .resource:hover{
	box-shadow: 0px 1px 6px rgba(51,51,51,.5);
}

.resource-list > .resource.value:not(:last-child){
	border-bottom: 1px solid var(--border);
}

.search-results-wrapper .search-results .resource-list.list > .resource{
	flex-wrap: nowrap;
	padding: 8px;
	gap: 4px;
}

.search-results-wrapper .search-results .resource-list.grid > .resource{
	height: fit-content;
	row-gap: 0;
	padding: 0;
	align-items: center;
}

.search-results .resource-list.list .resource .resource-metadata{
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex-basis: calc(100% - 200px);
}

.search-results .resource-list.grid .resource .resource-metadata{
	display: block;
}

.search-results .resource-list.grid .resource-metadata > *:not(.resource-heading){
	display: none;
}

.resource-list .resource .resource-metadata .resource-heading{
	font-weight: normal;
	font-size: 20px;
}

.search-results-wrapper .search-results .resource-list.grid .resource-heading{
	padding: 15px;
}

.search-results-wrapper .search-results .resource-list.list .resource-heading{
	flex-basis: auto;
}

.search-results-wrapper .search-results .resource-list .resource-heading a{
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.search-results-wrapper .search-results .resource-list.grid .resource-heading a{
	font-size: 18px;
	line-height: normal;
}

.search-results .resource-list.list .resource .resource-metadata dl{
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.search-results .resource-list.list .resource .resource-metadata .property{
	display: flex;
	gap: 8px;
}

.search-results .resource-list.list .resource .resource-metadata .property *{
	font-size: 16px;
}

.search-results .resource-list.list .resource .resource-metadata .property dt{
	flex-basis: 25%;
}

.search-results .resource-list.list .resource .resource-metadata .property .values{
	flex-basis: 75%;
}

.search-results .resource-list.list .resource .resource-metadata .property dd.value{
	margin: 0;
}

.search-results .resource-list.list .resource .resource-metadata .property dd.value:not(:last-child){
	margin: 0 0 4px;
}

.search-results .resource-list.list .resource .resource-metadata dl .resource{
	border: 0;
	box-shadow: none;
}

.search-results .resource-list.list .resource .resource-metadata dl .resource .resource-link{
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-results .resource-list.list .resource .resource-metadata dl .resource img{
	width: auto;
	max-height: 40px;
}

.search-results-wrapper .search-results .resource-list.list .resource-thumbnail{
	display: flex;
    flex-basis: 200px;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.search-results .resource-list.grid .resource-thumbnail{
	order: -1;
	width: 100%;
	max-height: 234px;
}

.search-results-wrapper .search-results .resource-list.grid .resource-thumbnail a{
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 234px;
	background-color: #e9e9ed;
	overflow: hidden;
}

.search-results-wrapper .search-results .resource-list.list .resource-thumbnail .resource-link img{
	max-width: 200px;
	max-height: 200px;
}

.search-results-wrapper .search-results .resource-list.grid .resource-thumbnail img{
	width: auto;
	max-width: 100%;
	max-height: 234px;
}

/* mapping */
#main-content .leaflet-popup-content{
	margin: 0;
	font-size: 1rem;
	line-height: normal;
}

.leaflet-popup-content .resource-title{
	padding: .5rem;
}

.leaflet-container a.leaflet-popup-close-button span{
	font-size: 1.5rem;
	color: white;
}