/* === Layout principale === */
body {
  background-color: #fdfdfd;
  font-family: "Inter", Arial, sans-serif;
  margin: 0;
  padding: 0;
}

#travel-chat-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  height: 90vh;
}

#chat-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: #0a3d62;
  margin-bottom: 0.5rem;
}

#chat-subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 30px;
}

/* === Chat box === */
#chat-box {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.message {
  margin-bottom: 15px;
  display: flex;
}

.user {
  justify-content: flex-end;
}

.user .bubble {
  background: #d1e7dd;
  color: #0f5132;
  border-radius: 14px 14px 0 14px;
}

.bot {
  justify-content: flex-start;
}

.bot .bubble {
  background: #e7e7e7;
  color: #333;
  border-radius: 14px 14px 14px 0;
}

.bubble {
  padding: 10px 15px;
  max-width: 70%;
  font-size: 1rem;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* === Input === */
#input-area {
  margin-top: 20px;
  display: flex;
}

#user-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

#send-btn {
  background-color: #0095ff;
  color: white;
  border: none;
  margin-left: 10px;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
#send-btn:hover {
  background-color: #007ad9;
}
.return-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0078ff;
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s ease;
}

.return-button:hover {
  background-color: #005fcc;
}
/* === Indicatore "sta scrivendo..." (tre pallini) === */
.typing-indicator {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.typing-indicator span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 2px;
  background-color: #666;
  border-radius: 50%;
  animation: blink 1.4s infinite both;
  opacity: 0.5;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% { opacity: 0.2; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 0.2; transform: translateY(0); }
}

/* Adattamento per sfondo scuro (se in futuro aggiungi dark mode) */
@media (prefers-color-scheme: dark) {
  .typing-indicator span {
    background-color: #ccc;
  }
}
.daily-plan {
  margin-top: 20px;
  padding: 10px 0;
}
.day-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.day-card h4 {
  margin: 0 0 4px;
  color: #0078ff;
}
.day-card p {
  margin: 2px 0;
  font-size: 15px;
}
/* ================================
   STILE ITINERARIO DETTAGLIATO
   ================================ */

.itinerary-box,
#gpt-box {
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  line-height: 1.7;
  font-size: 15.5px;
  color: #222;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.itinerary-box strong {
  color: #0057b7;
}

.itinerary-box em {
  color: #555;
  font-style: italic;
}

.itinerary-box h1,
.itinerary-box h2,
.itinerary-box h3 {
  margin-top: 18px;
  margin-bottom: 8px;
  color: #0078ff;
  font-weight: 700;
  line-height: 1.3;
}

.itinerary-box h3::before {
  content: "🧭 ";
}

#gpt-box h3 {
  color: #0057b7;
  font-size: 17px;
  margin-top: 14px;
}

#gpt-box p {
  margin-bottom: 10px;
}

#gpt-box:hover {
  background: #fefefe;
  box-shadow: 0 0 10px rgba(0, 87, 183, 0.2);
}
