@font-face {
  font-family: 'CRC55';
  src: url('../Fonts/CRC55.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

html, body {
  height: 100%;
  margin: 0;
}

/* General Reset */
body {
    margin: 0;
    font-family: 'CRC55';
    font-style: normal;
    font-weight: normal;
  }
  
  /* Chatbot Container */
  .chatbot-container {
    display: flex;
    height: 100vh;
  }
  
  /* Side Pane */
  .side-pane {
    width: 340px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    transition: 0.3s ease, padding 0.3s ease; /* Smooth width and padding transition */
  }
  
  .side-pane.collapsed {
    width: 0px;
    overflow: hidden;
    padding: 0;
    border-right: 0px;
  }
  .side-pane .upgrade-plans {
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    transition: 0.15s ease-in-out; /* Smooth visibility toggle for internal button */
  }
  .side-pane .upgrade-plans:hover,
  .side-pane .upgrade-plans:active {
    cursor: pointer;
  }
  .side-pane .upgrade-plans:hover .inner-content .inner-content-core,
  .side-pane .upgrade-plans:active .inner-content .inner-content-core {
    transition: 0.15s ease-in-out; /* Smooth visibility toggle for internal button */
  }
  .side-pane .upgrade-plans .inner-content {
    width: -webkit-fill-available;
    margin: 4px 6px;
  }
  .side-pane .upgrade-plans .inner-content .inner-content-core {
    padding: 14px;
    margin: 14px;
    border-radius: 10px;
    transition: 0.15s ease-in-out; /* Smooth visibility toggle for internal button */
}
  .side-pane .upgrade-plans .inner-content .inner-content-core svg {
    width: 18px;
    float: left;
    margin: 14px 10px 14px 2px;
  }
  .side-pane .upgrade-plans .inner-content .inner-content-core h3 {
    margin: 0;
    font-size: 18px;
  }
  .side-pane .upgrade-plans .inner-content .inner-content-core p {
    margin: 0;
    font-size: 14px;
    text-wrap-mode: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  
/* Collapse Button Inside Side Pane */
.collapse-btn,
.new-topic-btn,
.new-folder-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: 0.3s ease-in-out; /* Smooth visibility toggle for internal button */
    height: 40px;
    opacity: 1;
}
.side-pane.collapsed .collapse-btn,
.side-pane.collapsed .new-topic-btn {
    transition: 0.3s ease-in-out; /* Smooth visibility toggle for internal button */
    opacity: 0;
}
.collapse-btn {
    left: 6px; /* Align next to the collapsed side pane */
}

  
/* External Collapse Button */
.new-topic-btn.external,
.collapse-btn.external {
    position: fixed; /* Fixed position to prevent overlap with other content */
    left: 6px; /* Align next to the collapsed side pane */
    top: 11px; /* Adjust to align above or beside the header */
    display: none; /* Hidden by default */
    border-radius: 50%;
    padding: 10px;
    height: 40px;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Ensure it's above other elements */
    transition: 0.3s ease-in-out; /* Smooth display toggle for external button */
    opacity: 0;
}
  .new-topic-btn.external {
    left: 40px; /* Align next to the collapsed side pane */
  }

  header.side-pane-collapsed .new-topic-btn.external,
  header.side-pane-collapsed .collapse-btn.external {
        transition: 0.3s ease-in-out; /* Smooth display toggle for external button */
        opacity: 1;
    }

  
  header.side-pane-collapsed .new-topic-btn.external {
    display: flex;
  }


  .collapse-btn-icon {
    width: 18px;
    padding: 0px 2px;
  }

  .new-topic-btn-icon {
    width: 15px;
    padding: 0px 2px;
  }

  .new-folder-btn-icon {
    width: 18px;
    padding: 0px 2px;
  }

  /* Show external button when side pane is collapsed */
  .side-pane.collapsed + .collapse-btn.external {
    display: flex;
  }

  .side-pane.collapsed .collapse-btn,
  .side-pane.collapsed .new-topic-btn {
    padding: 16px;
  }
    
  .threads {
    margin-top: 20px;
    padding: 2px 10px;
    overflow-y: auto;
    max-height: calc(100vh - var(--upgrade-height));
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scroll-margin-left: 10px; /* Adjust to prevent overlap with the side pane */
  }
  
  .thread {
    display: flex;
    justify-content: space-between;
    padding: 4px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    overflow: hidden;
    cursor: pointer;
  }

  .threads .thread:last-of-type {
    margin-bottom: 0px;
  }

  .no-thread {
    padding: 3px;
  }
  
  .thread-title {
    font-size: 16px;
    margin: 6px 2px;
    color: #DCDDE1;
    text-wrap-mode: nowrap;
    width: 65%;
    text-overflow: ellipsis;
    overflow: hidden;
}
    .thread-icons {
        margin-top: 9px;
        min-width: 58px;
    }
  .thread-icons svg {
    height: 18px;
    cursor: pointer;
    margin-left: 10px;
  }
  
  /* Chat Content */
  .chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
/* Header adjustments for proper alignment */
header {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 16px; /* Adjust padding to leave space for the external button */
    transition: padding-left 0.3s ease; /* Smooth transition for header padding */
  }
  header.side-pane-collapsed {
    padding-left: 86px; /* Adjust padding to leave space for the external button */
  }
  
  header h1 {
    margin: 7px 0 0px;
    font-size: 18px;
    font-weight: normal;
    cursor: pointer;
    }
    header h1 span {
      font-size: 8px;
      padding: 1px 3px 0px;
      border-radius: 4px;
      position: absolute;
      margin-left: 4px;
      cursor: pointer;
  }
  header h1 a {
      text-decoration: none;
      font-size: 10px;
      margin-left: 40px;
      position: absolute;
      margin-top: 3px;
      display: inline;
  }
  
  .top-menu {
    position: relative;
    cursor: pointer;
    height: 24px;
  }
  
  .menu-icon {
    border-radius: 100%;
    height: 100%;
    width: auto;
  }
  
  .submenu {
    display: block;
    position: absolute;
    top: 52px;
    right: 0;
    border-radius: 10px;
    min-width: 200px;
    z-index: 9;
    opacity: 0;
    transition: 0.15s ease-in-out;
  }
  .top-menu .submenu {
    top: 34px;
  }
  
  .submenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .submenu ul li {
    cursor: pointer;
  }
  .submenu ul li:first-of-type {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }
  .submenu ul li:last-of-type {
    border-bottom: 0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }
  .top-menu .submenu ul li {
    border-top: 0px;
    border-bottom: 0px;
  }
  
  .submenu ul li a,
  .submenu ul li a:visited {
    text-decoration: none;
    padding: 10px 12px 8px;
    display: block;
}
  .submenu .log-out span {
    display: block;
    font-size: 12px;
  }
  .submenu .log-out span.user-name {
    font-size: 18px;
  }
  .submenu .log-out svg {
    height: 24px;
    position: absolute;
    right: 18px;
    margin-top: 10px;
}
header .language-changer,
header .display-mode {
  height: 18px;
}
header .language-changer svg,
header .display-mode svg{
  height: 100%;
}

header .right {
  display: flex;
}
header .right .selector {
  display: inline-flex;
  margin-left: 14px;
  margin-top: 6px;
  cursor: pointer;
}
header .right .selector.top-menu {
  margin-top: 2px;
}
header a.selector,
header a.selector:visited {
  text-decoration: none;
  display: block;
}
header a.language-changer,
header a.display-mode {
  padding: 8px 12px;
}

  /* Chat Messages */
/* Chat Messages */
.chat-messages {
    flex: 1;
    margin: 0px auto 30px;
    overflow-y: auto;
    transition: 0.3s ease;
    scrollbar-width: thin;
    padding: 0px 50px 0px 40px;
    scroll-behavior: smooth;
}
  .chat-messages .message {
    padding: 16px;
    border-radius: 10px;
    transition: 0.3s ease;
    margin: 10px 0;
    display: block;
    position: relative;
    font-size: 16px;
    line-height: 1.8;
    clear: both; /* Prevent overlapping */
    word-wrap: break-word; /* Ensure long words break */
  }
  .chat-messages .message p:first-of-type,
  .chat-messages .message p:last-of-type {
      margin: 0;
  }
  .chat-messages .message.user-message {
    text-align: right;
    float: right;
  }
  .chat-messages .message.extra-user-message {
    text-align: right;
    float: right;
    font-size: 12px;
    padding: 4px 8px 4px 26px;
    margin-top: 0px;
  }
  .chat-messages .message.extra-user-message {
    text-align: right;
    float: right;
  }

  .chat-messages .message.bot-message {
    text-align: left;
    float: left;
  }

    .chat-messages .message .avatar {
        height: 24px;
        position: absolute;
    }
    .chat-messages .message.extra-user-message .avatar {
        height: 12px;
        position: absolute;
        margin-top: 4px;
        left: 10px;
    }
    .chat-messages .message.user-message .avatar {
        right:-40px;
    }
    .chat-messages .message.bot-message .avatar,
    .chat-messages .message.agent-message .avatar {
        left:-40px;
    }
    /* ensure agent messages take the left rail like bot */
    .chat-messages .message.agent-message {
      float: left;
      text-align: left;
    }
    .chat-messages .message.extra-agent-message,
    .chat-messages .message.extra-bot-message {
      clear: both;
      float: none;
    }
    .chat-messages .message.extra-bot-message {
        padding: 0px 14px;
        border: 0px;
        border-radius: 0px;
        background-color: transparent;
        transition: 0.3s ease;
        margin: 0;
        display: block;
    }
    .chat-messages .message.extra-agent-message {
        padding: 0px 8px;
        border: 0px;
        border-radius: 0px;
        background-color: transparent;
        transition: 0.3s ease;
        margin: 0;
        display: block;
    }
    .chat-messages .message.extra-bot-message span {
        margin-right: 8px;
        font-size: 14px;
    }
    .chat-messages .message.extra-agent-message span {
        margin-right: 8px;
        font-size: 14px;
        display: flex;
    }
    .chat-messages .message.extra-bot-message span svg {
        width: 12px;
        height: 12px;
    }
    .chat-messages .message.extra-agent-message span svg {
        width: auto;
        height: 25px;
    }
    .chat-messages .message.extra-bot-message span a,
    .chat-messages .message.extra-bot-message span a:visited,
    .chat-messages .message.extra-agent-message span a,
    .chat-messages .message.extra-agent-message span a:visited {
        text-decoration: none;
        cursor: pointer;
    }
    .chat-messages .message.extra-bot-message span.source-link,
    .chat-messages .message.extra-bot-agent span.source-link {
        padding: 4px 10px 2px;
        margin-left: 8px;
        border-radius: 10px;
        transition: 0.3s ease;
        display: inline-block;
        position: relative;
    }
    .chat-messages .message.extra-bot-message span.source-link svg {
        margin-right: 4px;
    }

  /* Custom Scrollbar for WebKit Browsers */
  .chat-messages::-webkit-scrollbar {
    width: 8px; /* Width of the scrollbar */
  }
  
  .chat-messages::-webkit-scrollbar-track {
    border-radius: 5px; /* Rounded edges for the track */
  }
  
  .chat-messages::-webkit-scrollbar-thumb {
    border-radius: 5px; /* Rounded edges for the scrollbar */
  }
  
/* Chat Input */
.chat-input {
    display: flex;
    align-items: center;
    margin: 20px auto 40px;
    transition: 0.3s ease;
    position: relative;
  }
  
  .chat-input button {
    background: none;
    border: none;
    margin: 0 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
  }
  
  .chat-input .voice-input svg,
  .chat-input .file-attach svg {
    width: 18px;
    height: 18px;
  }

  .chat-input .voice-input svg#wave,
  .chat-input .voice-input.active svg#microphone {
      opacity: 0;
      width: 0;
      height: 0;
  }
  .chat-input .voice-input.active svg#wave,
  .chat-input .voice-input svg#microphone {
      opacity: 1;
      width: 18px;
      height: 18px;
  }

  .chat-input .voice-input.active svg#wave {
    height: 70px;
    width: 70px;
    fill: #fff;
  }
  
  .chat-input .voice-input.active svg#wave {
    height: 70px;
    width: 70px;
    fill: #fff;
  }
  
  .chat-input .voice-input.active svg#wave #Line_1 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 0.15s;
            animation-delay: 0.15s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_2 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 0.3s;
            animation-delay: 0.3s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_3 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 0.45s;
            animation-delay: 0.45s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_4 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 0.6s;
            animation-delay: 0.6s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_5 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 0.75s;
            animation-delay: 0.75s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_6 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 0.9s;
            animation-delay: 0.9s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_7 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 1.05s;
            animation-delay: 1.05s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_8 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 1.2s;
            animation-delay: 1.2s;
  }
  
  .chat-input .voice-input.active svg#wave #Line_9 {
    -webkit-animation: pulse 1s infinite;
            animation: pulse 1s infinite;
    -webkit-animation-delay: 1.35s;
            animation-delay: 1.35s;
  }
  
  @-webkit-keyframes pulse {
    0% {
      transform: scaleY(1);
      transform-origin: 50% 50%;
    }
    50% {
      transform: scaleY(0.7);
      transform-origin: 50% 50%;
    }
    100% {
      transform: scaleY(1);
      transform-origin: 50% 50%;
    }
  }
  
  @keyframes pulse {
    0% {
      transform: scaleY(1);
      transform-origin: 50% 50%;
    }
    50% {
      transform: scaleY(0.7);
      transform-origin: 50% 50%;
    }
    100% {
      transform: scaleY(1);
      transform-origin: 50% 50%;
    }
  }
  
  .chat-input .send-button {
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  @keyframes heartbeat {
      0% { transform: scale(1); }
      30% { transform: scale(1.1); }
      60% { transform: scale(1); }
      100% { transform: scale(1); }
  }

  .chat-input .send-button.disabled {
      animation: heartbeat 1s infinite ease-in-out;
  }
  .chat-input .send-button.disabled svg path {
      fill: #1c48c8;
  }
  
  .chat-input input {
    flex: 1;
    padding: 20px 120px 20px 52px;
    border-radius: 10px;
    transition: 0.3s ease;
    font-family: inherit;
  }
  .chat-input input:focus,
  .chat-input input:focus-visible {
      padding: 22px 120px 22px 52px;
  }
  .chat-input .voice-input {
      position: absolute;
      left: 5px;
  }
  .chat-input .file-attach {
    position: absolute;
    right: 52px;
    margin-top:7px;
  }
  .chat-input .file-attach label:hover,
  .chat-input .file-attach label:active {
    cursor: pointer;
  }
  .chat-input .send-button {
      position: absolute;
      right: 5px;
  }
  .chat-input .attachment-feedback {
    position: absolute;
    border-radius: 7px;
    font-size: 10px;
    padding: 4px 5px 2px 22px;
    right: 0px;
    z-index: 1;
    cursor: pointer;
    transition: 0.3s ease;
    transform: translateY(-62px);
  }
  .chat-input .attachment-feedback:hover,
  .chat-input .attachment-feedback:active {
    transition: 0.3s ease;
  }
  .chat-input .attachment-feedback .attached-file {
      
  }
  .chat-input .attachment-feedback .attached-file svg {
    height: 11px;
    margin-top: 1px;
    position: absolute;
    left: 6px;
    transition: 0.3s ease;
  }
  .chat-input .attachment-feedback:hover .attached-file svg,
  .chat-input .attachment-feedback:active .attached-file svg {
    transition: 0.3s ease;
  }
  .chat-input .attachment-feedback .attached-file .file-icon span {
      
  }
  .chat-input .attachment-feedback .attached-file .file-icon {
    opacity:1;
    height: 11px;
  }
  .chat-input .attachment-feedback:hover .attached-file .file-icon,
  .chat-input .attachment-feedback:active .attached-file .file-icon {
      opacity:0;
      height: 0;
  }
  .chat-input .attachment-feedback:hover .attached-file .file-delete-icon,
  .chat-input .attachment-feedback:active .attached-file .file-delete-icon {
      opacity:1;
      height: 11px;
  }
.chat-input .attachment-feedback .attached-file .file-delete-icon {
      opacity:0;
      height: 0;
  }
  
  /* Modal */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal-content {
    padding: 20px;
    border-radius: 5px;
    z-index: 1001;
    overflow-y: auto;
    max-height: 70%;
    max-width: 60%;
    scrollbar-width: thin;
    position: relative;
  }
  
  .modal-content .close-btn {
      padding: 0px;
      background: transparent;
      border: none;
      height: 18px;
      position: absolute;
      right: 20px;
      margin-top: 7px;
      cursor: pointer;
  }
  .modal-content .close-btn svg {
      height: 100%;
      width: 100%;
  }

  .modal-content ul li {
    margin:10px 0;
  }

  .modal-content h1:first-of-type,
  .modal-content h2:first-of-type,
  .modal-content h3:first-of-type,
  .modal-content p:first-of-type {
    margin-top:0px;
  }

  .modal-content h1:last-of-type,
  .modal-content h2:last-of-type,
  .modal-content h3:last-of-type,
  .modal-content p:last-of-type {
    margin-bottom:0px;
  }

  .voice-input svg,
  .file-attach svg,
  .send-button svg {
    transition: all 0.3s ease;
  }
    
.voice-input:hover svg,
.file-attach:hover svg,
.send-button:hover svg {
  transform: scale(1.1);
}

.voice-input:active svg,
.file-attach:active svg,
.send-button:active svg {
  transform: scale(0.95);
}

hr {
  height: 1px;
  border: 0;
  margin: 1em 0;
}

.hidden {
  display: none !important;
}

.welcome-pane {
  margin: auto auto 10px;
  text-align: center;
  transition: 0.3s ease-in-out; /* Smooth visibility toggle for internal button */
}
.welcome-pane svg.chatbot-logo {
  height: 80px;
}
.suggested-questions {
  margin: 10px auto auto;
  text-align: center;
  transition: 0.3s ease-in-out; /* Smooth visibility toggle for internal button */
  opacity: 0;
}
.suggested-questions .question {
  display: inline-block;
  text-decoration: none;
  font-size: 12px;
  border-radius: 10px;
  margin:5px;
  padding: 4px 10px 3px;
}
.chat-content .welcome-pane,
.chat-content .suggested-questions {
  display: none;
}

.chat-content.new-topic {

}
.chat-content.new-topic .chat-messages {
  display: none;
}
.chat-content.new-topic .welcome-pane,
.chat-content.new-topic .suggested-questions {
  display: block;
  opacity: 1;
  transition: 0.3s ease-in-out;
}
.chat-content.new-topic .chat-input {
  margin: 0 auto;
}
h1, h2, h3, h4 {
  font-weight: normal;
}

/* Highlight the selected display mode */
.display-mode-menu ul li.selected,
.submenu ul li.selected {
  font-weight: bold;
}

/* Width's for the center panel items */
.chat-content.new-topic .welcome-pane,
.chat-content.new-topic .chat-input,
.chat-content.new-topic .suggested-questions {
  width: 60%;
}
.chat-content.new-topic .chat-messages {
  width: 48%;
}
.welcome-pane,
.chat-input,
.suggested-questions {
  width: 70%;
}
.chat-messages {
  width: 58%;
}

div#thinkingDots {
  position: relative;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  display: none;
}
.typing-indicator div#thinkingDots {
  display: inline-block;
}
div#thinkingDots .dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  margin-right: 3px;
  background: #DCDDE1;
  animation: thinkingDots 1.3s linear infinite;
}
div#thinkingDots .dot:nth-child(2) {
  animation-delay: -1.1s;
}
div#thinkingDots .dot:nth-child(3) {
  animation-delay: -0.9s;
}

