@import url('https://fonts.googleapis.com/css2?family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');

.chat-overlay{
    font-size: 10px; /* 1em = 16px */
    font-family: 'Work Sans', sans-serif;
    top: 0;
    height: 100%;
    width: 100%;
}

.mlr-widget-container,
.mlr-chatbox-widget,
.voice-chatbox-widget,
.video-widget-container,
.error-screen,
.disclaimer-screen,
.thank-you-screen,
.no-permission-screen {
    width: 100%;
    height: 100%;
    font-family: 'Work Sans', sans-serif;
}

.pos-relative {
  position: relative;
}

.mlr-widget-container {
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: 'Work Sans', sans-serif;
    box-sizing: border-box;
}



.mlr-widget-avatar-container {
    display: flex;
}

.mlr-widget-avatar-msg-container {
    display: flex;
    flex-direction: column;
    margin-left: 16px;
    justify-content: center;
}
.mlr-widget-avatar-img-bg {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    object-fit: cover
}
.mlr-widget-avatar-wrap {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid #6C40F7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.mlr-widget-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.mlr-widget-hi {
    font-size: 32px;
    font-weight: 300;
    color: #373A42;
    text-align: left;
    width: 100%;
    margin-bottom: 2px;
}

.mlr-widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #373A42;
    text-align: left;
    width: 100%;
    margin-bottom: 15px;
}

.mlr-widget-desc {
    color: #373A42;
    font-family: "Work Sans";
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 17px;
}

.mlr-widget-engagement-label {
    color: #6C40F7;
    font-family: "Work Sans";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-top: 15px;
    margin-bottom: 14px;
    width: 100%;
    text-align: center;
}

.mlr-widget-title-box {
  z-index: 3;
  display: flex;
  padding: 8px 14px;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 29px;
  border: 0.5px solid #FFF;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(15px);
  position: absolute;
}

.mlr-widget-unmute-icon::before{
    content: "";
    position: absolute;
    rotate: 135deg;
    top: 12px;
    left: 14px;
    font-size: 14px;
}

.mlr-widget-mute-icon::before{
    content: "___";
}

.mlr-widget-unmute-icon {
  display: flex;
}

.mlr-widget-title-text {
  color: #000;
  font-family: "Work Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  display: inline-block;
  max-width: 230px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* .mlr-widget-title-text:hover{
  max-width: inherit;
  overflow: visible;
} */
.mlr-widget-engagement-box {
  position: absolute;
  bottom: 5%;
  width: 100%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.mlr-widget-engagement-btns {
    display: flex;
    gap: 16px;
    padding: 4px 10px;
    justify-content: center;
    align-items: center;
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(4.5px);
}
.mlr-widget-btn {
    background: rgba(0, 0, 0, 0.34);
    border: none;
    width: 41px;
    height: 41px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    filter: drop-shadow(0 4px 10px rgba(2, 2, 2, 0.22));
}

.mlr-widget-btn:hover {
    background: #B263DE;
}
.mlr-widget-btn.active {
    background: #B263DE;
}

.mlr-widget-btn .svg-1 { display: none; }
.mlr-widget-btn .svg-2 { display: inline; }
.mlr-widget-btn.active .svg-1 { display: inline; }
.mlr-widget-btn.active .svg-2 { display: none; }

/* Main chatbox wrapper */
.mlr-chatbox-widget {
    background: #FFF;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Work Sans', sans-serif;
    box-sizing: border-box;
}

/* Header */
.mlr-chatbox-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 8px 14px;
    background: transparent;
}

.mlr-chatbox-header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.mlr-chatbox-header-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.mlr-chatbox-header-title {
    color: #373A42;
    font-family: "Work Sans";
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}
.mlr-chatbox-header-bdr {
    width: 85%;
    margin-left: 16px;
    border-bottom: 1px solid #ECECEC;
}


/* Main messages area */
.mlr-chatbox-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 8px 3px 0 14px;
    display: flex;
    margin-right: 6px;
    flex-direction: column;
    gap: 0;
    background: transparent;
}

/* Message row (assistant + user) */
.mlr-chatbox-message-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

/* Assistant message block */
.mlr-chatbox-avatar-message-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mlr-chatbox-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
}

.mlr-chatbox-message-avatar img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.mlr-chatbox-avatar-chat-message {
    background: transparent;
    border-radius: 8px;
    padding: 6px 6px;
    font-size: 0.97em;
    font-weight: 400;
    color: #373A42;
    box-shadow: 0 2px 8px rgba(140, 82, 255, 0.04);
    max-width: max-content;
    word-break: break-word;
    display: flex;
    align-items: center;
}

