/* أيقونة الدردشة العائمة */
#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #707F78 !important;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}
#chat-icon:hover{
   background-color: #8c9c95 !important;
}
/* نموذج الدردشة */
#chat-box {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none; /* مخفي بشكل افتراضي */
    z-index: 1000;
}


#chat-box header {
    background-color: #707F78 !important;
    /* background-color: #007bff; */
    color: white;
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-align: center;
}

#chat-box .chat-body {
    padding: 10px;
    height: 200px;
    overflow-y: auto;
}


#chat-box #send-button svg:hover path {
    fill: #8c9c95;
}

#chat-box footer {
    padding: 10px;
    border-top: 1px solid #ddd;
}

#chat-box footer input {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}





#chatbot-toggle{

    position: fixed;
    bottom: 25px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: white;
    font-size: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.2s ease, background 0.3s ease;


}

#chatbot-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 340px;
  height: 460px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 14px;
  z-index: 1000000;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

#chatbot-container .chatbot-header {
  background: linear-gradient(135deg, #007bff, #00c6ff);
  color: white;
  padding: 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#chatbot-container .chatbot-header span {
  flex-grow: 1;
}

#chatbot-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#zoomBtn{
    padding: 2px 4px;
    margin-inline-end: 5px;
}
#clearChatBtn{
    padding: 2px 4px;
    margin-inline-end: 5px;
}

.full-screen-div{
    width: 50% !important;
    height: 75% !important;
}
#chatbot-container .chatbot-input {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid #ddd;
  padding: 10px;
  background: #f0f2f5;
}

#chatbot-container .chatbot-send-wrapper {
  display: flex;
  align-items: center;
  padding-left: 8px;
}



.chatbot-message {
  padding: 10px 14px;
  border-radius: 18px;
  max-width: 80%;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
  user-select: text;
}


/* Example animation (add this to your stylesheet if not defined elsewhere) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* nsh */

#chatbot-container textarea {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    resize: none;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    flex-grow: 1;
    min-height: 45px;
    max-height: 75px;
    padding-inline-end: 40px;
}

#chatbot-container textarea:focus{
    border-color: #007bff !important;
}

#chatbot-container textarea,
#chatbot-container textarea:hover,
#chatbot-container textarea:focus{
    background-color: #fff !important;
}

#chatbot-container .sendBtn{
    position: absolute;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
}
#imageSearchBtn{
  background-color: #009688;
}
#sendBtn{
  background-color: #007bff;
}
 
#imageSearchBtn.imgChecked{
  border: #F44336 solid;
}
/* Applies if #sendBtn or one of its ancestors has lang="en" */
#chatbot-container:lang(en) #sendBtn {
    left: 72%;
}

/* Applies if #sendBtn or one of its ancestors has lang="ar" */
#chatbot-container:lang(ar) #sendBtn {
    right: 72%;
}

#chatbot-container.full-screen-div:lang(en) #sendBtn {
    left: 83%;
}

#chatbot-container.full-screen-div:lang(ar) #sendBtn {
    right: 83%;
}

/* Applies if #sendBtn or one of its ancestors has lang="en" */
#chatbot-container:lang(en) #imageSearchBtn {
    left: 83%;
}

/* Applies if #imageSearchBtn or one of its ancestors has lang="ar" */
#chatbot-container:lang(ar) #imageSearchBtn {
    right: 83%;
}

#chatbot-container.full-screen-div:lang(en) #imageSearchBtn {
    left: 90%;
}

#chatbot-container.full-screen-div:lang(ar) #imageSearchBtn {
    right: 90%;
}