@keyframes thinkingDots {
  0%, 60%, 100% {
    transform: initial;
  }
  30% {
    transform: translateY(-15px);
  }
}

form #rating {

}
form #rating {

}
form .RatingRange {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
form .RatingRange span.Start {
}
form #topic {
}
form input,
form select,
form textarea,
form button {
  background-color: transparent;
  font-family: inherit;
  width: -webkit-fill-available;
  max-width: -webkit-fill-available;
  color: #aeaeae;
  padding: 12px;
  font-size: 16px;
  border-radius: 10px;
  margin: 14px 0;
}
form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.476 14.236"><path id="angles-up-down" d="M2.591,5.675a.89.89,0,0,1-.007-1.259L6.174.785a2.669,2.669,0,0,1,3.779,0l3.593,3.634A.89.89,0,0,1,12.28,5.668L8.69,2.037a.913.913,0,0,0-1.255,0L3.849,5.668a.89.89,0,0,1-1.258.007ZM12.28,8.568,8.693,12.2a.914.914,0,0,1-1.255,0L3.849,8.568A.89.89,0,0,0,2.584,9.819l3.593,3.634a2.669,2.669,0,0,0,3.779,0l3.59-3.631A.89.89,0,1,0,12.28,8.568Z" transform="translate(-2.326)" fill="currentColor"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 10px;
}
form textarea {
  min-height: 300px;
}
form button {
  width: auto;
  float: right;
  clear: both;
  margin-bottom: 0px;
  margin-top: 4px;
  cursor: pointer;
}
form button:hover,
form button:active,
form button:focus {
  background-color: #007bff;
  border-color: #0068d6;
  color: white;
}
.rating-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.rating-container label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.rating-container input[type="radio"] {
  display: none; /* Hide the default radio button */
}