/* User message block */
.mlr-chatbox-user-message-container {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    gap: 6px;
    margin-top: 2px;
}

.mlr-chatbox-user-chat-message {
    background: #F4F1FF;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.97em;
    font-weight: 400;
    color: #373A42;
    box-shadow: 0 2px 8px rgba(140, 82, 255, 0.04);
    max-width: 160px;
    word-break: break-word;
    display: flex;
    align-items: center;
}

.mlr-chatbox-message-user {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0px solid #BCA7FF80;
}

.mlr-chatbox-message-user img {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    object-fit: cover;
}


/* Input area */
.mlr-chatbox-input-row {
    position: relative;
    padding: 18px 12px 12px 12px;
    display: flex;
    align-items: center;
    gap: 0;
    background: transparent;
}

.mlr-chatbox-input {
    height: 23px;
    width: 180px;
    flex: 1;
    border: none;
    background: #fff;
    border-radius: 18px;
    padding: 0px 24px 0px 14px;
    font-family: 'Work Sans', sans-serif;
    /* right padding for button */
    font-size: 10px;
    outline: none;
    border: 1px solid #E7E7E7;
    box-shadow: 0 1px 4px rgba(140, 82, 255, 0.06);
    position: relative;
}

.mlr-chatbox-send-btn {
    position: absolute;
    right: 58px;
    top: 30px;
    transform: translateY(-50%);
    background: #EDE8FF;
    border: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.mlr-chatbox-send-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}


/* Voice chatbox styles */
.voice-chatbox-widget {
    background: #F3F8FF;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    font-family: 'Work Sans', sans-serif;
    box-sizing: border-box;
    align-items: flex-start;
    padding: 10px;
    overflow: hidden;
}
.voice-chatbox-widget .mlr-widget-engagement-btns {
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(4.5px);
}
.voice-chatbox-widget .mlr-widget-engagement-btns .voice-end-btn {
      background: #FF4750;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.voice-chatbox-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 8px 14px;
    background: transparent;
}

.voice-chatbox-header-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #6C40F7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    flex: 0 0 auto;
}

.voice-chatbox-header-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.voice-chatbox-header-title {
    color: #373A42;
    font-family: "Work Sans";
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}
.voice-chatbox-header-bdr {
    width: 85%;
    margin-left: 16px;
    border-bottom: 1px solid #ECECEC;
}

.voice-chatbox-instruction {
    font-size: 0.98em;
    color: #444;
    text-align: center;
    margin: 18px 0 18px 0;
    width: 100%;
}

.voice-chatbox-messages-area {
    display: flex;
    flex-direction: column;
    height: 170px;
    align-items: center;
    justify-content: center;
    width: 100%;
}


/* --- User Voice Mic Section Animation --- */
.user-voice-mic-section {
    flex: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    margin-top: 20px;
}

.user-voice-mic-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 60% 40%, #6C40F7 60%, #9600ff 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(140, 82, 255, 0.12);
    cursor: pointer;
    transition: box-shadow 0.2s;
    outline: none;
    z-index: 2;
}

.user-voice-mic-btn:active {
    box-shadow: 0 0 0 4px #6C40F733;
}

.user-voice-mic-icon {
    font-size: 2.6em;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer animated circle for speaking state */
.user-voice-mic-outer-anim {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(162, 89, 255, 0.18);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.user-voice-mic-section.speaking .user-voice-mic-outer-anim {
    opacity: 1;
    animation: avatar-voice-pulse 1.2s infinite;
}

/* --- Avatar Voice Mic Section Animation --- */
.avatar-voice-mic-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.avatar-voice-mic-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(140, 82, 255, 0.12);
    cursor: pointer;
    transition: box-shadow 0.2s;
    outline: none;
    z-index: 2;
}

.avatar-voice-mic-btn:active {
    box-shadow: 0 0 0 4px #6C40F733;
}

.avatar-voice-mic-icon img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Outer animated circle for speaking state */
.avatar-voice-mic-outer-anim {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(162, 89, 255, 0.18);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.avatar-voice-mic-section.speaking .avatar-voice-mic-outer-anim {
    opacity: 1;
    animation: avatar-voice-pulse 1.2s infinite;
}

@keyframes avatar-voice-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.18);
        opacity: 0.35;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}

