html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  background-color: #333;
  color: white;
}

/* Otsikko (jos sellainen tulee joskus) */
h2 {
  color: #b1b1b1;
  font-size: 3rem;
  margin: 1rem;
}

/* Chat-ikkuna vie kaiken tilan paitsi syöttöalueen */
.chatlog {
  flex: 1;
  border: 1px solid #222;
  padding: 1em;
  overflow-y: auto;
  background: #252525;
  font-size: 1.5rem;
}

/* Viestien tyylit */
.bot, .user, .system {
  white-space: pre-wrap;
  font-family: monospace;
}
.bot { color: #ffffff; }
.user { color: #b1b1b1; }
.system {
  color: gray;
  font-style: italic;
}

/* Info-teksti */
#info {
  font-style: italic;
  color: darkgray;
  font-size: 1.2rem;
  text-align: right;
  margin: 0.5rem 1rem;
}

.input-block {
    display: flex;
    width: 100%;
    align-items: center;
}

/* Syöttöalueen säiliö alhaalla */
.chat-input-container {
  align-items: center;
  gap: 0.5rem;
  /* padding: 1rem; */
  background-color: #f0f0f0;;
}

.chat-input-container:disabled {
  background-color: #a0a0a0;
}

/* Tekstikenttä */
.chat-textarea {
  flex: 1;
  resize: none;
  padding: 0.5rem;
  font-size: 1.5rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background-color: #f0f0f0;
  height: 8rem;
  line-height: 1.4;
}

.chat-textarea:focus {
  outline: none;
  border: none;
}

/* Lähetä-nappi */
.send-button {
  width: 4rem;
  height: 4rem;
  background-color: #F7931A;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin: 10px;
}
.send-button:hover {
  background-color: #8c8c8c;
}
.send-button:disabled {
  background-color: #b9b9b9;
}
.send-button svg {
  width: 2rem;
  height: 2rem;
  fill: white;
}

/* Scrollbar-tyylit */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 6px;
  border: 3px solid #777;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}
::-webkit-scrollbar-corner {
  background: transparent;
}
/* 🎤 Mikrofoni-nappi */
.mic-button {
  width: 4rem;
  height: 4rem;
  background-color: #28a745;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  margin: 10px;
}
.mic-button:hover {
  background-color: #1c7c31;
  transform: scale(1.05);
}
.mic-button svg {
  width: 2rem;
  height: 2rem;
  fill: white;
}
.mic-button.recording {
  background: #dc3545; /* punainen kun äänitys päällä */
  animation: pulse 1.2s infinite;
}

/* Pieni syke-efekti punaiselle mikille */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(220, 53, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Responsiivisuus: pienillä ruuduilla fontit ja elementit pienemmäksi */
@media (max-width: 600px) {
  .chatlog {
    font-size: 1rem;
  }

  .chat-textarea {
    font-size: 1rem;
    height: 3rem;
  }

  .send-button {
    width: 3rem;
    height: 3rem;
  }

  .send-button svg {
    width: 1.5rem;
    height: 1.5rem;
  }

  #info {
    font-size: 1rem;
  }

  h2 {
    font-size: 2rem;
  }
}