.rating-container span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 38px;
  border-radius: 50%;
  background-color: #333;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  user-select: none;
  padding-top: 2px;
}

.rating-container input[type="radio"]:checked + span {
  background-color: #007bff; /* Highlighted color */
  color: #fff;
  font-size: 16px;
  transform: scale(1.1);
}

.rating-container span:hover {
  background-color: #555;
}

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}
/* General form container */
div.LoginScreen {
  width: auto;
  height: -webkit-fill-available;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  padding: 0;
  align-items: center;
  height: 100%;
  background-color: rgb(24, 26, 27);
  color: #f9f9f9;
}

/* Right panel - Login/Register */
div.LoginScreen .Right {
  display: flex;
  flex-flow: column;
  flex: auto;
  padding: 30px;
  width: auto;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

/* Logo SVG */
div.LoginScreen .Right > svg {
  height: 80px;
  width: auto;
  border-radius: 0;
}

/* Headings */
div.LoginScreen h2 {
  margin-top: 24px;
}

/* Left panel - Background Image */
div.LoginScreen .Left {
  display: flex;
  flex-direction: column;
  flex: auto;
  background-color: #f9f9f9;
  background: url("../Images/LoginBG.png") no-repeat center center;
  background-size: cover;
  padding: 0;
  width: 78%;
  justify-content: center;
  align-items: center;
  height: inherit;
}

/* Form elements: Inputs, Buttons, Select */
div.LoginScreen input,
div.LoginScreen button,
div.LoginScreen select {
  padding: 14px;
  width: -webkit-fill-available;
  margin-top: 20px;
  border-radius: 10px;
  border: 1px solid rgb(69, 75, 78);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.3s ease-in-out;
}

/* Custom dropdown styling */
div.LoginScreen select {
  background-image: url('data:image/svg+xml;charset=UTF-8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.476 14.236"><path id="angles-up-down" d="M2.591,5.675a.89.89,0,0,1-.007-1.259L6.174.785a2.669,2.669,0,0,1,3.779,0l3.593,3.634A.89.89,0,0,1,12.28,5.668L8.69,2.037a.913.913,0,0,0-1.255,0L3.849,5.668a.89.89,0,0,1-1.258.007ZM12.28,8.568,8.693,12.2a.914.914,0,0,1-1.255,0L3.849,8.568A.89.89,0,0,0,2.584,9.819l3.593,3.634a2.669,2.669,0,0,0,3.779,0l3.59-3.631A.89.89,0,1,0,12.28,8.568Z" transform="translate(-2.326)" fill="white"/></svg>');
}

/* Input focus effect */
div.LoginScreen input:focus {
  border-color: #0039B3;
  box-shadow: 0 0 8px rgba(0, 57, 179, 0.5);
  outline: none;
}

/* Select focus effect */
div.LoginScreen select:focus {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
  outline: none;
}

/* Button styling */
div.LoginScreen button {
  background-color: #69ff56;
  color: black;
  border: none;
  float: right;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s ease-in-out;
}

/* Button hover effect */
div.LoginScreen button:hover {
  background-color: #59e047;
  transform: scale(1.05);
}

/* Button active state */
div.LoginScreen button:active {
  background-color: #4ad639;
  transform: scale(0.98);
}

/* Smooth fade-in effect for form */
div.LoginScreen form {
  width: -webkit-fill-available;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeIn 0.5s ease-in-out forwards;
}

/* Fade-in animation */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
div.TitleHolder {
    display: flex;
    align-items: center;
}
.PoweredByTitleTag {
  text-decoration: none;
  font-size: 10px;
  margin-top: 6px;
  margin-left: 38px;
}
@media (max-width: 499px) {
  /* Styles for screens wider than 500px */
    .PoweredByTitleTag {
        display: none;
    }
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row input,
.form-row select {
  flex: 1; /* Make both fields equal width */
}

a,
a:visited {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

select option {
  color: #1e1e1e;
}

/* Thread Group Styles */
.thread-group {
  margin: 4px 0;
}

.group-header {
  font-weight: bold;
  padding: 4px 0px;
  border-radius: 4px;
}

.thread-group:empty::after {
    content: "No threads yet";
    color: #888;
    font-size: 12px;
    padding: 6px;
    display: block;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.group-header .group-name {
    font-weight: bold;
}

.group-action {
    font-size: 14px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.group-action:hover {
    opacity: 1;
}

.group-menu-wrapper {
  position: relative;
  display: inline-block;
  margin-left: auto;
}

.group-menu-toggle {
  cursor: pointer;
  padding: 4px;
}

.group-header .group-menu-toggle svg path {
  fill: transparent; /* Change color on hover */
}

.group-header:hover .group-menu-toggle svg path {
  fill: #777779; /* Change color on hover */
}

.group-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  z-index: 10;
  min-width: 120px;
  font-size: 14px;
  font-weight: normal;
}

.group-dropdown-item {
  padding: 6px 12px;
  cursor: pointer;
}

.thread-list.collapsed {
    display: none;
}

.group-name {
    font-weight: bold;
}

.thread-list.collapsed {
    display: none;
}

.group-chevron {
    color: #666;
    user-select: none;
}

.empty-group-message {
    color: #999;
    font-size: 13px;
    font-style: italic;
    padding: 6px 10px;
}

@keyframes borderShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#thinkingDots .dot {
  display: none !important;
}

#thinkingDots {
  display: inline-block;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.35s ease;
}
#thinkingDots.slide-out {
  opacity: 0;
  transform: translateY(-8px);
}

.chat-messages .message.typing-indicator {
  min-width: -webkit-fill-available;
}

/* Automation Drawer */
.chat-input .automation-toggle-btn {
  position: absolute;
  right: 66px;
  padding: 10px;
  margin-top: -1px;
}

/* ===== Automation Bottom Sheet (Apple-like) ===== */
.automation-drawer {
  position: relative;
  margin: 40px auto 20px;
  bottom: 50px;
  width: 60%;
  max-height: 335px;
  background: var(--panel-bg, #111);
  color: var(--text, #dcdde1);
  border: 1px solid var(--panel-border, #2a2a2a);
  border-radius: 18px;
  z-index: 1100;

  /* start state: slightly lower + smaller */
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(.98);
  transition:
    transform .42s cubic-bezier(.25,1,.5,1),
    opacity   .42s cubic-bezier(.25,1,.5,1);
}

.automation-drawer.show{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* header/body layout */
.automation-drawer .drawer-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 12px 14px;
  gap: 30px;
}
h3#automation-title {
    margin: 0;
    padding: 0;
}
.automation-drawer .drawer-body{
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: calc(100% - 65px);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  overflow: hidden;  
}
#automation-search{
  font-family: 'CRC55';
  width: calc(100% - 24px);
  max-width: 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--input-border, #3a3a3a);
  background: var(--input-bg, #1e1e1e);
  color: inherit;
  transition:cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

#automation-search:hover,
#automation-search:focus,
#automation-search:focus-visible {
  border-color: #0039B3;
  box-shadow: 0 0 8px rgba(0, 57, 179, 0.5);
  outline:none;
  transition:cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

#automation-list {
  list-style:none; margin:0; padding:0; overflow-y:auto;
  scrollbar-width: thin;
}
/* WebKit scrollbars (Chromium, Safari, Edge) */
#automation-list::-webkit-scrollbar{
  width: 8px;
}
#automation-list::-webkit-scrollbar-track{
  background: transparent;
}
#automation-list::-webkit-scrollbar-thumb{
  border-radius: 8px;
}