/* .voice-end-btn {
    background: #ff4d4f;
    border: none;
    border-radius: 8px;
    padding: 0 28px;
    height: 34px;
    font-weight: 600;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    margin: 18px auto 18px auto;
    display: block;
} */



.video-widget-container {
    background: linear-gradient(130deg, #FFF 25.91%, rgba(178, 99, 222, 1) 354.25%);
    box-shadow: 0 4px 16px rgba(140, 82, 255, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    font-family: 'Work Sans', sans-serif;
    padding: 10px;
    box-sizing: border-box;
    align-items: flex-start;
}

.video-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 0 14px;
    height: 38px;
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 8;
}

.video-widget-logo {
    height: 22px;
    width: auto;
}

/* .video-widget-video-area {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 0;
    min-height: 0;
} */

.video-widget-video-area video,
.video-widget-video-area .video-widget-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
    background: transparent;
}

.rectangle-chat .video-widget-video-area video,
.rectangle-chat .video-widget-video-area .video-widget-avatar {
    width: auto;
    height: 100%;
    left: 30%;
    object-fit: cover;
}

.vertical-chat .video-widget-video-area video,
.vertical-chat .video-widget-video-area .video-widget-avatar {
    width: 100%;
    height: 73%;
    object-fit: cover;
}

.welcome-video-area{
  z-index: 1;
}


.mlr-widget-logo-img {
  position: absolute;
  height: 27px;
  object-fit: contain;
  width: 100px;
}

.square-chat .mlr-widget-logo-img {
  position: absolute;
  height: auto;
  top: 30%;
  object-fit: contain;
  width: 20%;
  left: 4%;
  z-index: 3;
}

.vertical-chat .mlr-widget-logo-img {
  height: 42px;
  top: 14%;
  object-fit: contain;
  width: 45%;
  left: 28%;
  z-index: 3;
}

.rectangle-chat .mlr-widget-logo-img {
  left: 14%;
  bottom: 15%;
}

.mlr-widget-logo-img-chat-box {
  position: absolute;
  height: 24px;
  object-fit: contain;
  width: 90px;
  right: 15px;
  top: 16px
}

.rectangle-chat .mlr-widget-logo-img-chat-box {
  top: 6px;
  right: 7px;
  height: 20px;
  width: 70px;
}

.video-widget-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.avatar-video-mic-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 4;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(104, 104, 104, 0.00) 100%);
    backdrop-filter: blur(8px);
}

.video-widget-mic-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 60% 40%, #6C40F7 60%, #9600ff 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(140, 82, 255, 0.12);
    cursor: pointer;
    transition: box-shadow 0.2s;
    outline: none;
    z-index: 2;
}

.video-widget-mic-btn:active {
    box-shadow: 0 0 0 4px #6C40F733;
}

.video-widget-mic-icon {
    font-size: 2em;
    color: #fff;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-widget-container .mlr-widget-engagement-btns {
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(4.5px);
    z-index: 4;
}
.video-widget-container .mlr-widget-engagement-btns .video-end-btn {
      background: #FF4750;
      filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.video-widget-mic-outer-anim {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 68px;
    height: 68px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(162, 89, 255, 0.18);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.video-widget-mic-btn.speaking .video-widget-mic-outer-anim {
    opacity: 1;
    animation: video-mic-pulse 1.2s infinite;
}

@keyframes video-mic-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.18);
        opacity: 0.35;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}

.video-widget-end-btn,
.mlr-chatbox-end-btn {
  background: #ff4d4f;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255,77,79,0.10);
  cursor: pointer;
  margin: 0 8px;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
  position: relative;
}

.video-widget-end-btn:active,
.mlr-chatbox-end-btn:active {
  background: #d32f2f;
  transform: scale(1.08);
}
.video-widget-end-btn {
    width: 36px;
    height: 36px;
}

.video-widget-end-btn .end-icon,
.mlr-chatbox-end-btn .end-icon {
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 2px;
  display: block;
}
.video-widget-end-btn .end-icon {
    width: 14px;
    height: 14px 
}

.mlr-widget-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.mlr-widget-loader-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #e0d6ff;
  border-top: 4px solid #6C40F7;
  border-radius: 50%;
  animation: mlr-widget-spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes mlr-widget-spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

.mlr-widget-loader-text {
  font-size: 1rem;
  color: #9600ff;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.mlr-widget-thinking {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 10px;
}

