.ai-assistant-admin__layout {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.ai-assistant-admin__panel {
  background: var(--w-color-surface-page, #fff);
  border: 1px solid var(--w-color-border-furniture, #d9d9d9);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ai-assistant-admin__section {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--w-color-border-furniture, #d9d9d9);
}

.ai-assistant-admin__section:last-child {
  border-bottom: 0;
}

.ai-assistant-admin__muted {
  color: var(--w-color-text-context, #666);
}

.ai-assistant-admin__chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 42rem;
}

.ai-assistant-admin__business-toggle {
  padding: 1rem 1.25rem 0;
}

.ai-assistant-admin__business-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.ai-assistant-admin__business-help {
  margin: 0.5rem 0 0;
}

.ai-assistant-admin__messages {
  flex: 1;
  overflow: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 46rem;
}

.ai-assistant-admin__bubble-row {
  display: flex;
}

.ai-assistant-admin__bubble-row--assistant {
  justify-content: flex-start;
}

.ai-assistant-admin__bubble-row--user {
  justify-content: flex-end;
}

.ai-assistant-admin__bubble {
  max-width: 44rem;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ai-assistant-admin__bubble--assistant {
  background: var(--w-color-surface-field, #f6f6f8);
  color: var(--w-color-text-label, #222);
}

.ai-assistant-admin__bubble--user {
  background: var(--w-color-primary, #007d7e);
  color: #fff;
}

.ai-assistant-admin__bubble-label {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  opacity: 0.8;
  letter-spacing: 0.01em;
}

.ai-assistant-admin__bubble-content {
  white-space: pre-wrap;
  line-height: 1.55;
  word-break: break-word;
}

.ai-assistant-admin__bubble-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.6rem;
}

.ai-assistant-admin__empty {
  text-align: center;
  padding: 3.5rem 1rem;
}

.ai-assistant-admin__empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--w-color-surface-field, #f6f6f8);
  font-size: 1.75rem;
}

.ai-assistant-admin__typing {
  padding: 0 1.25rem 1rem;
}

.ai-assistant-admin__typing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--w-color-surface-field, #f6f6f8);
  color: var(--w-color-text-context, #666);
  font-size: 0.9rem;
}

.ai-assistant-admin__typing-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.6;
  animation: ai-assistant-admin-blink 1.2s infinite ease-in-out;
}

.ai-assistant-admin__typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-assistant-admin__typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-assistant-admin-blink {
  0%, 80%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.ai-assistant-admin__form {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--w-color-border-furniture, #d9d9d9);
}

.ai-assistant-admin__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ai-assistant-admin__title {
  margin: 0 0 0.5rem;
}

.ai-assistant-admin__subtitle {
  margin: 0;
}

.ai-assistant-admin__section-title {
  margin-top: 0;
}

.ai-assistant-admin__warning {
  margin: 0;
}

.ai-assistant-admin__chat-title {
  margin: 0 0 0.35rem;
}

.ai-assistant-admin__error {
  margin-bottom: 1rem;
}

.ai-assistant-admin__error-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ai-assistant-admin__input-meta {
  margin-top: 0.75rem;
}

.ai-assistant-admin__input-help {
  font-size: 0.9rem;
}

.ai-assistant-admin__counter {
  margin-left: 0.75rem;
}

@media (max-width: 991px) {
  .ai-assistant-admin__layout {
    grid-template-columns: 1fr;
  }

  .ai-assistant-admin__chat-shell {
    min-height: 36rem;
  }
}
