/* Variabili di Colore e Font */
:root {
    --primary-color: #007BFF;
    --primary-dark: #0056b3;
    --bg-color: #f4f4f9;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #e0e0e0;
    --disabled-color: #ccc;
    --disabled-text: #666;
    --font-family: 'Poppins', sans-serif;
  }
  
  /* Reset di base */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, #e2e8f0, var(--bg-color));
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
  }
  
  /* Contenitore principale */
  .container {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  }
  
  /* Titoli e paragrafi */
  h1 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
  }
  
  p {
    margin: 20px 0;
    font-size: 1.1em;
    color: #555;
  }
  
  
.cv-upload-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Spazio tra input e bottone */
    justify-content: center; /* Per centrare */
    margin-top: 10px;
}

.job-choice-container {
    display: flex;
    align-items: center;
    gap: 10px; /* Spazio tra input e bottone */
    justify-content: center; /* Per centrare */
    margin-top: 10px;
}

#select-job-form label {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

#select-job-form input[type="text"] {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #fafafa;
    width: 100%;
    max-width: 300px;
    flex: 1;
  }

  #select-job-form button {
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    max-width: 200px;
}
  

#cv-upload-form label {
    display: block;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}
  
  #cv-upload-form input[type="file"] {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: #fafafa;
    width: 100%;
    max-width: 300px;
    flex: 1;
  }
  
  #cv-upload-form button {
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    max-width: 200px;
}
  
  #cv-upload-form button:hover {
    background-color: var(--primary-dark);
  }
  
  #cv-upload-form button:active {
    transform: scale(0.98);
  }
  
  /* Chat Box e Messaggi */
  .chat-box {
    height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    margin-bottom: 15px;
  }
  
  /* Messaggi di Chat */
  .message {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 8px;
    /*max-width: 80%;*/
    word-wrap: break-word;
  }
  
  .message.user {
    background-color: #d1f5d3;
    align-self: flex-end;
    margin-left: auto;
    max-width: 80%;
  }
  
  .message.llm {
    background-color: #f1f1f1;
    align-self: flex-start;
    margin-right: auto;
    max-width: 80%;
  }
  
  .message.error {
    background-color: #fbd1d3;
    color: #900;
    align-self: center;
  }
  
  .message.system {
    background-color: #dfe7fd;
    font-style: italic;
    text-align: center;
    align-self: center;
  }
  
  /* Indicatore di digitazione */
  .message.typing-indicator {
    font-style: italic;
    color: gray;
  }
  
  /* Textarea per l'input utente */
  textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: none;
    font-size: 1em;
  }
  
  textarea:disabled {
    background-color: #eee;
    cursor: not-allowed;
  }
  
  /* Pulsanti e Contenitore dei Controlli */
  .controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  button {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
  }
  
  button:hover {
    background-color: var(--primary-dark);
  }
  
  button:active {
    transform: scale(0.98);
  }
  
  button:disabled {
    background-color: var(--disabled-color);
    color: var(--disabled-text);
    cursor: not-allowed;
    transform: none;
  }

  

  /* Finestra popup */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 999;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  width: 60%;
}

.popup-container {
  display: flex;
  gap: 20px;
}

.job-list {
  width: 40%;
  border-right: 1px solid #ccc;
}

.job-list ul {
  list-style: none;
  padding: 0;
}

.job-list li {
  padding: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.job-list li:hover {
  background: #eee;
}

.job-description {
  width: 80%;
  max-height: 400px;
  overflow-y: auto;
}

.scrollable-text {
  max-height: 150px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.confirm-job {
   margin-top: 20px;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
    font-size: 20px;
}

@media (max-width: 768px) {
  .container {
      margin: 20px auto;
      padding: 20px;
  }

  .job-choice-container {
      flex-direction: column;
      gap: 20px; 
  }

  #select-job-form input[type="text"] {
      width: 100%;
      max-width: 100%;
  }

  #select-job-form button {
      width: 100%;
      max-width: 100%;
  }

  .popup {
    width: 90%; /* Aumenta la larghezza del popup */
    max-width: 600px; /* Imposta una larghezza massima maggiore */
    height: auto; /* Permetti al popup di adattarsi in altezza */
    padding: 25px;
  }

  .popup-container {
      flex-direction: column;
  }

  .job-list, .job-description {
    width: 100%;
    border-right: none;
  }

  .job-description {
    height: auto; /* Imposta l'altezza automatica per la descrizione del lavoro */
  }

  .job-list li {
    padding: 15px; /* Aumenta il padding degli item della lista */
  }
}

  /* Animazioni per una transizione più fluida */
  #interview-page {
    animation: fadeIn 0.5s ease-in-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  