div[f4m_type="GRID"] {
	position: relative;
	/*display: block;
    white-space: nowrap;*/
	-webkit-overflow-scrolling: touch;
	width: 100%;
	overflow: auto;
	overflow-y: auto;
	overflow-x: auto;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	border: 1px solid #b2b2b2;
	color: black;
	background-color: #ffffff;
	font-size: 15px;
}
div[f4m_type="GRID"] table.ORIG_TABLE{
    display: none !important;
}
div[f4m_type="GRID"][no_vscroll="true"]{
	overflow-y: hidden !important;
}

div[f4m_type="GRID"] div.HEAD {
	float: left;
	display: inline-block;
	overflow-y: hidden;
	overflow-x: visible;
	position: sticky;
	/*left: 0;*/
	top: 0;
	z-index: 2;
	height: 25px;
	background: linear-gradient(#cccccc, #e5e5e5);
	/*background-color: #e5e5e5;*/
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}
div[f4m_type="GRID"][grp_head="true"] div.HEAD {
    height: 50px;
}
div[f4m_type="GRID"][grp_head="true"] div.HEAD table.GRP_HEAD{
    min-height: auto !important;
}
div[f4m_type="GRID"][grp_head="true"] div.HEAD table.HEAD{
    min-height: auto !important;
}
div[f4m_type="GRID"][head="false"] div.HEAD {
    display: none !important;
}

div[f4m_type="GRID"] div.BODY {
	position: relative;
	z-index: 1;
	float: left;
	display: inline-block;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}

div[f4m_type="GRID"] div.FOOT {
	float: left;
	display: inline-block;
	overflow-y: hidden;
	overflow-x: visible;
	position: sticky;
	/*left: 0;*/
	bottom: 0;
	z-index: 2;
	height: 25px;
	background: linear-gradient(#e5e5e5, #cccccc);
	/*background-color: #e5e5e5;*/
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
}
div[f4m_type="GRID"][foot="false"] div.FOOT {
    display: none !important;
}

@-moz-document url-prefix() {
	div[f4m_type="GRID"][foot="true"] {
		background: linear-gradient(180deg, #ffffff calc(100% - 25px), #cccccc calc(100% - 10px), #ffffff 100%);
	}
}
/* LIMIT */
div[f4m_type="GRID"][mode="limit"] {
	height: auto;
	min-height: 50px;
	max-height: 300px;
}
/* NEED */
div[f4m_type="GRID"][mode="need"] {
	height: 100%;
}
div[f4m_type="GRID"][mode="need"].filling {
	background: none !important;
	border: none !important;
}
/* FIT */
div[f4m_type="GRID"][mode="fit"] {
	height: 100%;
}
div[f4m_type="GRID"][mode="fit"][head="true"] div.BODY {
	min-height: auto;
	min-height: -moz-calc(100% - 25px);
	min-height: -webkit-calc(100% - 25px);
	/*min-height: -o-calc(100% - 25px);*/
	min-height: calc(100% - 25px);
	margin-bottom: auto;
}
div[f4m_type="GRID"][mode="fit"][head="true"][foot="true"] div.BODY {
	min-height: auto;
	min-height: -moz-calc(100% - 50px);
	min-height: -webkit-calc(100% - 50px);
	/*min-height: -o-calc(100% - 50px);*/
	min-height: calc(100% - 50px);
	margin-bottom: auto;
}
div[f4m_type="GRID"][mode="fit"][grp_head="true"][head="true"][foot="true"] div.BODY {
	min-height: auto;
	min-height: -moz-calc(100% - 75px);
	min-height: -webkit-calc(100% - 75px);
	/*min-height: -o-calc(100% - 75px);*/
	min-height: calc(100% - 75px);
	margin-bottom: auto;
}

/* GRID */

div[f4m_type="GRID"] table {
	width: 100%;
	max-width: 100%;
	min-height: 100%;
	margin: 0 auto;
	table-layout: fixed;
	border-spacing: 0;
	border-collapse: collapse;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	overflow: hidden;
	overflow-x: hidden;
	overflow-y: hidden;
}

div[f4m_type="GRID"] table th, div[f4m_type="GRID"] table td {
	border: 1px solid #b2b2b2;
	word-break: break-all;
	padding-left: 2px;
	padding-right: 2px;
	overflow: hidden;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	/*FORCE HARDWARE ACCELERATION*/
	/*transform: rotateX(0deg);*/
}

div[f4m_type="GRID"] table th {
	line-height: 25px;
}
div[f4m_type="GRID"] table td {
	line-height: 18px;
	height: 30px;
	vertical-align: top;
	padding-top: 5px;
	padding-bottom: 5px;
}

/*table th div,table td div{
  /*word-break: break-all;
  word-wrap: break-word;
  min-height: 25px;
}*/

div[f4m_type="GRID"] table thead th, div[f4m_type="GRID"] table tfoot th {
	border-color: #ffffff;
	color: rgb(60,60,60);
	height: 25px;
	font-weight: bold;
	/*text-transform: uppercase;*/
	text-align: left;
	vertical-align: top;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/*ASPETTO*/

div[f4m_type="GRID"] table thead tr:first-child th {
	border-top: none;
}
div[f4m_type="GRID"] table thead tr:last-child th {
	border-bottom: none;
}
div[f4m_type="GRID"][grp_head="true"] div.HEAD table.GRP_HEAD thead th{
	padding: 0 !important;
	text-align: center;
}
div[f4m_type="GRID"][grp_head="true"] div.HEAD table.HEAD thead th{
    border-top: 1px solid #ffffff !important;
}
div[f4m_type="GRID"] table thead tr th:first-child {
	border-left: none;
}
div[f4m_type="GRID"] table thead tr th:last-child {
	border-right: none;
}
/**/
div[f4m_type="GRID"] table tfoot tr:first-child th {
	border-top: none;
}
div[f4m_type="GRID"] table tfoot tr:last-child th {
	border-bottom: none;
}
div[f4m_type="GRID"] table tfoot tr th:first-child {
	border-left: none;
}
div[f4m_type="GRID"] table tfoot tr th:last-child {
	border-right: none;
}
/**/
div[f4m_type="GRID"] table tbody tr td:first-child {
	border-left: none;
}
div[f4m_type="GRID"] table tbody tr td:last-child {
	border-right: none;
}

/*COLORI*/
div[f4m_type="GRID"][alt_row_color="true"] table tbody tr:nth-child(even) {
	background-color: rgba(249, 249, 249, 0.7);
}
div[f4m_type="GRID"][hover_color="true"] table tbody tr:hover {
	background-color: rgba(229, 229, 229, 0.6);
}
div[f4m_type="GRID"][select_color="true"] table tbody tr[select="true"] {
	background-color: #e5e5e5;
}

/*CHECK*/
div[f4m_type="GRID"][check_color="true"] table tbody tr[check="true"] {
	background-color: rgba(204,204,204,0.9);
}
div[f4m_type="GRID"] th[type="CHECK"]{
	text-align: center;
	vertical-align: middle;
}
div[f4m_type="GRID"] td[type="CHECK"]{
	text-align: center;
	vertical-align: middle;
}
div[f4m_type="GRID"] div.__group_checkbox{
	display: inline-block;
}
div[f4m_type="GRID"] div.__group_checkbox div.__checkbox{
    display: inline-block;
    background: url(./src/checkbox_uncheck.png) no-repeat;
    background-size: cover !important;
    width: 16px;
    height: 16px;
	cursor: pointer;
	position: relative;
	top: 2px;
	left: 1px;
}
div[f4m_type="GRID"] div.__group_checkbox[state="0"] div.__checkbox{
	background: url(./src/checkbox_uncheck.png) no-repeat;
}
div[f4m_type="GRID"] div.__group_checkbox[state="1"] div.__checkbox{
	background: url(./src/checkbox_check.png) no-repeat;
}
div[f4m_type="GRID"] div.__group_checkbox[state="-1"] div.__checkbox{
	background: url(./src/checkbox_half.png) no-repeat;
}
/*CHECK_is_RADIO*/
div[f4m_type="GRID"] div.__group_checkbox.__group_radio[state="0"] div.__checkbox.__radio{
	background: url(./src/radio_uncheck.png) no-repeat;
}
div[f4m_type="GRID"] div.__group_checkbox.__group_radio[state="1"] div.__checkbox.__radio{
	background: url(./src/radio_check.png) no-repeat;
}
/*SORT*/
div[f4m_type="GRID"] div.HEAD table.HEAD th i.sort_mode{
	padding-right: 2px;
	color: #808080;
}
/*JUMP_render*/
div[f4m_type="GRID"] td.f4m_jump_head{
	font-weight: bold;
}
div[f4m_type="GRID"] td.f4m_jumping{
	/**/
}
div[f4m_type="GRID"] td.f4m_jump_foot{
	font-weight: bold;
	text-decoration-line: underline;
	text-decoration-style: double;
}

/* ---- server-side paging pager (opt-in server_paging="true") ---- */
.F4M_GRID_PAGER{
	display:flex; align-items:center; justify-content:space-between;
	gap:var(--margin2); margin-top:var(--margin3); flex-wrap:wrap;
}
.F4M_GRID_TOTAL{ font-size:var(--font-size1); color:var(--nero1); }
.F4M_GRID_TOTAL .lbl{ font-weight:bold; }
.F4M_GRID_PAGES{ display:flex; align-items:center; gap:var(--margin2); margin-left:auto; }
.F4M_GRID_PAGES .button{
	display:inline-flex; align-items:center; justify-content:center;
	width:38px; height:38px; border-radius:50%;
	background:var(--bianco0); color:var(--colore1);
	box-shadow:0 1px 3px rgba(0,0,0,.12);
	cursor:pointer; user-select:none;
}
.F4M_GRID_PAGES .button:hover{ background:var(--colore1); color:var(--bianco0); }
.F4M_GRID_PAGES .button[disabled]{ opacity:.45; pointer-events:none; }
.F4M_GRID_PAGE_INFO{ font-size:var(--font-size1); color:var(--nero1); min-width:64px; text-align:center; }
