:host,
#kontext-chatbot-react-root,
.chatbot-widget-wrapper,
* {
    /* Variabile Artesana */
    --kontext-color-bg-ai-icon: #f5f1ed;
    --kontext-color-primary-dark: #16705d;
    --kontext-color-primary-blue: #108e73;
    --kontext-color-primary-blue-hover: #005644;
    --kontext-color-text-primary: #005644;
    --kontext-color-border-purple: #108e73;
    --kontext-color-border-purple-hover: #005644;
    --kontext-color-text-code: #108e73;
    --kontext-font-family-base: Albra-medium, sans-serif;
    --kontext-font-family-mono: Albra-medium, sans-serif;
    --kontext-color-bg-typing: transparent;
    --kontext-predefined-question-btn-font-size: 1rem;
    
    /* Variabile extra necesare pentru calc() și var() */
    --kontext-spacing: 0.25rem;
    --kontext-radius-2xl: 1.125rem;
    --kontext-radius-3xl: 1.875rem;
    --kontext-color-text-white: #ffffff;
    --kontext-color-hover-bg-light: #f8f9ff;
    --kontext-color-hover-bg-lighter: #f0f0ff;
    --kontext-color-border-input-focus: #cbd5e1;
    --kontext-transition-fast: all 0.2s;
}

/* ============================
   STILURI CHATBOT
   ============================ */

/* Widget header title - verde Artesana */
.chatbot-widget-title {
    color: #005644 !important;
    font-size: 1rem !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
}

/* Widget header left alignment */
.chatbot-widget-header-left {
    align-items: flex-end !important;
    gap: 0px !important;
}

/* Widget logo image */
.chatbot-widget-logo img {
    height: auto !important;
}

/* Messages background cu pattern Artesana */
.chatbot-messages {
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.6)
        ),
        url("https://artesana.ro/wp-content/uploads/2020/10/footer-bg.png.webp") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% !important;
}

/* Mobile override */
@media (max-width: 768px) {
    .chatbot-messages {
        background-position: left bottom !important;
        background-size: auto !important;
    }
}

/* User message bubble - verde Artesana */
.bubble-user {
    background-color: #16705df0 !important;
}

/* AI message content - bej transparent */
.message-ai .message-content {
    background-color: #eae8e2d9 !important;
    border-radius: var(--kontext-radius-2xl) !important;
    padding-inline: calc(var(--kontext-spacing) * 4) !important;
    padding-block: calc(var(--kontext-spacing) * 1.5) !important;
}

/* AI icon - transparent */
.ai-icon {
    background-color: transparent !important;
    width: 3rem !important;
}

/* Predefined questions - alb transparent cu border */
.predefined-question-btn {
    background-color: #ffffffd4 !important;
}

.chatbot-widget-container.chatbot-widget-maximized .chatbot-widget-title {
    font-size: 1.5rem !important;
}

.chatbot-widget-container:not(.chatbot-widget-maximized) .chatbot-messages {
    background-position: left calc(100% + 20px) !important;
    background-size: auto !important;
}

.chatbot-widget-button {
  border: 2px solid #108e73 !important;
  border-radius: 17px !important;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .chatbot-widget-wrapper {
    right: 4.25rem !important;
  }

  .chatbot-widget-wrapper:has(.chatbot-widget-container.chatbot-widget-maximized) {
    right: 1.25rem !important;
  }
}

/* Bubble message */
.chatbot-widget-button-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chatbot-widget-bubble {
  position: absolute;
  bottom: 100%;
  right: 50%;
  transform: translateX(calc(50% - 30px));
  margin-bottom: 0.1rem;
  width: auto;
  min-width: 100px;
  max-width: 320px;
  height: auto;
  background-color: var(--kontext-color-bg-white);
  border: 2px solid var(--kontext-color-primary-blue);
  border-radius: var(--kontext-radius-2xl);
  padding: 0.75rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

/* Săgeata bubble-ului - simplă, clasică */
.chatbot-widget-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: calc(50% + 30px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid var(--kontext-color-primary-blue);
}

.chatbot-widget-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: calc(50% + 30px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--kontext-color-bg-white);
  z-index: 1;
}

.chatbot-widget-bubble-text {
  font-family: var(--kontext-font-family-base);
  font-size: 1rem;
  color: var(--kontext-color-text-primary);
  font-weight: 600;
  text-align: center;
  max-width: 280px;
  line-height: 1.3;
  white-space: pre-wrap;
}

/* Mobile adjustments pentru bubble */
@media (max-width: 768px) {
  .chatbot-widget-bubble {
    right: 0;
    transform: translateX(0);
    margin-right: 0;
    max-width: calc(100vw - 90px);
  }

  .chatbot-widget-bubble::before {
    left: auto;
    right: 25px;
    transform: translateX(0);
  }

  .chatbot-widget-bubble::after {
    left: auto;
    right: 25px;
    transform: translateX(0);
  }
}




