/* Test My Admin voice + optional text panel */
.demo-voice-hint {
  margin: 0;
  font-size: 10px;
  color: #6f7785;
  text-align: center;
  max-width: 220px;
  line-height: 1.4;
}

.demo-text-fallback {
  border: 0;
  background: transparent;
  color: #315cae;
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
  cursor: pointer;
}

.demo-error {
  margin: 0;
  max-width: 260px;
  font-size: 11px;
  line-height: 1.4;
  color: #9b1c1c;
  text-align: center;
}

.minimal-call-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.minimal-live-demo.has-chat-open {
  min-height: 560px;
  justify-content: flex-start;
  gap: 20px;
}

.minimal-live-demo.has-chat-open .demo-interaction {
  display: none;
}

.demo-chat-panel {
  width: min(100%, 380px);
  background: #fff;
  border: 1px solid #dce4f0;
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(31, 55, 96, 0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 520px;
  max-height: 620px;
}

.demo-chat-panel[hidden] {
  display: none !important;
}

.demo-chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #e8eaee;
  background: linear-gradient(180deg, #f8faff 0%, #fff 100%);
}

.demo-chat-panel__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.demo-chat-panel__identity img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #e4ebfa;
}

.demo-chat-panel__identity strong,
.demo-chat-panel__identity span {
  display: block;
}

.demo-chat-panel__identity strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.demo-chat-panel__identity span {
  font-size: 10px;
  color: #6f7785;
  margin-top: 3px;
}

.demo-chat-panel__identity span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green, #22a96b);
  margin-right: 5px;
  vertical-align: middle;
}

.demo-chat-panel__close {
  border: 0;
  background: #f1f3f7;
  color: #4b5563;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.demo-chat-panel__close svg {
  width: 16px;
  height: 16px;
}

.demo-chat-panel__stream {
  flex: 1;
  min-height: 240px;
  overflow: auto;
  padding: 16px;
  background: #f6f7f9;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-chat-panel__stream .bubble {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.demo-chat-panel__stream .bubble.admin {
  align-self: flex-start;
  background: #e8eaee;
  color: #1b2230;
  border-bottom-left-radius: 4px;
}

.demo-chat-panel__stream .bubble.user {
  align-self: flex-end;
  background: var(--blue, #245ee8);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.demo-chat-panel__stream .bubble.error {
  align-self: flex-start;
  background: #fff0f0;
  color: #9b1c1c;
  border: 1px solid #f3c1c1;
}

.demo-chat-panel__stream .typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: #e8eaee;
  border-radius: 14px;
}

.demo-chat-panel__stream .typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7b808a;
  animation: demo-blink 1s infinite;
}

.demo-chat-panel__stream .typing i:nth-child(2) {
  animation-delay: 0.2s;
}

.demo-chat-panel__stream .typing i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes demo-blink {
  50% {
    opacity: 0.2;
  }
}

.demo-chat-panel__suggestions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.demo-chat-panel__suggestions::-webkit-scrollbar {
  display: none;
}

.demo-chat-panel__suggestions button {
  border: 1px solid #d2d8e3;
  background: #f8faff;
  color: #315cae;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}

.demo-chat-panel__suggestions button:hover {
  border-color: #245ee8;
}

.demo-chat-panel__composer {
  display: flex;
  gap: 8px;
  margin: 12px 14px 8px;
  border: 1px solid #b9c1cf;
  border-radius: 14px;
  padding: 6px;
  background: #fff;
}

.demo-chat-panel__composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 8px;
  font-size: 13px;
  background: transparent;
}

.demo-chat-panel__composer button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  background: var(--blue, #245ee8);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.demo-chat-panel__composer button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.demo-chat-panel__composer button svg {
  width: 18px;
  height: 18px;
}

.demo-chat-panel__note {
  margin: 0 14px 14px;
  font-size: 10px;
  color: #9096a1;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .demo-chat-panel {
    width: min(100%, 100%);
    min-height: 480px;
    border-radius: 18px;
  }

  .minimal-live-demo.has-chat-open {
    width: 100%;
  }
}
