:root {
    --aradoo-green: #05FD6F;
    --aradoo-blue: #3690F3;
    --aradoo-light-grey: #F0EFEF;
    --bs-light: var(--aradoo-light-grey);
    --aradoo-grey: #EEEEEE;
    --aradoo-dark-grey: #555;
    --aradoo-dark-grey-1: #333;
    --aradoo-black: #171523;
    --primary: #24a3d8;
    --bs-primary:var(--primary);
    --primary-hover: rgba(36, 163, 216, 0.78);
    --bs-btn-bg: --primary;
    /*--aradoo-green-rgb: 5 253 111;*/
    --aradoo-green-rgb: 36 163 216;
    --surface: rgba(255, 255, 255, 0.65);
    --surface-border: rgba(0, 0, 0, 0.08);
    --ring: #6aa3ff;
    --maxw: 80vw;
}

.ai-assistant-toggle {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 3.25rem;
  height: 3.25rem;
  z-index: 1080; /* boven de meeste dingen, onder modals */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-assistant-icon {
  font-size: 1.4rem;
}

.ai-assistant-offcanvas {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + 58px);
  width: 380px;
  max-width: calc(100vw - 1rem);
  height: 42vh;
  max-height: 42vh;
  min-height: 300px;
  border-radius: 16px;
  padding: 0.2rem;
  background: #fff;
  box-shadow: 0 14px 40px rgba(16, 29, 47, 0.18);
  border: 1px solid rgba(18, 31, 50, 0.08);
  font-size: 0.75rem;
  z-index: 1070;
  display: flex;
  flex-direction: column;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.ai-assistant-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ai-assistant-offcanvas .btn,
.ai-assistant-offcanvas .form-control,
.ai-assistant-offcanvas .form-check-label,
.ai-assistant-offcanvas .dropdown-item,
.ai-assistant-offcanvas .dropdown-item-text {
  font-size: 0.75rem;
}

.ai-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
}

.ai-conversation-toolbar {
  border: 0;
  background-color: rgba(243, 245, 246, 0.5);
}

.ai-selector-toggle-btn {
  border: 1px solid #d6dde6;
  border-radius: 999px;
  background: #fff;
  color: #253140;
  font-size: 0.74rem;
  padding: 0.18rem 0.55rem;
}

.ai-selector-toggle-btn[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.conversation-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
  padding-bottom: 0.35rem;
}

.ai-conversation-help-text {
  white-space: nowrap;
}

.conversation-tab {
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  padding: 0.35rem 0.4rem;
  width: 100%;
  max-width: none;
  color: #131720;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.conversation-tab.active {
  border-color: #d4dbe3;
  background: #fff;
}

.conversation-tab-new {
  border-color: transparent;
  color: #131720;
  background: transparent;
}

.ai-conversation-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.1rem;
}

.ai-conversation-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.ai-conversation-item {
  border: 1px solid #e7eaef;
  border-radius: 0.55rem;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  flex: 1;
  width: 100%;
  min-width: 0;
  text-align: left !important;
  padding: 0.38rem 0.5rem;
  transition: all 0.15s ease;
  overflow: hidden;
}

.ai-conversation-item:hover {
  border-color: #d5dce5;
  transform: translateY(-1px);
}

.ai-conversation-item.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(36, 163, 216, 0.35), 0 2px 8px rgba(36, 163, 216, 0.16);
  background: rgba(36, 163, 216, 0.08);
}

.ai-conversation-item-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.35rem;
  min-width: 0;
}

.ai-conversation-item-title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.ai-conversation-item-badges {
  flex-shrink: 0;
  justify-content: flex-end;
}

.ai-conversation-active-pill {
  font-size: 0.65rem;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  color: #fff;
  background: var(--primary);
  flex-shrink: 0;
}

.ai-conversation-count-pill {
  border-radius: 50%;
  background-color: rgba(237, 240, 243, 0.996);
  padding: 0 6px;
  color: #39424e;
}

.ai-conversation-item-meta {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.66rem;
  opacity: 0.62;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.ai-conversation-dropdown-menu {
  min-width: 220px;
  border-radius: 0.55rem;
}

.ai-chat-info-bar {
  background: #fff;
}

.ai-chat-info-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1b2431;
}

.ai-chat-info-meta {
  font-size: 0.66rem;
  color: #778191;
}

.offcanvas-header {
  padding: 0.6rem 0.75rem;
}

#ai-assistant-close {
  width: 34px;
  height: 34px;
  background-size: 16px;
}

.ai-selector-panel {
  position: absolute;
  inset: 0;
  background: #fff;
  border-radius: 12px;
  padding: 0.6rem;
  z-index: 7;
  display: none;
  flex-direction: column;
}

.ai-selector-panel.is-open {
  display: flex;
}

.ai-selector-close-btn {
  border: 1px solid #d7dde5;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  padding: 0;
  line-height: 1;
}

.ai-chat-info-btn {
  border: 1px solid #d8dee6;
  border-radius: 999px;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #4f5f72;
  background: #fff;
}

/* simpele bubbles */
.ai-msg {
  margin-bottom: 0.5rem;
  display: flex;
}

.ai-msg-user {
  justify-content: flex-end;
}

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

.ai-msg-bubble {
  max-width: 90%;
  padding: 0.42rem 0.6rem;
  border-radius: 0.75rem;
  font-size: 1em;
}

.ai-msg-user .ai-msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 0.2rem;
}

.ai-msg-assistant .ai-msg-bubble {
  background: var(--bs-light);
  border-bottom-left-radius: 0.2rem;
}

.ai-chat-indicator {
  border-top: 1px dashed rgba(0,0,0,.06);
}


.ai-msg-thinking .ai-thinking-text {
  opacity: 0.4;
  font-size: 0.9em;
}

.ai-thinking-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}

.ai-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #adb5bd;
  animation: ai-thinking-bounce 1s infinite ease-in-out;
}

.ai-thinking-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-thinking-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-thinking-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
.ai-msg-bubble-content {
  white-space: pre-line;
}

.ai-chat-form {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: #fff;
}

#my-chat-input {
  font-size: 0.75rem;
  line-height: 1.25;
}