.automation-item {
    display:flex; justify-content:space-between; align-items:center;
    padding:10px 14px; border-top:1px solid var(--panel-border,#2a2a2a);
}
.automation-item:hover{ background: var(--row-hover,#222); cursor:pointer; }
.automation-item:hover:last-of-type {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}
.automation-item.is-last-visible:hover {
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.automation-tag{
  padding: 2px 11px 0px;
  border-radius: 6px;
  border: 1px solid var(--input-border, #3a3a3a);
  background: var(--input-bg, #1e1e1e);
  font-family: inherit;
  font-size: 12px;
  text-transform: uppercase;
}

/* close button – visually below sheet, but inside it */
.automation-close{
  position:absolute;
  left:50%;
  bottom: -48px;
  transform: translateX(-50%) translateY(8px) scale(.9);
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #686868;
  opacity: 0;
  transition: opacity .28s ease .24s, transform .38s cubic-bezier(.25,1,.5,1) .24s, color .28s ease;
  cursor: pointer;
  padding: 0;
}
.automation-drawer.show .automation-close {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: auto;
}
.automation-drawer.show .automation-close:hover,
.automation-drawer.show .automation-close:focus-visible,
.automation-drawer.show .automation-close:focus,
.automation-drawer.show .automation-close:target,
.automation-drawer.show .automation-close:active {
  transform: translateX(-50%) translateY(0) scale(1.12) rotate(90deg);
  color: #c7c7c7;
}

/* small bounce once on appear */
@keyframes sheetPop {
  0%   { transform: translateX(0%) translateY(18px) scale(.98); }
  60%  { transform: translateX(0%) translateY(-2px) scale(1.01); }
  100% { transform: translateX(0%) translateY(0) scale(1); }
}
.automation-drawer.show{
  animation: sheetPop .42s cubic-bezier(.25,1,.5,1);
}

/* responsive tweak */
@media (max-width: 767px){
  .automation-drawer{ width: 96vw; height: 70vh; bottom: 96px; }
}


#automation-spacer{
  height: 0;
  transition: height .42s cubic-bezier(.25,1,.5,1);
}

/* when drawer opens, expand spacer to drawer’s height */
.automation-drawer.show ~ #automation-spacer,
#automation-spacer.expand { /* use either sibling rule or add .expand via JS */
  /* will be set via JS to the drawer’s pixel height */
}


/* Automation Empty-state for no matches */
#automation-empty {
  display: none;
  padding: 30px 30px 24px;
  text-align: center;
  opacity: .85;
  border: 1px dashed var(--panel-border, #888888);
  border-radius: 12px;
  margin: 14px;
}
#automation-empty .art {
  margin-bottom: 16px;
}
#automation-empty .art svg {
    width: 60px;
}
#automation-list mark {
  background: #ffd54d; /* subtle highlight */
  padding: 0 .15em;
  border-radius: 4px;
}



/* hidden state */
.selected-automation {
  position: absolute;
  top: -44px; /* adjust based on height */
  font-size: 12px;
  text-transform: uppercase;

  /* animation */
  transform: translateY(40px);
  opacity: 0;
  pointer-events: none; /* prevent click when hidden */
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: flex;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 4px 12px 2px;
  align-items:center;
  border-radius: 999px;
  background: rgba(90,130,255,.12); border:1px solid rgba(90,130,255,.25);
}

.selected-automation:hover,
.selected-automation:focus,
.selected-automation:active,
.selected-automation:target {
  transition: all 0.3s ease;
}

/* visible state */
.selected-automation.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.selected-automation .chip-icon {
  height: 20px;
}
.selected-automation svg {
  height: 21px;
}
.selected-automation svg path {
  fill: inherit !important;
}
.selected-automation .automation-label {
  width: 14px;
  color: inherit;
}
.selected-automation .automation-name {
  color: inherit;
}
.selected-automation #clear-automation {
  color: crimson;
}

