/* VARIABILI GLOBALI */
:root {
  /* Background */
  --color-bg-page: #EEF2F6;
  /* Primary / Brand */
  --color-primary: #EB6864;
  --color-primary-hover: #D95A56;
  --color-primary-warning: #F2C75C;
  /* Borders & Dividers */
  --color-border: #E0E6ED;
  /* Text (consigliati) */
  --color-text-primary: #2E2E2E;
  --color-text-secondary: #6B7280;
  /* States opzionali */
  --color-disabled: #C7CDD6;
  --color-bg-hover: #F5F8FB;
}
/* VARIABILI GLOBALI */

/* Inizio - Override dei componenti base per impostare la giusta disposizione di header, main e footer in tutte le pagine */
body{background-color: var(--color-bg-page) !important;display:flex; flex-direction: column; min-height: 100vh;}
header {position:fixed; top:0; left:0; width:100%;z-index:999}
main{display:flex; flex:1; flex-direction: column; margin-top: 5rem;}
.container-fluid{width:auto;}
.konvajs-content{box-shadow: 0 0px 8px rgba(0, 0, 0, 0.25);}
/* Fine - Override dei componenti base per impostare la giusta disposizione di header, main e footer in tutte le pagine */

.col-group-cyan {
  background-color: #9dffff !important;
}

.col-group-yellow {
  background-color: #fdff9d !important;
}

.col-group-green {
  background-color: #9dffb2 !important;
}

/* Inizio - Stile per tabulator (pagina list) */
#tcs-list-table{border-radius:10px;border:none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);}
#tcs-list-table .tabulator-headers{font-size:1rem;background-color: #fff;border: none;}
#tcs-list-table .tabulator-header .tabulator-col{background: #fff !important;border-right:none !important}
#tcs-list-table .tabulator-row{min-height: 35px;}
#tcs-list-table .tabulator-row:hover{font-weight: bold;}
#tcs-list-table .tabulator-row .tabulator-cell{min-height: 35px; font-size:1rem; border:none}
#tcs-list-table .tabulator-row .tabulator-cell a{font-weight:bold;}
#tcs-list-table .tabulator-row .badge{display:flex; justify-content: center; align-items: center; font-size: 0.90em;font-weight: 500;}
#tcs-list-table .tabulator-row .badge i{font-size: 0.90em;padding-left:5px;padding-top:3px;align-items: center;}
.tabulator .tabulator-row-even.tabulator-tree-level-1 {
  background-color: #CCE5FF !important;
}

.tabulator .tabulator-row-odd.tabulator-tree-level-1 {
  background-color: #CCFFFF !important;
}
/* Fine - Stile per tabulator (pagina list) */

#collapseCommandsBlock button{
  width:25%;
  font-size: 1.1rem;
  font-weight: 500;
}
@media only screen and (max-width: 430px) {
  #collapseCommandsBlock button{
    width:auto;
  }
}
.card-div-back {
  background-image: url("/images/stripes-light.png");
  background-repeat: repeat;
}

.card-div-shadow {
  box-shadow: 2px 2px 4px #000000;
}

.tablesmallline {
  line-height: 1em;
}

.tablesmallline td {
  height: 1em;
  text-align: center;
}

.card-login-form {
  padding-top: 1em;
}

.card-register-form {
  padding-top: 1em;
}
.card {
  border-radius:1rem !important;
  background-color: #fff;
  overflow: hidden;
}
.card .card-title{padding-left:1rem;padding-top:0.5rem;}
.card .btn-link{
  width:100%;
  height: 100%;
  text-align: left;
  font-size: 1.1rem;
}
.card .btn-link i{font-size:1.2rem;}
.card .btn-link.collapsed::after{
  transform: rotate(180deg); /* punta verso l’alto */
}
.card .btn-link::after{
  content:'\25B2';
  color:red;
  position: absolute;
  right: 1rem;
}
.card.card-hover .card-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(235,104,100,0.08); /* colore primario leggero */
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  border-radius: inherit; /* mantiene angoli */
}

.card.card-hover:hover .card-header::after {
  opacity: 1;
}

