div.cfs_root {
	--gap: 1.5rem;
	--primary: #196197;
	--primary-hover: #dceaf5;
	--border: #ccc;
	--altezza: 3em;
	--radius: 3px;
	display: block;
	width: 100%;
	overflow: hidden;
	margin-bottom: calc(2* var(--gap));
}

/* ------------------------------
ERRORE
------------------------------ */

div.cfs_root.cfs_errore {
	color: red;
	border: 1px solid currentColor;
	padding: var(--gap);
}


/* ------------------------------
HEADER
------------------------------ */

div.cfs_root>div.cfs_header {
	display: flex;
	gap: var(--gap);
	align-items: end;
	margin-bottom: var(--gap);
}

div.cfs_root>div.cfs_header>*:empty {
	display: none;
}

div.cfs_root>div.cfs_header>h2.cfs_titolo {
	margin: 0;
	margin-right: auto;
}

div.cfs_root>div.cfs_header>div>a,
div.cfs_root>div.cfs_header>div>button,
div.cfs_root>div.cfs_header>div>input {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--altezza);
	border: 1px solid var(--border);
	background-color: transparent;
	color: inherit;
	white-space: nowrap;
	border-radius: var(--radius);
	padding-left: 1em;
	padding-right: 1em;
	text-decoration: none !important;
}

div.cfs_root>div.cfs_header>div>a:hover,
div.cfs_root>div.cfs_header>div>button:hover {
	color: var(--primary);
	border-color: currentColor;
	background-color: var(--primary-hover);
}

div.cfs_root>div.cfs_header>div>input:focus,
div.cfs_root>div.cfs_header>div>input[value]:not([value=""]) {
	color: var(--primary);
	border: 1px solid currentColor;
	outline: none;
}

div.cfs_root>div.cfs_header>div.cfs_reset>button {
	color: var(--wp--preset--color--vivid-red);
	border-color: currentColor;
}

div.cfs_root>div.cfs_header>div.cfs_reset>button:hover {
	color: white;
	background-color: var(--wp--preset--color--vivid-red);
}

/* ------------------------------
FILTRI
------------------------------ */

div.cfs_root>div.cfs_filtri {
	--cols: 4;
	display: grid;
	grid-template-columns: repeat(var(--cols), 1fr);
	gap: var(--gap);
	margin-bottom: var(--gap);
	align-items: stretch;
}

div.cfs_root>div.cfs_filtri:empty {
	display: none;
}

div.cfs_root>div.cfs_filtri>* {
	display: inline-flex;
	align-items: center;
	justify-content: start;
	font-size: 1em;
	flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
	min-width: 0;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	padding: .5em 1em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	height: var(--altezza);
}

div.cfs_root>div.cfs_filtri>*:disabled {
	pointer-events: none;
	cursor: pointer;
	opacity: 0.2;
	background-color: var(--border);
}

div.cfs_root>div.cfs_filtri>button.rimuovi {
	background-color: transparent;
	color: var(--primary);
	border-color: currentColor;
}

div.cfs_root>div.cfs_filtri>button.rimuovi:hover {
	background-color: var(--primary-hover);
}

div.cfs_root>div.cfs_filtri>button.rimuovi::after {
	content: "\00D7";
	margin-left: auto;
	font-size: 2em;
}

div.cfs_root>div.cfs_filtri>.filtro.datepicker+input {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1em center;
	background-size: 1.1em;
	padding-right: 2.5em;
	cursor: pointer;
}

/* ------------------------------
TABELLA
------------------------------ */