.selected-automation button {
  margin: 0;
  height: 0;
  width: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.selected-automation:hover button,
.selected-automation:focus button {
    width: 14px;
    height: auto;
    transition: all 0.3s ease;
    padding: 2px;
}

.selected-automation button svg {
    width: 14px;
    height: auto;
}

.chat-messages .message.extra-agent-message .meta-automation.cancel {
  opacity: .95;
  /* pick your token; fallback color shown */
  color: var(--warning, #cc3d3d);
}

.chat-messages .message.extra-agent-message .meta-automation.cancel svg {
  margin-right: .4em;
  vertical-align: -0.12em;
  height: 20px;
    margin-top: 4px;
    margin-left: 2px;
}

/* ==============================
   Download Buttons (Chip Style with Subtle Effects)
   ============================== */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin: 6px 4px;
  border-radius: 999px; /* pill */
  font-weight: 500;
  font-size: 0.85em;
  text-decoration: none;
  transition: all 0.3s ease; /* smooth background + shadow */
  text-decoration: none;
}

.download-btn:hover::before {
  transform: translateY(1px); /* subtle downward motion */
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
  filter: brightness(1.05);
  text-decoration: none;
}

.download-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  filter: brightness(0.97);
  text-decoration: none;
}

/* Variants — unified style */
.download-btn.dnld-t1,
.download-btn.dnld-t2,
.download-btn.dnld-t3 {
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
}