.card.card-hover:hover .card-header {
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  cursor: pointer;
}
.card .card-header{
  background-color: transparent;
  border-radius: 0px !important;
  padding-top:1rem;
  border-bottom: 0px;
  transition: background-color 0.25s ease,box-shadow 0.25s ease;
  position: relative;
}
.card .card-header h5 button{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width:95%}
.card .card-body{
  border-top: 1px solid rgba(0, 0, 0, .125);
}
.card .card-footer{
  background-color: transparent;
  border-radius: 0px !important;
}
.card.height-auto{
  height: auto;
}
.myfooter {
  display: flex;
  position:relative;
  margin-top: 1em;
  bottom: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  text-align: center;
  font-size:0.8rem;
  align-items: center;
  justify-content: center;
}

.map {
  min-height: 400px;
  width: 100%;
}

.mapCenter {
  height: 400px;
  min-height: 300px;
  width: 100%;
}

.mapArea {
  height: 400px;
  min-height: 300px;
  width: 100%;
}

.mapTC {
  height: 400px;
  min-height: 300px;
  width: 100%;
}

.config-block {
  padding-top: 2em;
  padding-left: 0em;
  padding-right: 0em;
}

.table-myhover tbody tr:hover {
  outline: thin solid;
  outline-color: rgb(0, 0, 0);
}

.myDiv-overflow-x {
  overflow-x: scroll;
}

.tdNotConnected {
  background: rgb(255, 0, 0);
}

.tdConnected {
  background: rgb(0, 255, 0);
}

.emergencyStatus {
  background: rgb(255, 145, 0);
}

table caption {
  caption-side: top;
}

/* Animated Traffic Ligths in TC page */
#TLsContainer div.TLsprite {
  position: relative;
  display: inline-block;
  height: 70px;
  width: 33px;
  background: url('/images/sprites/TLs.png') 0px 0px;
}

/* Intersection Editor */
#intersec_edit {
  margin-top: 10px;
  height: 900px;
  width: 1400px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #f0f0f0;
}

.scrolling-wrapper {
  overflow-x: scroll;
  overflow-y: hidden;
  white-space: nowrap;
}

/* Intersection Viewer */
div[id^='intersec_view'],
div[id*=' intersec_view'] {
  background-color: #f0f0f0;
}

div[id^='intersec_container'],
div[id*=' intersec_container'] {
  width: 100%;
}

/* OL popup */
.ol-popup {
  position: absolute;
  background-color: white;
  -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #cccccc;
  bottom: 12px;
  left: -50px;
  min-width: 280px;
}

.ol-popup-light {
  position: absolute;
  background-color: white;
  -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
  padding: 0px;
  border-radius: 0px;
  border: 1px solid #cccccc;
  bottom: 12px;
  left: -50px;
  min-width: 150px;
}

.ol-popup:after,
.ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.ol-popup:after {
  border-top-color: white;
  border-width: 10px;
  left: 48px;
  margin-left: -10px;
}

.ol-popup:before {
  border-top-color: #cccccc;
  border-width: 11px;
  left: 48px;
  margin-left: -11px;
}

.ol-popup-closer {
  text-decoration: none;
  position: absolute;
  top: 2px;
  right: 8px;
}

.ol-popup-closer:after {
  content: "✖";
}

#quill-editor {
  margin: 10px;
  padding: 0px;
  margin: 0px;
  height: 30vh;
}

#quill-scrolling-container {
  padding: 0px;
  margin: 0px;
}

/* ReP */
.screenline {
  white-space: nowrap;
  text-align: center;
  font-size: 100%;
  font-weight: bold;
  color: #00FF00;
  font-family: 'Courier New', Courier, monospace;
}

@media only screen and (max-width: 430px) {
  .screenline {
    font-size: 65%;
  }
}

.screenlineMT {
  white-space: nowrap;
  text-align: center;
  font-size: 100%;
  font-weight: bold;
  color: #00FF00;
  font-family: 'Courier New', Courier, monospace;
}

.panelButtonKeypad {
  display: block;
  max-width: 3em;
  max-height: 3em;
  min-width: 2.3rem;
  min-height: 2.3rem;
  font-size: 0.5em;
}

.panelButtonImg {
  color: rgba(0, 0, 0, 0);
  background-repeat: no-repeat;
  background-position: center center;
}