div.cfs_root>div.cfs_tabella {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	width: 100%;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

div.cfs_root>div.cfs_tabella>table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

div.cfs_root>div.cfs_tabella>table thead {
	background-color: var(--primary);
	color: white;
}

div.cfs_root>div.cfs_tabella>table th,
div.cfs_root>div.cfs_tabella>table td {
	border: 1px solid var(--border);
	padding: 5px 7px;
	vertical-align: middle;
	white-space: nowrap;
}

div.cfs_root>div.cfs_tabella>table tr:nth-child(even) {
	background-color: #f2f2f2;
}

div.cfs_root>div.cfs_tabella>table tbody tr:hover {
	background-color: var(--primary-hover);
}

div.cfs_root>div.cfs_tabella>table thead th[data-ordina]:hover,
div.cfs_root>div.cfs_tabella>table thead th[data-ordina="ASC"],
div.cfs_root>div.cfs_tabella>table thead th[data-ordina="DESC"] {
	cursor: pointer;
	background-color: var(--primary-hover);
	color: var(--primary);
}

div.cfs_root>div.cfs_tabella>table thead th[data-ordina="ASC"]::before {
	content: "\25B2 ";
}

div.cfs_root>div.cfs_tabella>table thead th[data-ordina="DESC"]::before {
	content: "\25BC ";
}

div.cfs_root>div.cfs_tabella>table tbody tr td.html a {
	white-space: wrap !important;
}

div.cfs_root>div.cfs_tabella>table>*:first-child>tr:first-child>* {
	border-top: none;
}

div.cfs_root>div.cfs_tabella>table>*>tr>*:first-child {
	border-left: none;
}

div.cfs_root>div.cfs_tabella>table>*>tr>*:last-child {
	border-right: none;
}

div.cfs_root>div.cfs_tabella>table>*:last-child>tr:last-child>* {
	border-bottom: none;
}

/* ------------------------------
CLASSI TABELLA
------------------------------ */

div.cfs_root>div.cfs_tabella>table>tbody>tr>td.allineamento-centro {
	text-align: center;
}

div.cfs_root>div.cfs_tabella>table>tbody>tr>td.allineamento-destra {
	text-align: right;
}

div.cfs_root>div.cfs_tabella>table>tbody>tr>td.euro::before {
	content: '€ ';
}


/* ------------------------------
PAGINAZIONE
------------------------------ */

div.cfs_root>div.cfs_paginazione {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--gap);
	margin-top: var(--gap);
}

div.cfs_root>div.cfs_paginazione>div {
	display: flex;
	align-items: center;
	gap: 0.5em;
}

div.cfs_root>div.cfs_paginazione>.cfs_mostra:empty,
div.cfs_root>div.cfs_paginazione>.cfs_info:empty,
div.cfs_root>div.cfs_paginazione>.cfs_pagine:empty {
	display: none;
}

div.cfs_root>div.cfs_paginazione>.cfs_mostra>select {
	border: 1px solid var(--border);
	border-radius: var(--radius);
	height: var(--altezza);
}

div.cfs_root>div.cfs_paginazione>.cfs_mostra:not(:empty)+.cfs_info {
	padding-left: var(--gap);
	border-left: 1px solid currentColor;
}

div.cfs_root>div.cfs_paginazione>.cfs_pagine {
	margin-left: auto;
}

div.cfs_root>div.cfs_paginazione>.cfs_pagine button {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--primary);
	padding: 4px 10px;
	cursor: pointer;
	height: var(--altezza);
}

div.cfs_root>div.cfs_paginazione>.cfs_pagine button:hover {
	background: #e8f2fa;
	border-color: var(--primary);
}

div.cfs_root>div.cfs_paginazione>.cfs_pagine button.corrente {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
	font-weight: 700;
	cursor: default;
	pointer-events: none;
}

div.cfs_root>div.cfs_paginazione>.cfs_pagine button:disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

div.cfs_root>div.cfs_paginazione>.cfs_pagine button.cfs_ellissi {
	border: none;
}

/* ------------------------------
DEBUG
------------------------------ */

div.cfs_root>pre.cfs_debug {
	margin-top: var(--gap);
}

div.cfs_root>pre.cfs_debug:empty {
	display: none;
}