@font-face {
  font-family: 'figtree';
  src: url('./fonts/figtree/Figtree-Regular.woff2') format('woff2'),
       url('./fonts/figtree/Figtree-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'figtree-bold';
  src: url('../fonts/figtree/Figtree-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

/* screen configs */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}



body {
  font-family: "figtree","Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  font-size: 0.9rem;
  font-style: normal;
}

li {
  margin-left: 20px;
}

ul {
  list-style: none;
}

h1 {
  text-transform: uppercase;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  color: #3c3c3e;
}

a {
  color: white !important;
  font-weight: 700 !important;
}

.chat-button {
  position: relative;
  background-color: #2A4FDA;
  filter: drop-shadow(0 0 4px #FFF);
  position: fixed;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  bottom: 30px;
  right: 30px;
  cursor: pointer;
}

.chat-button.left {
  left: 30px;
}


/* chatbox */
.chat-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
  flex-direction: column;
  position: relative;
  bottom: 12px;
}

.chat-container.left {
  align-items: flex-start;
}

.chat-container.center {
  align-items: center;
}

.chat-container.right {
  align-items: flex-end;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* chatbox */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 500px;
  width: 100%;
  background-color: #fff;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 2px 4px 0 rgba(20, 46, 82, 0.20);
  position: relative;
  margin-top: 118px;
}

.chat.left {
  margin-left: 12px;
}
@media (max-width:576px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }

  html, body {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .message-input-box-expand {
    margin: 0 !important;
    z-index: 11;
    height: 100dvh !important;
  }

  .message-input textarea {
    font-size: 16px;
    line-height: 20px;
  }

  .btn-expand {
    display: none !important;
  }
  .chat {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    overflow: unset;
    overscroll-behavior: none;
  }
  .chat-container {
    height: 100dvh;
    padding: 0;
    align-items: stretch;
    bottom: 0px;
  }
  .chat-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 0 !important;
  }

  .messages {
    flex: 1;
    overflow: hidden;
  }

  .message-list {
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .message-input {
    position: sticky;
    bottom: env(safe-area-inset-bottom);
    left: 0;
    width: 100%;
    z-index: 10;
    border-radius: 0;
    flex-shrink: 0;
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    border-radius: 0 !important;
  }
  .input-box textarea {
    width: 100%;
    max-width: 100%;
  }
}
@media (max-width: 500px) {
  .chat.left {
    margin-left: 0;
    padding: 0;
  }
  .chat.right {
    margin-right: 0;
    padding: 0;
  }
}
.chat.center {
}

.chat.right {
  margin-right: 12px;
}

.chat-header {
  display: flex;
  border-radius: 20px 20px 0 0;
  background: #FFF;
  box-shadow: 0 2px 4px 0 rgba(20, 46, 82, 0.20);
  padding: 16px;
  justify-content: space-between;
  align-items: center;
}

.chat-header__logo {
  display: flex;
  gap: 12px;
}
.chat-header__logo h3{
  color: #2A4FDA;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}
.chat-header__logo p{
  color: #B6BFC8;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.chat-header__controles {
  display: flex;
}

.chat-header__controles button{
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}
.chat-header__controles button:hover {
  background: #e2f1ff;
}

.chat-header__controles button:hover svg path {
    fill: #3982c7;
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  height: 100%;
}

@media (min-width: 768px) {
  .chat {
    width: 80%;
  }
}

@media (min-width: 1024px) {
  .chat {
    width: 60%;
  }
}

.messages .wrapper-buttons {
  display: flex;
  gap: 4px;
  align-items: center;
}
/* messages */
.messages {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  margin-bottom: 0;
}

@media (min-width: 576px) {
  .messages {
    max-height: calc(100vh - 190px);
  }
}

.model-select-container {
  padding: 5px 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
  margin: 8px;
}

.model-select {
  width: 100%;
  padding: 8px 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  font-family: inherit;
}

.model-select:hover {
  border-color: #999;
}

.model-select:focus {
  border-color: #0078d4;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.model-select option {
  padding: 8px;
  background-color: #fff;
  color: #333;
}

.model-select option:hover {
  background-color: #f5f5f5;
}

.message-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px;
  background: #F5F7FA;
  box-shadow: 0 2px 4px 0 rgba(20, 46, 82, 0.20);
}

.message-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.message-item {
  margin: 0;
  display: table;
  word-break: break-word;
}

.message-text .file-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgb(246, 247, 248) !important;
  color: rgb(60, 60, 62) !important;
  max-width: 85%;
  border-radius: 16px 16px 4px;
  padding: 12px;
}

.message-text .file-bubble .file-info {
  position: relative; 
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.message-text .file-bubble .file-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 2px; 
}

.message-text .file-bubble .progress-percentage {
    font-size: 11px;
}

.message-text .file-bubble .loading-file {
    width: 24px; 
    height: 24px;
    border-radius: 50%; 
    mask: radial-gradient(transparent 50%, black 50%);
    -webkit-mask: radial-gradient(transparent 50%, black 50%);
    background-color: transparent; 
}

.message-text .file-bubble .file-info .file-size {
  font-size: 8px;
  font-weight: 300;
}

.icon {
  cursor: pointer;
  display: inline-flex;
  padding: 4px;
  border: 2px solid #ff0000;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 4px;
}

.exclamation-icon {
  font-weight: bold;
  font-size: 0.8em;
  color: #ff0000;
}

.message-item:last-child {
  margin-bottom: 0;
}

.message-text.msg-bot {
  background-color: #005eb8;
  color: #fff;
  position: relative;
  border-radius: 0rem 0.5rem 0.5rem 0.5rem;
  word-break: break-word;
  overflow-wrap: anywhere;
  border-radius: 16px 16px 16px 4px;
  background: #2A4FDA;
  box-shadow: 0 2px 4px 0 rgba(20, 46, 82, 0.20);
  font-size: 13px;
  padding: 12px;
}

.message-text.msg-bot.loading {
  width: 72px;
  opacity: 0.5;
  display: block;
}
.wrapper-ballon {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  margin-left: auto;
  gap: 16px;
  margin: 8px 0;
}
.message-time {
  color: #394D60;
  font-size: 11px;
  word-break: normal;
}


.message-text.msg-user {
  background-color: #f6f7f8;
  color: #3c3c3e;
  border-radius: 16px 16px 4px 16px;
  font-size: 13px;
  box-shadow: 0 2px 4px 0 rgba(20, 46, 82, 0.20);
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 16px;
}
.input-box {
  border: 1px solid #d9d9d9;
  border-radius: 24px;
  width: 100%;
  margin-right: 4px;
  padding: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-input {
  border-top: 2px solid #E0E5EB;
  flex-shrink: 0;
  display: flex;
  padding: 15px 8px;
  background: #fff;
  border-radius: 0 0 20px 20px;
  align-items: flex-end;
}

.message-input-box-expand {
  position: absolute;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-height: 100%;
  gap: 4px;
  background-color: #fff;
  box-shadow: 0px 4px 8px 0px #142E5233;
  max-height: 800px;
  height: 100%;
  max-width: 485px;
  margin: 140px 24px 0;
}
.message-input-box-expand .input-box {
  border: none;
  outline: none;
  padding: 16px 0 14px 16px;
  margin: 0;
  height: 100%;
}

.message-input-box-expand .wrapper-input-box {
  width: 100%;
}

.message-input-box-expand .input-box textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  color: #617385;
}


.message-input-box-expand .actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: 11px;
  padding-bottom: 14px;
}

