.ai-assistant-widget {
  position: fixed;
  z-index: 1080;
  bottom: 1.25rem;
  max-width: calc(100vw - 1.5rem);
}

.ai-assistant-widget--bottom-right {
  right: 1rem;
}

.ai-assistant-widget--bottom-left {
  left: 1rem;
}

.ai-assistant-widget__launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #212529;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  font-weight: 600;
}

.ai-assistant-widget__panel {
  width: min(25rem, calc(100vw - 1rem));
  margin-top: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.ai-assistant-widget__header,
.ai-assistant-widget__footer {
  padding: 1rem;
  background: #fff;
}

.ai-assistant-widget__header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ai-assistant-widget__header-actions {
  display: flex;
  gap: 0.5rem;
}

.ai-assistant-widget__header-button {
  border: 0;
  background: transparent;
  color: #495057;
  font-size: 0.875rem;
  padding: 0;
}

.ai-assistant-widget__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.ai-assistant-widget__subtitle,
.ai-assistant-widget__empty,
.ai-assistant-widget__message-content {
  color: #6c757d;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.ai-assistant-widget__body {
  height: min(28rem, 60vh);
  overflow: auto;
  padding: 1rem;
  background: #f8f9fa;
}

.ai-assistant-widget__messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-assistant-widget__empty {
  padding: 1.5rem 1rem;
  text-align: center;
}

.ai-assistant-widget__empty-icon {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  font-size: 1.25rem;
}

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

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

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

.ai-assistant-widget__bubble {
  max-width: 85%;
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.ai-assistant-widget__bubble--assistant {
  background: #fff;
  color: #212529;
}

.ai-assistant-widget__bubble--user {
  background: #0d6efd;
  color: #fff;
}

.ai-assistant-widget__bubble-label {
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
}

.ai-assistant-widget__bubble-actions {
  padding-top: 0.625rem;
  text-align: right;
}

.ai-assistant-widget__typing {
  padding-top: 0.75rem;
}

.ai-assistant-widget__typing-pill {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.625rem 0.875rem;
  border-radius: 999px;
  background: #fff;
  color: #6c757d;
  font-size: 0.875rem;
}

.ai-assistant-widget__input {
  resize: vertical;
  min-height: 6rem;
}

.ai-assistant-widget__footer {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.ai-assistant-widget__footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 575.98px) {
  .ai-assistant-widget {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 0.5rem;
    max-width: none;
  }

  .ai-assistant-widget__panel {
    width: 100%;
  }

  .ai-assistant-widget__launcher {
    width: 100%;
    justify-content: center;
  }
}
