/* header */

.files-header {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	justify-content: space-between;
	margin: 1.5rem 0 0;
}

hr.files-divider:not(.fc-divider):not(.formBreak) {
	margin: 0.75rem 0 0.25rem 0;
}

/* breadcrumbs */


.files-breadcrumbs .files-breadcrumbs-list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.files-breadcrumbs .files-breadcrumbs-list li {
	margin: 0;
	padding: 0;
}

.files-breadcrumbs li + li::before {
	content: ">";
	opacity: 0.6;
	padding: 0 0.5rem;
}

/* list rows */

/* The theme draws a separator line between nodes; the module design has none */
.collection.collection--categories .node,
.collection.collection--files .node {
	border: 0;
	margin: 0;
	padding: 0.5rem 0;
}

.collection.collection--categories + .collection.collection--files {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}

/* categories and file icons */

/*
 * Icons are centred on the first line of text (1lh) instead of fixed pixel offsets so they stay
 * aligned whatever font a site template uses. Two-class selectors so they win over the
 * single-class nudges that site stylesheets (loaded after module CSS) commonly add.
 */
.field.field--category--title,
.field.field--file--title,
.field.field--category--title > p,
.field.field--file--title > p {
	background-position: 0 2px;
	background-position: 0 calc((1lh - 16px) / 2);
	background-repeat: no-repeat;
	background-size: 16px 16px;
}

.field.field--category--title,
.field.field--file--title {
	padding: 0 22px 0 24px;
	position: relative;
}

.field.field--category--title {
	background-image: url( '/core/websites/admin/www/images/folder.gif' );
}

/* Site templates often give <p> its own line-height, so when the title sits in a <p> the icon moves onto it to share that line */
.field.field--category--title:has(> p),
.field.field--file--title:has(> p) {
	background-size: 0 0;
}

.field.field--category--title > p,
.field.field--file--title > p {
	background-image: inherit;
	margin-left: -24px;
	padding-left: 24px;
}

.field--category--title a {
	display: inline-block;
	margin-left: -24px;
	padding-left: 24px;
}

/* files */

.node .field.field--file.field--file--title {
	display: flex;
	justify-content: space-between;
	padding-bottom: 0;
	padding-left: 24px;
	padding-right: 0;
}

.node-actions,
.node-actions-menu {
	display: flex;
	align-items: center;
	gap: 14px;
	justify-content: flex-end;
}

.node-actions form {
	flex: none;
	margin: 0;
	padding: 0;
	width: auto;
}

.field--file--title .node-info > a {
	display: inline;
	margin-left: -24px;
	padding-left: 24px;
}

.field--file--title button {
	border: none;
	cursor: pointer;
	outline: none;
}

.field--file--title button.bookmark {
	background: url( '/core/public/shared/assets/images/icons/star_cold.png' ) 0 0 no-repeat;
	height: 16px;
	position: absolute;
	right: 0;
	text-indent: -999999px;
	top: 2px;
	width: 16px;
}

.field--file--title button.bookmark.create:hover {
	display: block;
	background: url( '/core/public/shared/assets/images/icons/star.png' ) 0 0 no-repeat;
	opacity: 1;
}

.field--file--title button.bookmark.delete {
	display: block;
	opacity: 1;
	background: url( '/core/public/shared/assets/images/icons/star.png' ) 0 0 no-repeat;
}

.field--file--title button.bookmark.delete:hover {
	display: block;
	opacity: 0.5;
	background: url( '/core/public/shared/assets/images/icons/star_cold.png' ) 0 0 no-repeat;
}

.field.field--file--description {
	margin: 0;
}

.field--file--description p {
	margin-left: 24px;
}

.field--file--description p:first-child {
	margin-top: 0;
	padding-top: 0;
}

.field--file--categories {
	padding: 0 22px 0 24px;
}

.filter-row {
	margin-bottom: 12px;
	overflow: auto;
}

.filter-row .filter-row-options {
	padding: 0.4rem;
}

.filter-row .filter-row-options .filter-row-option {
	display: block;
	width: 100%;
	padding-bottom: 0.3rem;
}

.filter-row .filter-row-options .filter-row-option input[type='checkbox'] {
	width: auto !important;
	margin-right: 0.3rem;
}

.filter-row .filter-row-options .filter-row-options-group {
	font-weight: bold;
}

.filter-row .filter-row-options .filter-row-show-all,
.filter-row .filter-row-options .filter-row-show-less {
	display: inline-block;
	margin-top: 0.5rem;
}

.files-filter {
	box-sizing: border-box;
	width: 100%;
}