.message-input input, .message-input textarea {
  width: 100%;
  border: none;
  resize: none;
  line-height: 20px;
  overflow: hidden;
  background: transparent;
  outline: none;
  box-sizing: border-box;
  min-height: 40px;
  display: flex;
  padding-bottom: 5px;
  color: #617385;
  font-family: "figtree","Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.message-input textarea {
  outline: none;
}

.message-input textarea::-webkit-scrollbar {
  width: 6px;
}

.message-input textarea::-webkit-scrollbar-track {
  background: #F5F7FA;
  border-radius: 10px;
  margin: 4px; 
}

.message-input textarea::-webkit-scrollbar-thumb {
  background: #B6BFC8;
  border-radius: 10px;
}

.message-input textarea::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.message-input input:focus {
  outline: none;
  box-shadow: none;
  border: 1.5px solid #d9d9d9;
}

.message-input input::placeholder {
  color: #788089;
  opacity: 0.6;
}

.message-input button, .actions button {
  padding: 0 8px;
  border: none;
  cursor: pointer;
  color: white;
  height: 40px;
  background-color: transparent;
}

.modal {
  display: none;
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  border: 1px solid #888;
  width: 80%;
  border-radius: 20px;
  padding: 24px;
  max-width: 328px;
}

.modal-close {
 text-align: center;
  
}
.modal-close p {
  color: #617385;
  font-size: 16px;
  width: 200px;
  text-align: center;
  margin: 0 auto 24px;
}

