/* Basic Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 20px;
  color: #333;
}

/* Card Styling */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.card-header h2 {
  font-size: 1.25rem;
  color: #333;
}

.card-content {
  padding: 20px;
}

/* Button Styling */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background: #007bff;
  color: white;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn:hover {
  background: #0056b3;
}

/* Hidden class */
.hidden {
  display: none;
}

/* Panel Styling */
.panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.panel h3 {
  margin-bottom: 15px;
  color: #333;
}

/* Attachment Styling */
.attachment {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 10px;
}

/* Similar Tickets Styling */
.similar-ticket {
  border: 1px solid #ddd;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: #fafafa;
}

.similar-header {
  align-items: center;
  margin-bottom: 8px;
}

.similar-header span:first-child {
  font-weight: bold;
  color: #333;
}

* {box-sizing:border-box}

.similarity {
  background: #918f8f;
  border-radius: 4px;
  width: 100%;
}

.similarity-bar{
  text-align: right;
  padding-top: 1px;
  padding-bottom: 1px;
  padding-right: 10px;
  color: white;
  border-radius: 4px;
  background-color: #04AA6D;
}



.similar-subject {
  color: #555;
  margin-bottom: 8px;
}

.similar-resolution {
  color: #28a745;
}

.similar-resolution-chat {
  color: white;
}

/* Analysis Result Styling */
.analysis-result {
  background: #f5f5f5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.analysis-result h4 {
  margin-bottom: 10px;
  color: #333;
}

.analysis-result p {
  margin-bottom: 5px;
  color: #555;
}

.analysis-result strong {
  color: #333;
}

.objects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
  list-style: none;
}

.object-tag {
  background: #e9ecef;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #555;
}

/*Loading*/
.loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;       
  height: 100%;
}

.loader {
  display: flex;
  gap: 5px;         
}

.loader div {
  width: 10px;
  height: 32px;
  background-color: #076fe5;
  animation: loading-bar 0.8s infinite ease-in-out;
}

.loader div:nth-child(2) {
  animation-delay: 0.16s;
}
.loader div:nth-child(3) {
  animation-delay: 0.32s;
}


/*Loading (Mini)*/
.loader-mini-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;       
  height: 100%;
}

.loader-mini {
  display: flex;
  gap: 2px;         
}

.loader-mini div {
  width: 5px;
  height: 16px;
  background-color: #076fe5;
  animation: loading-bar 0.8s infinite ease-in-out;
}

.loader-mini div:nth-child(2) {
  animation-delay: 0.16s;
}
.loader-mini div:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes loading-bar {
  0%, 80%, 100% {
    transform: scaleY(0.75);
    opacity: 0.75;
  }
  40% {
    transform: scaleY(1.25);
    opacity: 1;
  }
}

/*Login form*/

.login-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  overflow: hidden;
  text-align: center;
  padding: 50px;
  width: 50%;
}

.login-container {
    margin: 0;
    height: 100vh; 
    display: flex;
    justify-content: center; 
    align-items: center;
}

.img{
  width: 30%;
  margin-bottom: 20px;
}

.password-form{
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.password-form input{
  font-size: 20px;
  border-radius: 8px;
  padding: 5px;
  width: 50%;
}

.login-btn{
  color: #f5f5f5;
  background-color: #0056b3;
  font-size: 20px;
  border-radius: 8px;
  width: 20%;
  margin-top: 20px;
  padding: 6px;
}

.red{
  color: red;
}

/*Search bar*/

.search-container{
  display: flex;
  justify-content: center;
  background-color: white;
  border-radius: 50px;
  border: 1px solid #ccc;
  border-right: 0;
}

.search-container h1{
  margin-right: -5px;
  margin-bottom: 0px;
  margin-left: 0px;
  width: 5%;
  padding: 0;
}

.search-bar{
  border: 0px;
  border-right: 1px solid #ccc;
  font-size: 20px;
  padding: 10px;
  width: 85%
}

.search-btn{
  background-color: white;
  border: 0px;
  border-bottom-right-radius: 50px;
  border-top-right-radius: 50px;
  margin-right: -20px;
  margin-left:0px;
  font-size: 25px;
  cursor: pointer;
  width: 10%;
  border:0.5px solid #ccc ;
  border-right:1px solid #ccc ;
  border-left: 0;
}

.search-btn p{
  background: none;
  padding: 0;
  margin: 0;
  margin-left: -10px;
  border: none;
  display: inline;              
}

.search-btn:hover{
  background: #007bff;
  transition: background 0.3s;
}

.search-bar:focus {
  outline: none;
  border: none;
  border-right: 1px solid #ccc;
}

.user-toggle{
  position: fixed;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #007bff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.user-window {
  position: fixed;
  top: 90px;
  right: 20px;
  display: none;
  flex-direction: column; /* Dispone gli elementi (header, linea, bottone) in verticale */
  background-color: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  width: fit-content;
  min-width: 200px;
}

.user-header {
  display: flex;
  align-items: center;    /* Allinea verticalmente email e icona */
  justify-content: space-between; /* Spinge l'email a sinistra e l'icona a destra */
  gap: 15px;              /* Spazio tra email e icona */
  margin-bottom: 5px;
}

#userEmail {
  margin: 0;
  font-weight: 500;
  color: #333;
  font-size: 14px;
}

.user-img {
  width: 40px;
  height: 30px;
}

/* La linea divisoria */
.divider {
  border: 0;
  border-top: 1px solid #eee; /* Colore della linea grigio chiaro */
  margin: 10px 0;
  width: 100%;
}

.logout-btn {
  width: 100%;            /* Il pulsante occupa tutta la larghezza */
  padding: 8px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.logout-btn:hover {
  background-color: #0056b3;
}