.mlr-widget-thinking div {
  width: 8%;
  height: 24%;
  background: #6C40F7;
  position: absolute;
  left: 50%;
  top: 30%;
  opacity: 0;
  border-radius: 50px;
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
  animation: fade458 1s linear infinite;
}

@keyframes fade458 {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.25;
  }
}

.mlr-widget-thinking .bar1 {
  transform: rotate(0deg) translate(0, -130%);
  animation-delay: 0s;
}

.mlr-widget-thinking .bar2 {
  transform: rotate(30deg) translate(0, -130%);
  animation-delay: -1.1s;
}

.mlr-widget-thinking .bar3 {
  transform: rotate(60deg) translate(0, -130%);
  animation-delay: -1s;
}

.mlr-widget-thinking .bar4 {
  transform: rotate(90deg) translate(0, -130%);
  animation-delay: -0.9s;
}

.mlr-widget-thinking .bar5 {
  transform: rotate(120deg) translate(0, -130%);
  animation-delay: -0.8s;
}

.mlr-widget-thinking .bar6 {
  transform: rotate(150deg) translate(0, -130%);
  animation-delay: -0.7s;
}

.mlr-widget-thinking .bar7 {
  transform: rotate(180deg) translate(0, -130%);
  animation-delay: -0.6s;
}

.mlr-widget-thinking .bar8 {
  transform: rotate(210deg) translate(0, -130%);
  animation-delay: -0.5s;
}

.mlr-widget-thinking .bar9 {
  transform: rotate(240deg) translate(0, -130%);
  animation-delay: -0.4s;
}

.mlr-widget-thinking .bar10 {
  transform: rotate(270deg) translate(0, -130%);
  animation-delay: -0.3s;
}

.mlr-widget-thinking .bar11 {
  transform: rotate(300deg) translate(0, -130%);
  animation-delay: -0.2s;
}

.mlr-widget-thinking .bar12 {
  transform: rotate(330deg) translate(0, -130%);
  animation-delay: -0.1s;
}


.error-screen {
    position: absolute;
    top: 0; 
    left: 0; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(130deg, #FFF 25.91%, rgba(85, 85, 85, 0.9) 354.25%);
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
    z-index: 200;
    font-family: 'Work Sans', sans-serif;
  }
  
  .error-screen .error-icon {
    font-size: 48px;
    color: #ff3b30;
    margin-bottom: 12px;
  }
  
  .error-screen .error-title {
    font-size: 18px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 8px;
  }
  
  .error-screen .error-message {
    font-size: 13px;
    color: #555;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
  }
  
  .error-screen .error-retry-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #6C40F7;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .error-screen .error-retry-btn:hover {
    background-color: #5a3bd4;
  }
  
  .error-screen .error-retry-btn:active {
    background-color: #4a2fb8;
    transform: scale(0.98);
  }
  .errorScreen-icon {
    font-size: 48px;
    color: #ff3b30;
    margin-bottom: 12px;
  }
  .errorScreen-title {
    font-size: 18px;
    font-weight: bold;
    color:#d32f2f;
    margin-bottom:8px;
  }
  .errorScreen-message {
    font-size: 13px;
    color: #555;
    text-align: center;
    margin-top: 10px;;
  }


/* typing loader */
.typing-dots {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 4px;
  }
  
  .typing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #6C63FF;
    border-radius: 50%;
    animation: bounce 1.5s ease infinite;
  }
  
  .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
    opacity: 0.8;
  }
  
  .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
    opacity: 0.6;
  }
  
  /* Keyframes for bounce animation */
  @keyframes bounce {
    0%, 80%, 100% {
      transform: scale(0);
    }
    40% {
      transform: scale(1);
    }
  }
  

/* scrollbar ui */
.scrollbar-chat::-webkit-scrollbar {
    width: 3px;
	height: 5px;
    background-color: #fff; 
} 
.scrollbar-chat::-webkit-scrollbar-track {
    background-color: #fff; /* The background color of the track */
  }
.scrollbar-chat::-webkit-scrollbar-thumb {
    background: #D9D9D9;
    border-radius: 10px;
}
.scrollbar-chat::-webkit-scrollbar-thumb:hover {
    background: #d1d1d1;
}

 
/* css for rectangle-chat */
.rectangle-chat.mlr-widget-container,
.rectangle-chat.mlr-chatbox-widget,
.rectangle-chat.voice-chatbox-widge,
.rectangle-chat.video-widget-container,
.rectangle-chat.error-screen,
.rectangle-chat.no-permission-screen {
    background: #FFF;
    box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
}
.mlr-widget-wrapper {
    display: flex;
    gap: 70px;
    padding-right: 50px;
}
.mlr-widget-container.rectangle-chat {
    padding: 10px;
}