.btn-outline {
  border-radius: 20px;
  border: 1px solid #8FB8EF;
  background: #FFF;
  color: #005EB8;
  padding: 12px ;
  font-size: 13px;
  cursor: pointer;
  max-width: 56px;
  width: 100%;
}

.btn-outline:hover {
  background-color: #8FB8EF;
  color: #fff;
}

.btn-clean {
  border-radius: 20px;
  border: 1px solid rgba(42, 79, 218, 0.50);
  color: #0B2574 !important;
  text-align: center;
  font-size: 14px;
}
.btn-clean:hover {
  text-decoration: underline;
}

.btn-white {
  border-radius: 20px;
  border: 1px solid rgba(42, 79, 218, 0.50);
  background: #FFF;
  padding: 12px;
  color: #0B2574;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  max-width: 288px;
  width: 100%;
  margin: auto;
  display: block;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: #8FB8EF;
  color: #fff;
}


.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.error-file {
  color: #DB340B;
  text-align: center;
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  line-height: normal;
  border-radius: 20px;
  background: #FFEAE5;  
  padding: 12px;
  margin-bottom: 24px;
}

.file-upload-label {
  color: #FFF;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  border-radius: 20px;
  background: #2A4FDA;
  width: 100%;
  padding: 12px;
}

.modal-files h3{
  color: #0B2574;
  font-size: 19px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 24px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#errorTextArea {
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
  min-height: 120px;
}

#errorTextAreaQuestion {
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
  min-height: 120px;
}

#confirmButton {
  background-color: #2A4FDA;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  height: 40px;
}

#confirmButton:hover {
  background-color: #2A4FDA;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

.btn-send, .btn-voice  {
  width: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.btn-send:hover, .btn-voice:hover {
  background-color: #2A4FDA;
  fill: #fff;
}
.btn-send:hover svg path, .btn-voice:hover svg path{
  fill: #fff;
}

.btn-send.active, .btn-send.active svg path  {
  background-color: #2A4FDA;
  fill: #fff;
}

/* Voice button icons */

.icon-mic:before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%b6bfc8'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z'/%3E%3Cpath d='M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.icon-mic-disabled:before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z'/%3E%3Cpath d='M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.btn-voice.recording {
  background-color: #d32f2f;
  box-shadow: 0 0 0 rgba(211, 47, 47, 0.4);
  animation: recording-pulse 2s infinite;
}

.btn-voice.recording .icon-mic:before {
  animation: mic-wave 1.5s ease-in-out infinite;
}

@keyframes recording-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(211, 47, 47, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
  }
}

@keyframes mic-wave {
  0% {
    transform: scale(1);
  }
  10% {
    transform: scale(1.1);
  }
  20% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.1);
  }
  40% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

/* scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-button {
  width: 0;
  height: 0;
}

::-webkit-scrollbar-thumb {
  background: #707070;
  border: 0px none #ffffff;
  border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
  background: #757575;
}

::-webkit-scrollbar-thumb:active {
  background: #333333;
}

::-webkit-scrollbar-track {
  background: #ffffff;
  border: 0px none #ffffff;
  border-radius: 50px;
}

::-webkit-scrollbar-track:hover {
  background: #c2c2c2;
}

::-webkit-scrollbar-track:active {
  background: #ffffff;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fadeIn {
  opacity: 0;
  animation: fadeIn 0.5s 50ms ease-in forwards;
}