.files-filter .filter-row {
	box-sizing: border-box;
	margin-bottom: 1rem !important;
	overflow: visible;
	padding: 0;
	width: 100%;
}

.files-filter .filter-row > label {
	display: block;
	margin: 0 0 0.35rem;
	padding: 0;
}

.files-filter .filter-row > input[type="text"],
.files-filter .filter-row > select,
.files-filter .filter-row .select2-container {
	box-sizing: border-box !important;
	display: block;
	float: none !important;
	margin: 0;
	max-width: none !important;
	width: 100% !important;
}

.files-filter .filter-row > input[type="text"] {
	height: 40px;
	padding: 0 0.75rem;
}

.files-filter .filter-row .select2-container .select2-choice {
	background: #fff;
	background-image: none;
	border: 1px solid #999;
	border-radius: 0;
	box-shadow: none;
	box-sizing: border-box;
	filter: none;
	height: 40px;
	line-height: 38px;
	padding: 0 0.75rem;
}

.files-filter .filter-row .select2-container .select2-choice > .select2-chosen {
	line-height: 38px;
	margin-right: 26px;
}

.files-filter .filter-row .select2-container .select2-choice .select2-arrow {
	background: #fff;
	background-image: none;
	border-left: 0;
	border-radius: 0;
	filter: none;
	width: 26px;
}

/* The Select2 sprite places the up arrow 18px in, so the icon must stay 18px wide inside the wider arrow box */
.files-filter .filter-row .select2-container .select2-choice .select2-arrow b {
	margin: 0 auto;
	width: 18px;
}

.files-filter .filter-row .select2-container-multi .select2-choices {
	background: #fff;
	background-image: none;
	border: 1px solid #999;
	border-radius: 0;
	box-shadow: none;
	box-sizing: border-box;
	filter: none;
	margin: 0;
	min-height: 40px;
	padding: 4px;
}

.files-filter .filter-row .select2-container-multi.select2-dropdown-open .select2-choices,
.files-filter .filter-row .select2-dropdown-open .select2-choice {
	border-radius: 0;
	box-shadow: none;
}

.files-filter .filter-row .select2-container-multi .select2-choices .select2-search-choice {
	background: #f5f5f5;
	background-image: none;
	border: 1px solid #999;
	border-radius: 0;
	box-shadow: none;
	filter: none;
	line-height: 13px;
	margin: 3px 0 3px 5px;
	padding: 3px 5px 3px 18px;
}

.files-filter .filter-row .select2-container-multi .select2-choices .select2-search-choice-focus {
	background: #ebebeb;
	background-image: none;
	filter: none;
}

.files-filter .filter-row .select2-container-multi .select2-choices .select2-search-choice > div {
	display: inline;
	line-height: 13px;
}

.files-filter .filter-row .select2-container-multi .select2-choices .select2-search-field .select2-input {
	height: 28px;
	margin: 0;
	padding: 0 6px;
}

.files-filter .filter-row .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close {
	background: url("/core/libraries/select2/assets/select2.png") right top no-repeat !important;
	border: 0 none !important;
	box-shadow: none !important;
	display: block !important;
	height: 13px !important;
	left: 3px !important;
	margin: 0 !important;
	padding: 0 !important;
	position: absolute !important;
	right: auto !important;
	text-decoration: none !important;
	top: 4px !important;
	width: 12px !important;
}

.files-filter .filter-row .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:after {
	content: none !important;
}

.files-filter .filter-row.ui-form-buttons {
	margin-bottom: 0;
	margin-top: 0.25rem;
	padding: 0;
	width: 100%;
}

.files-filter .filter-row.ui-form-buttons .ui-form-field.ui-form-button {
	align-items: stretch;
	box-sizing: border-box;
	display: flex;
	float: none;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	width: 100%;
}

.files-filter .filter-row.ui-form-buttons .ui-form-field.ui-form-button .form_button,
.files-filter .filter-row.ui-form-buttons .ui-form-field.ui-form-button .filter-reset {
	align-items: center;
	box-sizing: border-box !important;
	display: inline-flex !important;
	flex: 1 1 0;
	font-size: inherit;
	height: 40px !important;
	justify-content: center;
	line-height: 1.2;
	margin: 0 !important;
	max-width: none;
	min-height: 40px !important;
	min-width: 0 !important;
	padding: 0 0.75rem !important;
	text-align: center;
	width: 100%;
}

.files-filter .filter-row.ui-form-buttons .ui-form-field.ui-form-button .filter-reset {
	border: 2px solid currentColor !important;
	text-decoration: none !important;
}

