:root {
  /*--chat-width: 22vw;*/
  --chat-height: 300px;
  --chat-background: #222229;
  --chat-border: 0px solid #09090a;
  --chat-border-radius: 12px;
  --chat-shadow: 4px 4px 10px rgba(0, 0, 0, 0.15);
  --header-background: #2b2b34;
  --header-border-bottom: 1px solid #13131b;
  --header-padding: 15px;
  --header-title-color: #ffffff;
  --message-padding: 12px 18px;
  --message-border-radius: 25px;
  --user-bubble-color: #34343f;
  --agent-bubble-color: #1f1f2b;
  --agent-text-color: #ECECED;
  --user-text-color: #ECECED;
  --chat-button-background: #25ffc1;
  --chat-button-hover-background: #25ffc1;
  --chat-button-active-background: #25ffc1;
  --chat-text-color: #ffffff;
  --chat-open-button-background: linear-gradient(180deg, #00BCD4 0%, rgba(0, 160, 114, 0.7) 100%); 
  --chat-input-border: 1px solid #444;
  --chat-input-focus-border: #666;
  --chat-input-background: #09090a;
  --chat-input-padding: 10px;
  --icon-size: 36px;
  --icon-user-background: #25ffc1;
  --icon-agent-background: #444;
  --icon-text-color: white;
  --waiting-dots-color: #777;
  --scrollbar-color: #333;
  --scrollbar-thumb-color: #555;
}

 .highlighted {
   border: 2px solid red !important;
   transition: border-color 0.5s ease-out;
 }

 .ai-tooltip {
   position: absolute;
   background-color: rgba(0, 0, 0, 0.8);
   color: #fff;
   padding: 8px 12px;
   border-radius: 5px;
   font-size: 14px;
   white-space: nowrap;
   /* Keep nowrap for single line tooltips, but limit width */
   z-index: 9999;
   pointer-events: none;
   opacity: 0;
   transition: opacity 0.3s ease-in-out;
   max-width: 80vw;
   /* Example: Limit width to 80% of viewport width */
   overflow: hidden;
   /* Prevent content overflow */
   text-overflow: ellipsis;
   /* Add ellipsis if text is still too long after max-width and nowrap */
 }

 .ai-tooltip.show {
   opacity: 1;
 }

 .click-feedback {
   position: absolute;
   /* Needed for top/left positioning */
   width: 10px;
   /* Size of the feedback dot */
   height: 10px;
   border-radius: 50%;
   /* Make it a circle */
   background-color: rgba(255, 0, 0, 0.7);
   /* Semi-transparent red color */
   border: 1px solid white;
   pointer-events: none;
   /* Make it non-interactive */
   opacity: 1;
   transition: opacity 0.3s ease-out, transform 0.2s ease-out;
   /* Add transitions for smooth appearance/disappearance */
   transform: scale(1);
   /* Initial scale */
 }

 .click-feedback.fade-out {
   opacity: 0;
   /* Fade out */
   transform: scale(1.5);
   /* Slightly scale up while fading */
 }
#chat-container {
  bottom: 20px;
  right: 20px;
  min-width: 400px;
  width: 30vw;
  height: 90vh;
  min-height: var(--chat-height);
  background-color: var(--chat-background);
  border: var(--chat-border);
  border-color: #494955;
  border-radius: var(--chat-border-radius);
  box-shadow: var(--chat-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  transition:all cubic-bezier(0.075, 0.82, 0.165, 1);
}

.chat-container.pip-active-inline {
  border-radius: 0 !important
}

.header-title{
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-title img
{
  max-height: 24px
}

.header-button{
display: flex; 
align-items: center;  
background: none;
border: none;
cursor: pointer;
padding: 8px;
border-radius: 6px;
}
.header-button:hover{
  background: #7a7a7a42;
}

.chat-container.pip-active-inline .header-button#close-chat-button,.chat-container.pip-active-inline .header-button#popout-chat-button {
  display: none !important;
}

.chat-container.pip-active-inline{
  width: 99.5%!important;
  height: 99.7svh!important;
  overflow: hidden;
}


@media (max-width: 720px) {
  #chat-container {
    width: 85%;
    min-width: auto;
  }
}

