/***********************************
 * 1) Utility classes
 ***********************************/

/* Use .hidden to hide elements by default */
.hidden {
  display: none !important;
}

/* Visually hidden text for accessibility (screen readers) */
.visually-hidden {
  position: absolute;
  width: 1px; 
  height: 1px;
  padding: 0; 
  margin: -1px;
  overflow: hidden; 
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/***********************************
 * 2) Small "Ask" field overlay
 ***********************************/

.overlay-ask-field {
  position: absolute; /* or absolute if you prefer */
  left: 50% !important;
  transform: translateX(-50%);
  bottom: 80px;
  z-index: 3;
  background: #fff;
  padding: 8px;
  border-radius: 25px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  z-index: 4;
}

.overlay-ask-field input[type="text"] {
    width: 400px;
    min-width: 200px;
    max-height: 24px;
    white-space: nowrap;
    outline: none;
    color: #372d2d;
  padding: 6px;
  border: 0px solid #ccc;
  border-radius: 4px;
}

@media (max-width: 480px) {
    .overlay-ask-field input[type="text"] {
        width: 290px;
    }
}

.overlay-ask-field button, .chat-footer button {
  cursor: pointer;
  background: #fff;
  border: 0px solid #666;
  padding: 18px 18px;
  border-radius: 15px;
  background-image: url(/fileadmin/vimi/images/ym_img/yw_btn/yw_send.webp);
  background-size: contain;
  background-repeat: no-repeat;
}

/***********************************
 * 3) Fullscreen Chat Overlay
 ***********************************/

.chat-overlay {
  position: fixed;
  width: 600px;
  bottom: 75px; 
  left: 50% !important;
  transform: translateX(-50%);
/*  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); 
*/
  z-index: 4;
  display: flex; 
  align-items: center;
  justify-content: center;
}

/* The actual chat "window" in the center */
.chat-window {
  background: #f5f2e2ad;
  width: 90%;
  height: 400px;
  max-width: 600px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgb(0 0 0 / .2);
}

@media (max-width: 480px) {
    .chat-window {
        max-width: 370px;
    }
}

/***********************************
 * 4) Chat Header
 ***********************************/

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f2e2;
  padding: 0px;
  border-bottom: 1px solid #ccc;
/*  visibility: hidden;*/
}

.chat-header h2 {
    padding: 5px 0px 0px 20px;
    font-size: 1.2rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #7a7971bd;
  cursor: pointer;
}

/***********************************
 * 5) Chat Body (scrollable area)
 ***********************************/

.chat-body {
  flex: 1;
  overflow-y: auto;
/*  background: #f9f9f9; */
  padding: 10px;
  color: #615854;
    background-image: url(/fileadmin/vimi/images/ym_img/YM_logo/yummy_world_ai.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 90%;
    background-position-x: 27%;
}

.chat-body h5{
  font-size: 1.1rem;
}

/***********************************
 * 6) Chat Footer (input + button)
 ***********************************/

.chat-footer {
    background: #fff;
    padding: 11px;
    border-radius: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    z-index: 4;
}

.chat-footer .input-text {
  flex: 1;
  width: 400px;
    min-width: 200px;
    max-height: 24px;
    white-space: nowrap;
    outline: none;
    color: #372d2d;
    padding: 6px;
    border: 0px solid #ccc;
    border-radius: 4px;
}


/***********************************
 * 7) Message Bubbles
 ***********************************/

.message {
  margin-bottom: 8px;
}

/* The bubble container */
.bubble {
  border-radius: 6px;
  padding: 8px;
  background: #e1e1e1;
}

/* Distinguish user vs. assistant backgrounds */
.user-message .bubble {
  background: #cfe9ff; /* Light blue for user messages */
  margin-left: 40px;
}

.assistant-message .bubble {
  background: #e8e8e8; /* Light gray for assistant messages */
  margin-right: 40px;
}

/* The author line (e.g. "You", "Assistant") */
.author {
  font-weight: bold;
  margin-bottom: 4px;
}

/***********************************
 * 8) Typing Indicator (three dots)
 ***********************************/

/* You can display these dots when the assistant is "thinking" or responding */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-indicator .dot {
  width: 8px;
  height: 8px;
  background-color: #666;
  border-radius: 50%;
  animation: typingDots 1s infinite ease-in-out;
}

.dot1 { animation-delay: 0s; }
.dot2 { animation-delay: 0.2s; }
.dot3 { animation-delay: 0.4s; }

@keyframes typingDots {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