.rectangle-chat .mlr-widget-avatar-wrap{
    width: 65px;
    height: 65px;
    margin-bottom: 0;
    flex-shrink: 0;
}
.rectangle-chat .mlr-widget-wrapper {
  padding-right: 0;
  width: 90%;
  justify-content: space-between;
}

.rectangle-chat .mlr-widget-title-wrap {
    font-size: 14px;
    font-weight: 600;
    color: #373A42;
    text-align: left;
    width: 100%;
    margin-bottom: 5px;
}
.rectangle-chat .mlr-widget-desc {
    line-height: 14px;
}
.rectangle-chat .mlr-widget-avatar-msg-container {
    margin-left: 10px;
}
.rectangle-chat .mlr-widget-engagement-label {
    font-size: 13px;
    margin-top: 5px;
    margin-bottom: 8px;
    white-space: nowrap;
}
.rectangle-chat .mlr-widget-engagement-btns {
    justify-content: center;
}

.mlr-chatbox-widget-wrapper {
    display: flex;
    height: 100%;
}

.rectangle-chat .mlr-chatbox-messages-area {
    padding: 5px 3px 5px 10px;
    height: 90%;
    margin-top: 5px;
    box-sizing: border-box;
}
.rectangle-chat .mlr-chatbox-input-row {
    align-items: end;
    bottom: 0%;
}
.rectangle-chat .mlr-chatbox-input{
    height: 80%;
    border-radius: 8px;
    max-height: 80%;
    min-height: 80%;
    padding: 5px 25px 5px 10px;
}
.mlr-chatbox-input-row textarea{
    resize: none;
}
.voice-chatbox-widget-wrapper {
    display: flex;
    flex-direction: row;
    padding: 10px 10px 10px 20px;
    justify-content: space-between;
    height: 100%;
}
.rectangle-chat .mlr-chatbox-send-btn {
    right: 21%;
    bottom: 11%;
    top: auto;
}
.rectangle-chat .mlr-chatbox-end-btn {
    bottom: 3%;
}
.rectangle-chat .voice-chatbox-messages-area {
    height: 100%;
    flex-direction: row;
    position: absolute;
    top: 0;
    width: 50%;
    left: 14%;
    overflow: hidden;
}

.rectangle-chat .user-voice-mic-outer-anim {
    width: 80px;
    height: 80px;
}

.rectangle-chat .user-voice-mic-section {
       margin-top: 0;
}
.user-voice-mic-section-inner {
    position: relative;
}

.rectangle-chat .video-widget-avatar-img {
    object-fit: cover;
}
.rectangle-chat .video-widget-header {
    padding: 0px 14px 0 10px;
}
.rectangle-chat .video-widget-end-btn {
    position: absolute;
    right: 4px;
    bottom: 10px;
    width: 26px;
    height: 26px;
    z-index: 2;
}
.rectangle-chat .video-widget-end-btn .end-icon {
    width: 10px;
    height: 10px;
}