.files-filter .filter-row.ui-form-buttons .ui-form-field.ui-form-button .filter-reset:after {
	content: none !important;
}


/*Front-end form*/
.module-files .ui-form-error {
	color: #ff0000;
}

.module-files.controller-pages-files .ui-form-fieldset.category-fieldset .select2-container.select2-container-multi {
	margin-bottom: 1.5rem;
}

.module-files.controller-pages-files .ui-form-fields {
	margin-bottom: 1.5rem;
	display: block;
}

.module-files.controller-pages-files .administration-fieldset .ui-form-fields:last-of-type {
	margin-bottom: 0;
}

.module-files.controller-pages-files .ui-form-field.error {
	background-color: transparent;
	padding: 0;
	margin-top: 0;
}

.module-files.controller-pages-files .ui-form-error {
	display: none;
}

.module-files.controller-pages-files .ui-form-label span {
	font-weight: 700;
}

.module-files.controller-pages-files .ui-form-label em {
	display: none;
}

.module-files.controller-pages-files .ui-form-field .ui-form-label label {
	display: inline-block;
	margin-bottom: 0.25rem;
}

.module-files.controller-pages-files .ui-form-field .ui-form-label span {
	display: inline-block;
	margin-bottom: 0.25rem;
}

.module-files.controller-pages-files .ui-form-field.required .ui-form-label::after {
	content: "*";
	color: #ee0000;
	padding-left: 5px;
}

.module-files.controller-pages-files a.select2-choice {
	margin-bottom: 0;
}

.module-files.controller-pages-files a.select2-search-choice-close {
	border: 0 none;
	margin-bottom: 0;
	box-shadow: none;
}

.module-files.controller-pages-files .ui-form-checkboxes ul {
	list-style-type: none;
	padding-left: 0;
	margin-bottom: 0;
}

.module-files.controller-pages-files .ui-form-checkboxes ul label,
.module-files.controller-pages-files label[for="Deleteupload"] {
	display: inline;
}

.module-files.controller-pages-files .cms_buttons {
	margin-top: 10px;
}


.module-files.controller-pages-files .cms_form_button {
	cursor: pointer;
}

@media (max-width: 479px) {
	.module-files.controller-pages-files input[type="text"],
	.module-files.controller-pages-files input[type="file"],
	.module-files.controller-pages-files select,
	.module-files.controller-pages-files textarea,
	.module-files.controller-pages-files .select2-container {
		width: 100% !important;
	}
}

.module-files.controller-pages-files .field--file--title button.deletefile {
	background: rgba(0, 0, 0, 0) url("/core/public/shared/assets/images/icons/delete.gif") no-repeat 0 0 / 16px 16px;
	height: 16px;
	position: absolute;
	right: 20px;
	text-indent: -999999px;
	top: 2px;
	transition: opacity 0.2s;
	width: 16px;
}

.module-files.controller-pages-files .field--file--title button.deletefile:hover {
	opacity: 0.7;
}


.controller-manage-categories form fieldset .legend {
	background: #767474;
	color: #ffffff;
	font-weight: bold;
	padding: 6px 6px;
}

.controller-manage-all form fieldset .note,
.controller-manage-categories form fieldset .note {
	color: #666666;
	margin: 10px 0 6px 12px;
	padding: 0 6px 0 0;
}

.collection--all-files > .collection {
	padding: 3px 0 0 0;
}

.collection--all-files li.field.field--category.field--category--title {
	margin-bottom: 0.5rem;
}

.collection.collection--all-files li {
	margin-top: 0.5rem;
}

.collection--all-files .collection > .collection--files > .field--file--description > p {
	margin-bottom: 1rem;
}

.collection--all-files .collection > .collection--files > .field--file:last-child.field--file--description > p {
	margin-bottom: 0;
}

.collection-table tr:first-child td {
	border-top: 1px solid #d0d0d0 !important;
}

/* Below styles are used for the fancytree files template */

div#fancytree.collection--all-files .fancytree-container {
	outline: none !important;
	border: 0 !important;
}

div#fancytree.collection--all-files .fancytree-plain.fancytree-container.fancytree-treefocus span.fancytree-active span.fancytree-title,
div#fancytree.collection--all-files .fancytree-plain.fancytree-container.fancytree-treefocus span.fancytree-selected span.fancytree-title {
	background-color: transparent;
	border-color: transparent;
}

div#fancytree.collection--all-files .fancytree-plain span.fancytree-node:hover span.fancytree-title {
	background-color: transparent;
	border-color: transparent;
}

div#fancytree.collection--all-files .fancytree-plain span.fancytree-active span.fancytree-title,
div#fancytree.collection--all-files .fancytree-plain span.fancytree-selected span.fancytree-title {
	border-color: transparent;
}