.panelButton {
  display: block;
  width: 3em;
  height: 3em;
}

.panelButtonF {
  text-align: center;
  vertical-align: middle;
  line-height: 2em;
  display: inline-block;
  width: 4em;
  height: 2em;
  white-space: nowrap;
}

.panelButtonFmt {
  text-align: center;
  vertical-align: middle;
  display: inline-block;
  line-height: 2em;
  width: 3.8em;
  height: 3em;
  white-space: nowrap;
}

#full-map:-webkit-full-screen,
#full-map:-moz-full-screen,
#full-map:-ms-fullscreen,
#full-map:fullscreen{
  width: 100%;
  height: 100%;
}

#full-map:-webkit-full-screen #map,
#full-map:-moz-full-screen #map,
#full-map:-ms-fullscreen #map,
#full-map:fullscreen #map{
  width: 100%;
  height: 100%;
}

.alert .fas.fa-times{
  cursor:pointer;
}

 #custom_tooltip {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.8);
  color: #000;
  padding: 10px;
  border-radius: 10px;
  font-size: 16px;
  pointer-events: none; /* Impedisce l'interazione del mouse */
  transition: opacity 0.2s ease;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  z-index: 11;
  display: none;
  opacity: 1;
}

#custom_tooltip::before {
  content: '';
  z-index:9;
  position: absolute;
  top:-8px;
  border-width: 6px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.8) transparent transparent transparent;
}
#custom_tooltip.tooltip-left::before {
  left:-8px;
  right:100%;
  rotate: 135deg;
}
#custom_tooltip.tooltip-right::before {
  left:99.5%;
  rotate: -135deg;
}

.tooltip-table{
  display:flex;
  flex-direction:column;
  color:#fff;
}
.tooltip-table .tooltip-table-row{
  display:flex;
  border-color: black;
  border-style: solid;
  border-width: 1px 1px 0px 1px;
}
.tooltip-table .tooltip-table-header{
  background-color: rgba(235, 104, 100);
}
.tooltip-table .tooltip-table-body{
  background-color: rgba(173, 181, 189);
}
.tooltip-table .tooltip-table-body .tooltip-table-row:last-child{
   border-bottom: 1px solid black;
}
.tooltip-table .tooltip-table-header .tooltip-table-col{
  font-weight: bold;
}
.tooltip-table .tooltip-table-col{
  display:flex;
  width:4.2rem;
  border-right:1px solid black;
  align-items: center;
  justify-content: center;
}
.tooltip-table .tooltip-table-col:last-child{
  border-right:0px;
}
.tooltip-table .tooltip-table-col .input-perc-green{
  color:green;
  font-size:0.9rem;
}
.tooltip-table .tooltip-table-col .input-perc-red{
  color:red;
  font-size:0.9rem;
}

/* Inizio - CUSTOM TOGGLE SWITCH */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

/* Checked state */
.toggle-switch input:checked + .slider {
  background-color: var(--color-primary);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(22px);
}
/* Fine - CUSTOM TOGGLE SWITCH */