.rectangle-chat .errorScreen-icon {
    font-size: 35px;
    line-height: 30px;
    color: #ff3b30;
    margin-bottom: 0;
  }
  .rectangle-chat .errorScreen-title {
    font-size: 11px;
    font-weight: bold;
    color:#d32f2f;
    margin-bottom:4px;
  }
  .rectangle-chat .errorScreen-message {
    font-size: 10px;
    color: #555;
    text-align: center;
  }

  /* css for vertical */

  .vertical-chat .mlr-widget-avatar-msg-container {
    margin: 0;
  }
  .vertical-chat .mlr-widget-avatar-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .vertical-chat .mlr-widget-avatar-wrap,
  .vertical-chat .mlr-widget-avatar-img {
    width: 150px;
    height: 150px;
  }
  .vertical-chat .mlr-widget-title {
    font-size: 26px;
    margin-top: 8px;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }
  .vertical-chat .mlr-widget-hi {
    margin-top: 10px;
    text-align: center;
  }
  .vertical-chat .mlr-widget-desc {
    font-size: 18px;
    text-align: center;
    line-height: 25px;
  }
  .vertical-chat .mlr-widget-engagement-label {
    font-size: 18px;
    margin-top: 36px;
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
  }
  .vertical-chat .mlr-widget-engagement-box {
    bottom: 24px;
  }
  .vertical-chat .mlr-chatbox-header,
  .vertical-chat .voice-chatbox-header {
    flex-direction: column;
    padding: 25px 14px 8px 14px;
  }
  .vertical-chat .mlr-chatbox-header-avatar,
  .vertical-chat .mlr-chatbox-header-avatar img,
  .vertical-chat .voice-chatbox-header-avatar,
  .vertical-chat .voice-chatbox-header-avatar img {
    width: 140px;
    height: 140px;
  }
  .vertical-chat .mlr-chatbox-header-title,
  .vertical-chat .voice-chatbox-header-title {
    font-size: 22px;
    margin-top: 4px;
    margin-bottom: 4px;
  }
  .vertical-chat .mlr-chatbox-messages-area {
    padding: 12px 3px 0 10px;
  }
  .vertical-chat .mlr-chatbox-message-avatar,
  .vertical-chat .mlr-chatbox-message-avatar img,
  .vertical-chat .mlr-chatbox-message-user img,
  .vertical-chat .mlr-chatbox-message-user {
    width: 36px;
    height: 36px;
  }

  .vertical-chat .mlr-chatbox-avatar-chat-message, .vertical-chat .mlr-chatbox-user-chat-message {
    font-size: 12px;
  }
.vertical-chat .mlr-chatbox-end-btn {
    width: 27px;
    height: 27px;
  }
  .vertical-chat .mlr-chatbox-input {
    height: 27px;
    width: 50%;
  }
  .vertical-chat .mlr-chatbox-send-btn {
    width: 19px;
    height: 20px;
    top: 32px;
    right: 60px;
  }
  .vertical-chat .voice-chatbox-instruction {
    font-size: 12px;
    padding: 0 50px;
    width: auto;
  }
  .vertical-chat .voice-chatbox-messages-area {
    height: 475px;
  }
  .vertical-chat .mlr-widget-btn {
    width: 40px;
    height: 40px;
  }
  .thank-you-screen {
  position: absolute;
  top: 0; 
  left: 0; 
  background: #fff;
  box-shadow: 0 4px 16px rgba(140, 82, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 200;
  font-family: 'Work Sans', sans-serif;
}

.thank-you-screen .thankYouScreen-icon {
  font-size: 48px;
  color: #6C40F7;
  margin-bottom: 12px;
}

.thank-you-screen .thankYouScreen-title {
  font-size: 18px;
  font-weight: bold;
  color: #6C40F7;
  margin-bottom: 8px;
  font-family: 'Work Sans', sans-serif;
}

.disclaimer-screen {
  position: absolute;
  top: 0; 
  left: 0; 
  background: #FFF;
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 200;
  font-family: 'Work Sans', sans-serif;
}

.disclaimer-content {
  font-family: 'Work Sans', sans-serif;
}

.disclaimer-title {
  color: #373A42;
  margin-bottom: 12px;
  text-align: center;
  font-family: "Work Sans";
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 17px;
}

.disclaimer-text {
  font-size: 14px;
  color: #555;
  text-align: center;
  margin-bottom: 15px;
  line-height: 1.4;
}

.disclaimer-btn {
  padding: 10px 30px;
  border: none;
  border-radius: 10px;
  background-color: #6C40F7;
  color: white;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Work Sans';
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 80px;
}

.disclaimer-btn:hover {
  background-color: #5a3bd4;
}

.disclaimer-btn:active {
  background-color: #4a2fb8;
  transform: scale(0.98);
}
.rectangle-chat.disclaimer-screen {
  padding: 10px 20px;
}
.rectangle-chat .disclaimer-content {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 20px;
}
.rectangle-chat .disclaimer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 5px;
  text-align: left;
}
.rectangle-chat .disclaimer-text {
  font-size: 12px;
  text-align: left;
  margin-bottom: 0;
  line-height: 1.2;
}
.rectangle-chat .disclaimer-btn {
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  height: 27px;
}
.rectangle-chat.thank-you-screen .thankYouScreen-icon {
  font-size: 35px;
  margin-bottom: 0;
}

.vertical-chat .disclaimer-title {
  font-size: 24px;
  margin-bottom: 16px;
}
.vertical-chat .disclaimer-text {
  font-size: 20px;
  margin-bottom: 45px;
}
.vertical-chat .disclaimer-btn {
  font-size: 20px;
  padding: 10px 20px;
}