@media (max-width: 720px) {
  #chat-container {
    height: 85svh;
    min-width: auto;
  }
}

#chat-header {

  padding: var(--header-padding);
  border-bottom: var(--header-border-bottom);
  /*font-family : Arial,Helvetica,sans-serif;*/
  display: flex;
  justify-content: space-between;
  position: relative;
  /* make header a positioning context*/
  align-items: center;
}



#chat-header span {
  margin-right: 10px;
}

#header-right-items {
  display: flex;
  align-items: center;
  gap: 4px;
}
/*
#close-chat-button {
  margin-left: 24px;
}
*/

#chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-color);
}

#chat-messages::-webkit-scrollbar {
  width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
  background: var(--scrollbar-color);
  border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
  border-radius: 10px;
  border: 2px solid var(--scrollbar-color);
}



#chat-input {
  padding: 15px;
  border-top: var(--chat-border);
  display: flex;
  align-items: center;
  background-color: var(--header-background)
}

.message-container {
  display: flex;
  align-items: baseline;
  margin-bottom: 15px;
}

.user-message-container {
  justify-content: flex-end;
  margin-right: 0;
  margin-left: 10%;
}

.agent-message-container {
  justify-content: flex-start;
}

.message {
  padding: var(--message-padding);
  border-radius: var(--message-border-radius);
  max-width: 90%;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.4;
  display: inline-block;
  /*font-family: Arial, Helvetica, sans-serif;*/
}

.user-message {
  background-color: var(--user-bubble-color);
  color: #ffffff;
}

.agent-message {
      color: var(--agent-text-color);
     /* display: flex;*/
      flex-wrap: wrap;
      gap: 8px;
      padding: 4px;
}

.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: 50%;
  margin-right: 15px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2em;
  color: var(--icon-text-color);
  font-weight: bold;
  margin-bottom: 0;
}

.user-icon {
  background-color: #2e7561;
}

.agent-icon {
  background-color: var(--icon-agent-background);
}


#message-input {
  flex-grow: 1;
  margin-right: 10px;
  padding: var(--chat-input-padding);
  border: var(--chat-input-border);
  border-radius: var(--chat-border-radius);
  background-color: var(--chat-input-background);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: white;
  min-height: 23px;
}

#message-input:focus {
  border-color: var(--chat-input-focus-border);
  box-shadow: 0 0 0 2px rgba(var(--user-bubble-color-rgb, 0, 139, 255), 0.15);
}


#waiting-dots,
#agent-typing-icon {
  display: none;
}


/* Agent Typing Icon Styles - For Message Area */
.agent-typing-message .icon {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  margin-bottom: 3px;
}

.agent-typing-message .message {
  background-color: transparent;
  padding: 0;
  display: flex;
  align-items: baseline;
}


#agent-typing-dots {
  display: flex;
  width: 20px;
  justify-content: space-around;
  align-items: flex-end;
}

.typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--waiting-dots-color);
  animation: dot-pulse 1.2s infinite;
  margin-bottom: 2px;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.4s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.8s;
}


@keyframes dot-pulse {

  0%,
  80%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}


.memory-container {
  display: flex;
  align-items: center;
  margin-right: 32px;
}

.memory-checkbox-label {
  color: #999;
  font-size: 0.8em;
  margin-left: 8px;
}

.memory-checkbox {
  position: relative;
  width: 40px;
  height: 22px;
  -webkit-appearance: none;
  background: #ccc;
  outline: none;
  border-radius: 15px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, .2);
  cursor: pointer;
  transition: .4s;
}

.memory-checkbox:checked {
  background: var(--chat-button-background);
}

.memory-checkbox:before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  top: 0;
  left: 0;
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  transition: .4s;
}

.memory-checkbox:checked:before {
  left: 18px;
}

button:hover {
  opacity: 0.8;
}

#send-button {
  background-color: var(--chat-button-background);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #0f172a;

  width: 42px;
  height: 42px;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  border-radius: var(--chat-border-radius);
  cursor: pointer;
  box-shadow: var(--chat-shadow);
  transition: background-color 0.3s ease;
}