/* Inizio - NAVBAR */
.navbar {box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);}
.navbar .user-logged{color:#fff;}
.navbar .user-logged a{color:#fff;}
.navbar-nav .nav-item{padding-right:0.7rem; padding-left:0.7rem;}
.navbar-nav .nav-item a:not(.dropdown-item){color:#fff !important;font-size:1.1rem; }
.navbar-nav .nav-item a:hover:not(.dropdown-item){font-weight: 600;}
.navbar-nav .nav-item.active a:not(.dropdown-item){font-weight: 600;border-bottom: 1px solid #fff;}
.navbar-nav .dropdown-menu .dropdown-item i{padding:0.2rem; text-align: center; width:35px}
/* Fine - NAVBAR */

/* Inizio - CHARTS */
#modelsChart {max-width:400px !important;max-height: 400px !important;margin:0 auto;}
@media (max-width:400px) {
  #modelsChart {max-width:280px !important;max-height: 280px !important;}
}
/* Fine - CHARTS */

/* Inizio - Pagina licenza */
.container .license-header{display:flex; align-items: center;justify-content: center; flex-direction: column;margin-top:3rem;}
.container #activated_page{width:70%;margin:3rem auto;padding:2rem;}
.container #activated_page button{width:100%}
.container #activation_page, .container #activated_page{display:flex; align-items: center;justify-content: center; flex-direction: column;margin-top:3rem;padding:2rem;border-radius:15px; background-color: rgba(0,0,0,.03)}
.container #activation_page p, .container #activated_page p{text-align:center}
.container #activated_page hr{border-bottom:1px solid #aaa; width:90%;}
.container #activation_form_container{width:70%;margin:3rem auto;padding:2rem;border-radius:15px; background-color: rgba(0,0,0,.03)}
.container #activation_form_container button{width:100%}
.container #activation_form_container h2{text-align:center};
.container #activation_form_container input.is-invalid{border: 2px solid #dc3545 !important; background-color: #ffe6e6; }
.container #uplDatForm_container .drop-area {border: 2px dashed #6c757d;border-radius: 8px;background-color: #f8f9fa;
  transition: background-color 0.3s, border-color 0.3s;cursor: pointer;}
.container #uplDatForm_container .drop-area.dragover {background-color: #e9ecef;border-color: #0d6efd;}
/* Fine - Pagina licenza */

/* Inizio - Stile per il caricamento della pagina con Loader */
#loader {position: fixed;left: 50%;top: 50%;width: 60px;height: 60px;margin: -30px 0 0 -30px;border: 6px solid #f3f3f3;       
  border-top: 6px solid;border-color: var(--color-primary);  border-radius: 50%;animation: spin 1s linear infinite;z-index: 9999;}
/* Effetto di rotazione */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loader-overlay {position: fixed;top: 0;left: 0;width: 100%;height: 100%;background: rgba(0, 0, 0, 0.4);z-index: 9998;display: none;}
/* Fine - Stile per il caricamento della pagina con Loader */

/* Inizio - Style per pagina di config */
.tabulator .wrap-title-text .tabulator-col-title{white-space: normal !important;word-wrap: break-word;text-align: center; }
#HLmodelsList img{cursor:pointer;}
#SENSORmodelsList img{cursor:pointer;}
/* Fine - Style per pagina di config */

/* Inizio - Style per alert disconnesioni */
#disconnectionBanner .alert{background: linear-gradient(180deg, #fdecec 0%, #fbe3e3 100%);border: 1px solid #f1aeb5;padding: 0.5rem;color: #842029;}
#disconnectionBanner .alert .fa-exclamation-triangle {color: #b02a37;margin-right:0.2rem;}
#disconnectionBanner .fw-bold {font-size: 1.1rem;color: #5f2128 !important;font-weight: bold;}
#disconnectionBannerCount {font-size: 0.9rem;padding: 0.2rem 0.4rem;background-color: #b02a37 !important;box-shadow: 0 0 0 2px rgba(176, 42, 55, 0.15);}
#disconnectionBannerText .pill {display: inline-flex !important;align-items: center !important;gap: 3px !important;margin-right:0.1rem !important;padding: 0.2rem 0.5rem !important;
  border-radius: 999px;background-color: #f8d7da;border: 1px solid #f1aeb5 !important;font-size: 0.8rem;color: #842029 !important;white-space: nowrap !important;}
#disconnectionBannerText .pill .id {color: #842029 !important;font-weight: 600 !important;background-color: rgba(176, 42, 55, 0.1) !important;padding: 2px 8px !important; border-radius: 999px !important;}
/* Fine - Style per alert disconnesioni*/


/* Inizio - Style per badge contatori */
.badge_counter .fas{font-size: 3rem; height:3rem;}
.badge_counter.disconnected{color:var(--color-primary);}
.badge_counter.disconnected .x-red{font-size: 3rem; font-weight: bold;height:3rem;}
.badge_counter.connected{color:#35d97e;}
.badge_counter.warning{color:var(--color-primary-warning);}
.badge_counter.alarm{color:var(--color-primary);}
.badge_counter .text{font-size:4rem; font-weight:bold;}
.badge_counter p{font-size:1.1rem; font-weight: bold;margin-top:0.5rem;}
.badge_counter .img-container{width:3rem;height: 3rem;margin: 0 auto;}
.badge_counter img{width:100%;}
/* Fine - Style per badge contatori */