.messages {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    height: 54vh;
    overflow-y: auto;
    background: #181818;
}

.msg {
    margin: 12px 0;
    line-height: 1.6;
    white-space: pre-wrap;
    flex: 1;
    padding: 16px;
    border-radius: 16px 16px 16px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #2a3138;
}

.user {
    color: #9cdcfe;
    text-align: right;
}

.assistant {
    color: #dcdcaa;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

.chat-input {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;

  background: #f4f4f4;
  color: #111;

  padding: 0;
  line-height: 0;
}

.btn-icon {
  width: 21px;
  height: 21px;

  display: block;

  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;

  pointer-events: none;
}

.icon-btn:hover {
  background: #e8e8ea;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.28);
}

.icon-btn .icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.send-btn {
  background: #202123;
  color: #ffffff;
}

.send-btn:hover {
  background: #000000;
}

.mic-btn:hover {
  background: #ffe8e8;
  color: #d93025;
}

.send-btn:disabled {
  cursor: not-allowed;
  background: #d9d9de;
  color: #8e8ea0;
}

.mic-btn.is-recording {
  background: #ffe8e8;
  color: #d93025;
}

.updating-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);

  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.updating-box {
  min-width: 260px;
  padding: 20px;
  border-radius: 10px;
  background: white;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.progress-track {
  width: 220px;
  height: 10px;
  background: #ddd;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: #333;
  transition: width 0.2s linear;
}

.progress-text {
  font-size: 13px;
  color: #333;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}