.tag-cloud {
    display: inline-block;
    color: white;
    padding: 8px 20px;
    /*font-family: Arial;*/
    border-radius: 25px;
    background-color: #2196F3;
    margin-top: 8px;
    margin-right: 5px;
}


select {
    border: 0;
    background: transparent;
    height: 32px;
    border: 1px solid #d8d8d8;
    width: 350px;
    -webkit-appearance: none;
}

.replybutton {
    margin:5px;
    /*color: var(--chat-button-background)!important;*/
    padding: 8px 20px;
    /*font-family: Arial, Helvetica, sans-serif;*/
    border-radius: 16px;
    /*border: 2px solid var(--chat-button-background)!important;*/
    
    border: 2px solid #45464A !important;
    color: #ECECED !important;
    background-color: #29292C !important;
       
    background-color: #00000000;
    border: none;
    display: inline-block;
    justify-content: center;
    align-items: center;
    color: #0f172a;
    width: auto;
    min-height: 42px;
    text-decoration: none;
    font-size: 16px;
    border-radius: var(--chat-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    
}



.replylink {
  cursor: pointer;
  /*font-family: Arial, Helvetica, sans-serif;*/
  /* Makes it behave like a link */
  text-decoration: underline;
  /* Adds an underline to resemble a link */
  transition: all 0.3s ease;
}

.replylink:hover {
  color: #1abc9c;
  /* Slightly different color on hover */
  text-decoration: none;
  /* Removes underline on hover */
}

#send-button:hover {
  background-color: var(--chat-button-hover-background);
  opacity: 0.8;
}
#cr{
 /* font-family: Arial, Helvetica, sans-serif;*/
  display: flex;
  border:1px solid #45464A;
  justify-content: center;
  color: #9D9D9D;
  font-size: 10px;
  padding: 5px;
  opacity: 0.8;
  background-color: #2D2D32;
}

#cr a
{
color: #9D9D9D;
margin-left: 5px;
}

#send-button:active {
  background-color: var(--chat-button-active-background);
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
}


.error-message {
  color: #FFB2B8;
  padding: 10px 15px;
  border-radius: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

#open-chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 12px;
  width: 80px;
  height: 80px;
  text-align: center;
  text-decoration: none;
  display: none;
  justify-content: center;
  align-items: center;
  /* Initially hidden, controlled by JS */
  font-size: 17px;
  border-radius: 100px;/* Ellipse 2 */
  border: none;
  background: var(--chat-open-button-background);
  cursor: pointer;
  box-shadow: var(--chat-shadow);
  transition: background-color 0.3s ease;
  z-index: 999;
  transition: all linear 0.2s;
  backdrop-filter: blur(10px);
  outline-offset: 4px;
    outline-color: rgba(128, 128, 128, 0.125);
    outline-style: solid;
    outline-width: 0px;
}

#open-chat-button:hover {
  background-color: var(--chat-button-hover-background);
  opacity: 0.8;
  transform: scale(1.1);
  outline-width: 4px;
}

#open-chat-button:active {
  transform: scale(0.9);
}



#agent-dropdown-container {
  position: absolute;
  top: 110%;
  right: 15px;
  background-color: var(--chat-background);
  border: var(--chat-border);
  border-radius: var(--chat-border-radius);
  box-shadow: var(--chat-shadow);
  padding: 10px;
  display: none;
  z-index: 1002;
}

#agent-dropdown {
  width: 200px !important;
  /* Adjust as needed */
  padding: 0px 8px;
  border: 1px solid #cccccc1e;
  border-radius: 5px;
  font-size: 15px;
  outline: none;
  color: #fff;
  background: #cccccc0d;
}

#agent-dropdown option {
  padding: 8px;
}

/* Hide agents tag from displaying */
agents {
  display: none;
}


#defaultbackground {
    color: grey;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    text-align: center;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}



    video.pipactive {
        display: block;
    }

pip {
    content: "Picture in Picture Mode Active";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

h1, h2, h3, h4 {
  margin: 0!important;
}

@media all and (display-mode: picture-in-picture) {
    body {
        margin: 0;
    }

    h1 {
        font-size: 0.8em;
    }
}