/* ==== Attach mini-menu (scoped reset + simple layout) ==== */
.file-input-wrapper.file-attach { position: absolute; }

.attach-menu {
  position: absolute;
  right: 0;
  bottom: 56px;
  min-width: 200px;
  border-radius: 12px;
  z-index: 20;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
  /* prevent random inherited styles */
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  filter: brightness(0.97);
}

/* --- SCOPED RESET --- */
.attach-menu * { box-sizing: border-box; }
.attach-menu button.attach-item { all: unset; }

/* --- SHOW/HIDE --- */
.attach-menu.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* --- CONTENT --- */
.attach-menu-title {
  font: inherit;
  font-weight: 600;
  font-size: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid transparent; /* themed below */
  white-space: nowrap;
}

.attach-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  color: inherit;
  white-space: nowrap;
  border-top: 1px solid transparent;     /* themed below */
  cursor: pointer;
  user-select: none;
}
.attach-item:hover { filter: brightness(1.02); }
.attach-item:focus-visible { outline: 2px solid rgba(90,130,255,.5); outline-offset: 2px; }

/* Kill icons/tail */
.attach-item svg, .attach-menu-arrow { display: none !important; }

/* --- Attach menu hard overrides (rows, padding, cursor) --- */
.attach-menu .attach-item {
  all: unset;                        /* nuke inherited button styles */
  display: block;         /* each on its own line */
  width: 100% !important;
  padding: 10px 14px !important;     /* same as heading */
  line-height: 1.25 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  border-top: 1px solid transparent; /* themed by dark/light */
}
.attach-menu .attach-item:first-of-type { border-top-color: transparent !important; }
.attach-menu .attach-item:hover,
.attach-menu .attach-item:active,
.attach-menu .attach-item:focus {
    cursor: pointer;
    color: #007bff;
}

