 html *{
  box-sizing: border-box;
 }
 body {
  flex-direction: column;
  font-family: Arial;
  padding: 0;
  margin: 0;
  background: #eee;
}
button{
  padding:0.8rem 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #3498db;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  position: relative;
  font-size: 1rem;
  max-width:50%;
  transition: all 0.5s ease;
}
.hiddenElement{
  display: none !important;
}
#header {
  background-color: #fff;
  border-bottom: 1px solid #314151;
  text-align: center;
  height: 70px;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
}
#licName {
  margin: 0;
  padding: 0;
  font-size: 2rem;
  line-height: 4rem;
  font-family: "Trebuchet MS";
  padding:0 50px 0 10px;
  overflow: hidden;
  height: 100%;
}
#footer {
  background-color: #444343;
  padding: 5px 20px 5px 20px;
  color: #fff;
  text-align: center;
  height: 70px;
  border-top: 1px solid #888;
  bottom: 0;
  right: 0;
  left: 0;
  position: fixed;
}
#logoready{
  display: block;
  margin: 10px auto 0 auto;
  max-width: 70px;
  border:1px solid #000;
}
#footer p{
  margin: 0;
  padding: 0;
  font-size: 12px;
}
#footer a {
  color: #fff;
}

#passwordForm{
  display: flex;
  flex-direction: column;
  margin: 50px auto auto auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 95%;
  padding: 20px;
  background-color: #ffffff;
}
#downloadButton{
  margin:auto;
}
#container {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 70px;
  bottom: 70px;
  left: 0;
  right: 0;
  width: 500px;
  margin:auto;
  max-width: 100%;
}
#pdf-message{
  text-align: center;
  color: #314151;
  font-weight: bold;
  padding: 20px 10px;
  border: 1px solid #314151;
  background: #fff;
  margin-top: 15px;
}
#buttonsForm{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  border:1px solid #314151;
  background: #fff;
  margin: 15px 0 0 0;
  padding:5px;
}
#buttonsForm a:nth-child(-n+2) {
  flex: 1 1 calc(50% - 5px);
  min-width: 150px;
}
#buttonsForm a:nth-child(n+3) {
  flex: 1 1 calc(50% - 5px);
  min-width: 150px;
}
#buttonsForm a:nth-child(n+3):only-of-type {
  flex: 1 1 100%;
}
a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding:0.8rem 2.5rem;
  text-decoration: none;
  text-align: center;
  background-color: #888;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  position: relative;
  font-size: 1rem;
  transition: all 0.5s ease;
}
a.btn span{
  display:block;
  font-size:0.6rem;
}
#viewButton{
  
}
#saveButton{
  background-color: #3498db;
}
#payButton {
  background-color: #ec8b23;
}
#lockPDFButton{
  
}
.locked #lockPDFButton{
  background-color:red;
}
#nVisite {
  flex-basis: 100%;
  text-align: left;
  margin: 0 0 10px 0;
  background-color: #eee;
  padding:2px 5px 2px 5px;
}
button img,
a.btn img {
  position: absolute;
  left: 5px;
  max-width: 30px;
}
button:hover,
a.btn:hover {
  background-color: #d4dfe6 !important;
  color: #000;
}



#pdf-main-container {
  height: 100%;
  overflow: auto;
  border-left:1px solid #314151;
  border-right:1px solid #314151;
  background: #fff;
}
#pdf-contents img{
  max-width: 100%;
  max-height: 100%;
}

.pdf-img{
  display: block;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}


form{
 text-align: center;
}
label {
  margin-bottom: 0.5rem; /* Migliorata la spaziatura tra le etichette */
  font-size: 1.1rem; /* Adattato il font-size */
}

input {
  padding: 1rem; /* Maggiore spaziatura interna */
  margin-bottom: 1.5rem; /* Migliorata la spaziatura tra gli input */
  border: 1px solid #ccc;
  border-radius: 0.5rem; /* Ridotta la curvatura del bordo */
  font-size: 1rem; 
}



/* Hamburger------------------------------------------------------ */
.menu-toggle {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 999;


  display: none;
  /*^^^^ !!! temporaneo !!! */
}
.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background-color: #fff;
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  background-color: #fff;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: 0.3s;
}

.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  display: flex;
  flex-direction: column;
  padding-top: 70px;
}

.sidebar ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #fff;
}

.sidebar ul li {
  padding: 20px;
}

.sidebar ul li a {
  color: white;
  text-decoration: none;
  display: block;
  transition: 0.3s;
}

.sidebar ul li a:hover {
  color: #3498db;
}

.sidebar.active {
  width: 250px;
}

.language-selector {
  position: absolute;
  display: inline-block;
  right:10px;
  top: 15px;
}

.current-language {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.current-language span{
    display: none;
}
.current-language img {
  max-width: 35px;
}

.language-list {
  display: none;
  position: absolute;
  right: 0;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.language-list li {
  display: flex;
  align-items: center;
  padding:0 10px 0 10px;
  cursor: pointer;
}

.language-list li:hover {
  background-color: #e0e0e0;
}

.language-list img {
  margin-right: 5px;
}

/* Lightbox ------------------------------------------------------ */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.4);
  padding-top: 60px;
}
#lightbox-message{
  padding: 10px 0 20px 0;
  line-height: 18px;
  white-space: break-spaces;
  text-align: center;
}
.lightbox-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 500px;
  position: relative;
  max-width: 90%;
}
#lightbox-buttons{
  display:flex;
  justify-content: center;
  gap: 10px;
}
.lightbox.modal .close{
  display: none;
}
.lightbox-content .close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 0;
  right: 5px;
}
.lightbox-content .close:hover,
.lightbox-content .close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}


@media (max-width: 860px) {
  #header{
    height: 50px;
  }
  #licName {
    font-size: 1.5rem;
    line-height: 3rem;
  }
  .sidebar{
    padding-top: 50px;
  }
  .menu-toggle {
    top:10px;
  }
  .language-selector {
    top: 5px;
  }
  #container {
    top: 50px;
  }
  
  button,
  a.btn {
    padding:0.8rem 1.8rem;
  }
  button img,
  a.btn img {
    max-width: 20px;
  }
}