/* Update the No Permission Screen Styles */
.no-permission-screen {
  position: absolute;
  top: 0; 
  left: 0; 
  box-shadow: 0 4px 16px rgba(140, 82, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
  padding: 20px;
  box-sizing: border-box;
  z-index: 200;
  font-family: 'Work Sans', sans-serif;
}

.no-permission-content {
  font-family: 'Work Sans', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.no-permission-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.7;
  filter: grayscale(100%);
}

.no-permission-title {
  font-size: 30px;
  font-weight: 600;
  color: #6C40F7;
  margin-bottom: 12px;
}

.no-permission-content .mlr-widget-btn {
  scale: 1.2;
}
.no-permission-content .mlr-widget-btn svg{
  margin-top: -2px;
}

.no-permission-message {
  font-size: 12px;
  color: #373A42;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 400;
  line-height: 1.4;
}

.no-permission-message strong {
  color: #6C40F7;
  font-weight: 600;
}

.no-permission-btn {
  padding: 10px 30px;
  border: none;
  border-radius: 10px;
  background-color: #6C40F7;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  min-width: 120px;
  font-family: 'Work Sans', sans-serif;
}

.no-permission-btn:hover {
  background-color: #5a3bd4;
}

.no-permission-btn:active {
  background-color: #4a2fb8;
  transform: scale(0.98);
}

/* Rectangle layout adjustments - Fixed */
.rectangle-chat.no-permission-screen {
  padding: 8px 15px;
  flex-direction: row;
  align-items: center;
}

.rectangle-chat .no-permission-icon {
  font-size: 30px;
  margin-bottom: 0;
  margin-right: 8px;
  flex-shrink: 0;
}

.rectangle-chat .no-permission-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 3px;
  text-align: left;
}

.rectangle-chat .no-permission-message {
  font-size: 10px;
  text-align: left;
  margin-bottom: 0;
  line-height: 1.2;
  flex: 1;
}

.rectangle-chat .no-permission-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  height: 28px;
  min-width: 70px;
  flex-shrink: 0;
  border-radius: 6px;
}
.rectangle-chat .no-permission-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/* Vertical layout adjustments */
.vertical-chat .no-permission-icon {
  font-size: 60px;
  margin-bottom: 16px;
}

.vertical-chat .no-permission-title {
  font-size: 36px;
  margin-bottom: 16px;
}

.vertical-chat .no-permission-message {
  font-size: 23px;
  margin-bottom: 25px;
  line-height: 1.5;
  padding: 0 10px;
}

.vertical-chat .no-permission-btn {
  font-size: 18px;
  padding: 12px 25px;
  min-width: 140px;
}

/* Specific fixes for rectangle-chat */
.rectangle-chat.no-permission-screen {
  padding: 5px 40px 5px 20px;
}

.rectangle-chat .no-permission-icon {
  font-size: 25px;
}

.rectangle-chat .no-permission-title{
  font-size: 20px;
  margin-bottom: 8px;
}

.rectangle-chat .no-permission-message {
  font-size: 9px;
  line-height: 1.1;
}

.rectangle-chat .no-permission-btn {
  padding: 4px 8px;
  font-size: 10px;
  height: 24px;
  min-width: 60px;
}
.rectangle-chat .mlr-widget-engagement-box  {
    height: 100%;
    width: auto;
    top: 0;
    right: 20%;
    left: auto;
    align-items: center;
}

.rectangle-chat .mlr-widget-title-box {
      padding: 6px 14px;
}
.rectangle-chat.video-widget-container .avatar {
      margin-top: 0px;
}
.rectangle-chat.error-screen {
  flex-direction: row;
  justify-content: start;
  gap: 22px;
}
.rectangle-chat .error-screen-image svg {
  height: 75px;
  width: auto;
}
.rectangle-chat .errorScreen-message {
    text-align: left;
    margin-top: 0;
}