/* === Cloud Link modal layout + input/buttons === */
#cloudLinkModal .modal-content{
  position:relative;            /* for close button */
  max-width:520px;
  width:92vw;
  overflow-x:hidden;            /* prevent horiz scroll */
}

/* Stack the field vertically in this modal */
#cloudLinkModal .form-row{ display:block; }

/* Input look & feel (inherits theme in Dark/Light overrides) */
#cloudLinkModal #cloudLinkInput{
  box-sizing:border-box;
  display:block;
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid transparent; /* themed below */
  background:transparent;        /* themed below */
  font:inherit;
}

/* Place the modal close X identical to other modals */
#cloudLinkModal .close-btn{
  position:absolute;
  top:12px;
  right:12px;
  width:28px;          /* fixed tap target */
  height:28px;
  padding:0;
  display:inline-flex; /* ignore global block rules */
  align-items:center;
  justify-content:center;
  background:transparent;
  border:none;
  box-shadow:none;
}
#cloudLinkModal .close-btn svg{
  width:18px;
  height:18px;
  pointer-events:none;
}

/* Pills wrap cleanly above the input */
#cloudLinkPills,
#cloudLinkModal .cloudlink-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;                      /* a touch more spacing */
  margin:0 0 12px 0;
  max-width:100%;
}