div#fancytree.collection--all-files .fancytree-icon {
	cursor: pointer;
}

div#fancytree.collection--all-files span.fancytree-title {
	margin-left: 0;
	padding-left: 2px;
	white-space: normal;
	width: 100%;
	padding-right: 35px;
}

div#fancytree.collection--all-files span.fancytree-title p {
	cursor: default;
}

div#fancytree.collection--all-files span.fancytree-folder span.fancytree-title {
	padding-left: 6px;
}

div#fancytree.collection--all-files ul.fancytree-container span.fancytree-title {
	border: 0;
}

div#fancytree.collection--all-files span.fancytree-custom-icon {
	display: none;
}

div#fancytree.collection--all-files span.fancytree-node {
	margin-top: 20px;
}

div#fancytree.collection--all-files span.fancytree-ico-c {
	margin-top: 14px;
}

div#fancytree.collection--all-files ul.fancytree-container > li > span.fancytree-ico-c {
	margin-top: 20px;
}

div#fancytree.collection--all-files ul.fancytree-container .field--file--description {
	cursor: default;
}

div#fancytree.collection--all-files ul.fancytree-container {
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	color: inherit;
	overflow: hidden;
}

div#fancytree.collection--all-files {
	max-width: 856px;
}

.collection.collection--files .node.node--file button,
.collection.collection--files .node.node--file button:hover {
	background-color: transparent !important;
	position: relative !important;
	padding: 0 !important;
	margin: 0;
	min-width: 0;
	top: 0;
	right: 0;
	border: 0 !important;
	display: block;
}

.collection.collection--files .node.node--file a.editfile {
	background: url( '/core/public/shared/assets/images/icons/pencil.png' ) 0 0 no-repeat;
	display: block;
	height: 16px;
	margin: 0;
	overflow: hidden;
	text-indent: -999999px;
	width: 16px;
}

/* Desktop shows the actions inline; mobile moves them into a dropdown */
.collection.collection--files .node.node--file .node-actions-toggle {
	display: none;
}

@media (max-width: 767px) {
	/* The theme clips these containers, which hides the dropdown; flow-root keeps containing floats */
	.collection.collection--files,
	.collection.collection--files .node.node--file {
		display: flow-root;
		overflow: visible;
	}

	.node-actions {
		position: relative;
	}

	.collection.collection--files .node.node--file .node-actions-toggle {
		background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23666666'%3E%3Ccircle cx='8' cy='3' r='1.5'/%3E%3Ccircle cx='8' cy='8' r='1.5'/%3E%3Ccircle cx='8' cy='13' r='1.5'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
		display: block;
		height: 32px;
		overflow: hidden;
		text-indent: -999999px;
		width: 32px;
	}

	.node-actions-menu {
		align-items: stretch;
		background-color: Canvas;
		border-radius: 4px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
		display: none;
		flex-direction: column;
		gap: 0;
		min-width: 200px;
		padding: 0.25rem 0;
		position: absolute;
		right: 0;
		top: 100%;
		z-index: 10;
	}

	.node-actions.is-open .node-actions-menu {
		display: flex;
	}

	.collection.collection--files .node.node--file .node-actions-menu a.editfile,
	.collection.collection--files .node.node--file .node-actions-menu button {
		background-position: 12px center;
		background-size: 16px 16px;
		color: inherit;
		display: block;
		font: inherit;
		height: auto;
		line-height: 40px;
		opacity: 1;
		padding: 0 12px 0 40px !important;
		text-align: left;
		text-decoration: none;
		text-indent: 0;
		white-space: nowrap;
		width: 100%;
	}

	.collection.collection--files .node.node--file .node-actions-menu a.editfile:hover,
	.collection.collection--files .node.node--file .node-actions-menu button:hover {
		opacity: 0.7;
	}
}

@media (max-width: 1200px) {
	div#fancytree.collection--all-files {
		max-width: 754px;
	}
}

@media (max-width: 991px) {
	div#fancytree.collection--all-files ul.fancytree-container {
		margin-bottom: 20px;
	}

	div#fancytree.collection--all-files {
		max-width: 100%;
	}

	div#fancytree.collection--all-files {
		max-width: 754px;
	}
}

.file-icon {
	height: 16px;
	line-height: 16px;
	display: inline-block;
	padding-left: 21px;
	background-repeat: no-repeat;
}

.icon-add-new-folder {
	padding-right: 9px !important;
}

.add-multiple-files {
	margin-left: 9px;
}

.restricted-file {
	color: #ee0000;
}