/* user voice animation */
.voice{
    display:inline-flex;
    align-items:center;
    gap:4px;
    height:35px;
    padding:4px 2px;
  }

  .bar{
    width:3px;
    height:calc(var(--h) * 1%);
    background:#949494;
    border-radius:6px;
    transform-origin:center;
    animation:pulse calc(1.2s) ease-in-out infinite;
    animation-delay:calc(var(--i) * -1.9s);
  }

  .split{ margin-right:0px; }

  .bar:nth-child(1)  { --i:1;  --h:28; }
  .bar:nth-child(2)  { --i:2;  --h:44; }
  .bar:nth-child(3)  { --i:3;  --h:32; }
  .bar:nth-child(4)  { --i:4;  --h:75; }
  .bar:nth-child(5)  { --i:5;  --h:50; }
  .bar:nth-child(6)  { --i:6;  --h:84; }
  .bar:nth-child(7)  { --i:7;  --h:98; }
  .bar:nth-child(8)  { --i:8;  --h:54; }
  .bar:nth-child(9)  { --i:9;  --h:78; }
  .bar:nth-child(10) { --i:10; --h:26; }
  .bar:nth-child(11) { --i:11; --h:42; }
  .bar:nth-child(12) { --i:12; --h:24; }
 
  @keyframes pulse{
    0%   { transform: scaleY(1.00); }
    20%  { transform: scaleY(1.18); }
    40%  { transform: scaleY(0.90); }
    60%  { transform: scaleY(1.25); }
    80%  { transform: scaleY(0.95); }
    100% { transform: scaleY(1.00); }
  }
 
  @media (prefers-reduced-motion: reduce){
    .bar{ animation:none; }
  }

.avatar {
    position: relative;
    width: 80px;
    aspect-ratio: 1;
    border-radius: 50%;
    isolation: isolate;
  }
  .video-widget-container .avatar {
    width: 60px;
    margin-top: -20px;
  }
 
  .avatar > img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
  }
  .avatar .video-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
  }
 
  .avatar::before{
    content:"";
    display: none;
    position:absolute;
    inset: calc(12px * -1);
    border-radius: 50%;
    background:radial-gradient(closest-side, transparent calc(100% - 12px), #B263DE76 calc(100% - 12px));
    z-index: -1;
    animation: breathe 2.4s ease-in-out infinite;
  }
  
  .avatar::after{
    content:"";
    display: none;
    position:absolute;
    inset: calc(12px * -1 - 12px);
    border-radius: 50%;
    background: radial-gradient(closest-side, transparent calc(100% - 12px), color-mix(in oklab, #B07CF826, white 6%) calc(100% - 12px)), conic-gradient(from 0deg, transparent 0 86%, color-mix(in oklab, #B263DE76, white 25%) 92%, transparent 100%);
    mix-blend-mode: normal;
    filter: drop-shadow(0 0 8px color-mix(in oklab, #B07CF826, black 8%));
    z-index: -2;
    animation:
      breathe1 2.4s ease-in-out infinite;
  }

  #avatarVoiceMicSection.speaking > .avatar::before,#avatarVoiceMicSection.speaking > .avatar::after,
  #avatarVideoSectionLoader.speaking > .avatar::before,#avatarVideoSectionLoader.speaking > .avatar::after {
    display: block;
  }
  .vertical-chat .avatar {
    width: 160px;
  }
  .vertical-chat .avatar::before{
    inset: calc(20px * -1);
    background:radial-gradient(closest-side, transparent calc(100% - 20px), #B263DE76 calc(100% - 20px));
  }

  .vertical-chat .avatar::after{
    inset: calc(20px * -1 - 20px);
    background: radial-gradient(closest-side, transparent calc(100% - 20px), color-mix(in oklab, #B07CF826, white 6%) calc(100% - 20px)), conic-gradient(from 0deg, transparent 0 86%, color-mix(in oklab, #B263DE76, white 25%) 92%, transparent 100%);
  }
.vertical-chat .avatar-voice-mic-section {
  flex: 2;
}
.vertical-chat .user-voice-mic-section {
  flex: 0.5;
}
.vertical-chat .avatar .video-icon svg {
  width: 70px;
  height: 70px;
}
/* #voice-mic-button svg, #videoMicBtn svg {
  margin-right: -3px;
} */
  /* Animations */
  @keyframes breathe{
    0%,100% { transform: scale(0.84); opacity: 1; }
    50%     { transform: scale(1.01); opacity: .95; }
    100% {transform: scale(0.84); opacity: 1}
  }

   @keyframes breathe1{
    0%,100% { transform: scale(0.8); opacity: 1; }
    50%     { transform: scale(1.01); opacity: .95; }
    100% {transform: scale(0.8); opacity: 1}
  }

  @keyframes sweep{
    to { transform: rotate(360deg); }
  }
 