.cloudlink-pill{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:7px 12px;             /* ~10% more padding */
  border-radius:999px;
  font-size:12px;
  line-height:1;
  border:1px solid transparent; /* themed in Dark/Light */
  background:transparent;       /* themed in Dark/Light */
  color:inherit;
  max-width:100%;
}

/* Only the text truncates, not the X */
.cloudlink-pill .pill-text{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.cloudlink-pill-x{
  all:unset;
  cursor:pointer;
  line-height:1;
  font-size:14px;
  opacity:.9;
  flex:0 0 auto;
}
.cloudlink-pill-x:hover,
.cloudlink-pill-x:focus-visible{ opacity:1; }

/* Buttons row (match other modals) */
#cloudLinkModal .clearfix{
  margin-top:12px;
  display:flex;
  gap:8px;
  justify-content:flex-end;
}
#cloudLinkModal .clearfix button{
  font:inherit;
  padding:8px 14px;
  border-radius:8px;
  border:1px solid transparent; /* themed in Dark/Light */
  background:transparent;        /* themed in Dark/Light */
  cursor:pointer;
}

#cloudLinkError{ display:none; margin-top:6px; font-size:12px; }

/* Focus ring */
#cloudLinkModal input:focus,
#cloudLinkModal input:focus-visible,
#cloudLinkModal button:focus-visible{
  outline:2px solid rgba(90,130,255,.45);
  outline-offset:2px;
}