/* ------------------------- */
/* COMMON */
/* ------------------------- */
.chat{
  width: 100%;
  height: 100%;
  transition: 5s ease-in-out;
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.chat-out{
  opacity: 0;
  transition: opacity 0.1s ease-in-out;
  height: 0px !important;
  overflow: hidden;
}
.chat-in{
  opacity: 1;
  height: 100% !important;
  transition: opacity 1s ease-in-out;
  overflow: scroll !important;
}

/* ------------------------- */
/* CHAT CONTENT */
/* ------------------------- */
.chat-message{
  width: 100%;
  max-width: 800px;
  padding: 0 15px 20px 15px;
  min-height: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: auto;
  position: relative;
  height: 100%;
  /* overflow: hidden; */
}

/* Card flutuante do paciente no topo do chat. Fica sobre a area rolavel
   (.chat-message-decoration), por isso usa vidro fosco: o conteudo que passa
   por baixo aparece desfocado em vez de cortar seco. Largura acompanha o
   conteudo (fit-content) mas nunca passa da coluna do chat, e os textos
   truncam dentro do card em vez de empurra-lo para fora da tela. */
.chat-message-paciente{
  --paciente-gutter: 15px;
  --paciente-avatar: 42px;
  --paciente-radius: 22px;
  --paciente-border: rgba(214, 220, 233, 0.9);
  --paciente-accent: var(--vector-accent, #0D53A5);
  --paciente-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  position: absolute;
  top: 30px;
  left: var(--paciente-gutter);
  right: var(--paciente-gutter);
  z-index: 2;
  width: fit-content;
  max-width: calc(100% - (var(--paciente-gutter) * 2));
  margin-inline: auto;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 10px;

  background: rgba(250, 250, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--paciente-border);
  border-radius: var(--paciente-radius);
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 10px 28px -10px rgba(16, 24, 40, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  animation: chat-paciente-in 0.45s var(--paciente-ease) both;

  .chat-message-paciente-image{
    flex: none;
    display: flex;

    img, .no-portrait{
      cursor: pointer;
      transition: box-shadow 0.2s var(--paciente-ease), transform 0.2s var(--paciente-ease);
    }
    img{
      display: block;
      width: var(--paciente-avatar);
      height: var(--paciente-avatar);
      border-radius: 50%;
      object-fit: cover;
      box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3px rgba(13, 83, 165, 0.18);
    }
    /* Visual padrao do avatar sem foto (main.css); aqui so o tamanho e o realce de clique */
    .no-portrait{
      --no-portrait-tamanho: var(--paciente-avatar);
    }
    img:hover{
      transform: scale(1.04);
      box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px rgba(13, 83, 165, 0.45);
    }
    .no-portrait:hover{
      transform: scale(1.04);
      box-shadow: 0 0 0 3px rgba(13, 83, 165, 0.12), inset 0 0 0 1px rgba(13, 83, 165, 0.3);
    }
  }

  .chat-message-paciente-info{
    flex: 1 1 auto;
    /* Sem min-width:0 o flex item nao encolhe abaixo do texto e o ellipsis nunca aparece */
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
    row-gap: 1px;

    .chat-message-paciente-info-name{
      flex: 1 0 100%;
      min-width: 0;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: 0.9em;
      font-weight: 600;
      line-height: 1.35;
      color: var(--vector-text-strong, #16213A);
      letter-spacing: -0.005em;
    }
    .chat-message-paciente-info-atendimento{
      flex: 1 1 0;
      min-width: 0;
      overflow: hidden;
      font-size: 0.8em;
      font-weight: 400;
      line-height: 1.45;
      color: var(--vector-text-subtle, #667085);
      overflow-wrap: anywhere;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 1;
      line-clamp: 1;
      max-height: 1.45em;
      transition: max-height 0.45s var(--paciente-ease);
    }

    .chat-message-paciente-info-atendimento-full-text{
      flex-basis: 100%;
      display: block;
      -webkit-line-clamp: unset;
      line-clamp: unset;
      max-height: 40vh;
      overflow-y: auto;
      overscroll-behavior: contain;
    }

    .chat-message-paciente-info-atendimento-ver{
      flex: none;
      display: flex;
      align-items: center;
      font-size: 0.75em;

      button{
        appearance: none;
        background: none;
        border: 0;
        padding: 0;
        margin: 0;
        font: inherit;
        font-weight: 600;
        line-height: 1.45;
        color: var(--paciente-accent);
        cursor: pointer;
        white-space: nowrap;
        border-radius: 4px;
        text-underline-offset: 2px;
      }
      button:hover{
        text-decoration: underline;
      }
      button:focus-visible{
        outline: 2px solid var(--paciente-accent);
        outline-offset: 2px;
      }
    }
  }

  .chat-message-paciente-button{
    flex: none;
    display: flex;
    user-select: none;

    button{
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      min-height: 36px;
      padding: 0 14px;
      white-space: nowrap;
      font-size: 0.85em;
      font-weight: 600;
      color: #FFFFFF;
      background: linear-gradient(180deg, #1A63BF 0%, var(--paciente-accent) 100%);
      border: 1px solid rgba(9, 58, 117, 0.35);
      border-radius: 999px;
      box-shadow:
        0 1px 2px rgba(13, 83, 165, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
      cursor: pointer;
      transition:
        transform 0.18s var(--paciente-ease),
        box-shadow 0.18s var(--paciente-ease),
        filter 0.18s var(--paciente-ease);

      p{
        margin: 0;
      }
      i{
        font-size: 0.9em;
        transition: transform 0.25s var(--paciente-ease);
      }
    }
    button:hover{
      transform: translateY(-1px);
      filter: brightness(1.06);
      box-shadow:
        0 6px 14px -4px rgba(13, 83, 165, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

      i{
        transform: rotate(90deg);
      }
    }
    button:active{
      transform: translateY(0) scale(0.97);
    }
    button:focus-visible{
      outline: none;
      box-shadow:
        0 0 0 2px #FFFFFF,
        0 0 0 4px rgba(13, 83, 165, 0.55);
    }
  }

  /* Sem conversa iniciada: botao neutro, sem sombra nem feedback de hover */
  .chat-message-paciente-button-disabled{
    button,
    button:hover,
    button:active{
      color: #98A2B3;
      background: #F2F4F7;
      border-color: #E4E7EC;
      box-shadow: none;
      filter: none;
      transform: none;
      cursor: not-allowed;

      i{
        transform: none;
      }
    }
  }
}

@keyframes chat-paciente-in{
  from{
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to{
    opacity: 1;
    transform: none;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .chat-message-paciente{
    background: #FAFAFF;
  }
}

@media (prefers-reduced-motion: reduce){
  .chat-message-paciente,
  .chat-message-paciente *{
    animation: none !important;
    transition: none !important;
  }
}

.chat-message-paciente-button-rotate {
  transition: transform 0.3s ease-in-out;
  transform: rotate(180deg);
}

.chat-message-paciente-button-rotate-remove {
  transition: transform 0.3s ease-in-out;
  transform: rotate(0deg);
}

.chat-message-decoration{
  width: 100%;
  z-index: 1;
  height: 100%;
  overflow: scroll;

  .chat-message-decoration-content{
    margin-top: 115px;
    margin-bottom: 60px;
    padding-bottom: 80px;
  }
  .chat-message-decoration-text-1{
    display: flex;
    justify-content: center;
    p{
      width: 200px;
      text-align: center;
      padding: 0;
      margin: 0;
      font-size: 0.85em;
      color: #424A57;
    }
  }
  .chat-message-decoration-suggestion{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
    .chat-message-decoration-suggestion-item{
      width: 98%;
      display: flex;
      align-items: center;
      padding: 12px 10px;
      background-color: #FFFFFFB2;
      border-radius: 8px;
      margin-top: 8px;
      cursor: pointer;
      position: relative;
      overflow: hidden;

      .chat-message-decoration-suggestion-item-logo{
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        background-color: #FFFFFF;
        border-radius: 100%;
        width: 30px;
        height: 30px;
        img{
          width: 11px;
        }
      }
      p{
        padding: 0;
        margin: 0 10px;
        font-size: 0.8em;
      }
      .chat-message-decoration-suggestion-item-disabled{
        background-color: rgba(0, 0, 0, 0.217);
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        cursor: not-allowed;
      }
      .chat-message-decoration-suggestion-item-beta{
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(226, 49, 49, 0.639);
        color: white;
        position: absolute;
        width: 120px;
        height: 20px;
        top: 8px;
        right: -35px;
        transform: rotate(30deg);
        font-size: 1.2em;
        /* Oswald nunca foi carregada e o selo caia em serif: segue a fonte do Vector */
        font-family: inherit;
        font-weight: 700;
        letter-spacing: 0.04em;
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
      }
    }
  }
}

.chat-message-field{
  width: 100%;
  /* Fundo transparente: so a pilula do composer e opaca, a conversa continua visivel ao redor */
  background: transparent;
  padding: 10px 0px;
  margin-bottom: 20px;
  
  position: absolute;
  bottom: 0;
  z-index: 2;
  /* max-width: 800px; */

  .chat-message-field-content{
    width: 100%;
    position: relative;
    padding: 0 10px;

    /* ---------------- COMPOSER ----------------
       Grid com duas disposicoes, trocadas pela classe -expanded (JS ajustarCampoPergunta):
         compacto:   [filtro] [texto .........] [acoes]
         expandido:  [texto .......................]
                     [filtro]            [acoes]    */
    .chat-message-composer{
      --composer-radius: 28px;
      --composer-control: 36px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      grid-template-areas: "filtro texto acoes";
      align-items: end;
      column-gap: 6px;
      row-gap: 4px;
      width: 100%;
      padding: 7px 8px;
      background-color: #FFFFFF;
      border: 1px solid #D9DEE6;
      border-radius: var(--composer-radius);
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 20px -6px rgba(16, 24, 40, 0.12);
      cursor: text;
      transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.2s ease-in-out;
    }
    .chat-message-composer:hover{
      border-color: #C9D3E1;
    }
    /* Foco no campo destaca a pilula inteira, nao so o textarea */
    .chat-message-composer:focus-within{
      border-color: #B9CBEB;
      box-shadow: 0 0 0 4px rgba(15, 86, 201, 0.08), 0 6px 20px -6px rgba(16, 24, 40, 0.14);
    }
    .chat-message-composer-expanded{
      --composer-radius: 24px;
      grid-template-areas:
        "texto texto texto"
        "filtro . acoes";
      padding: 10px 8px 7px;
    }

    .chat-message-field-content-icon-filter{
      grid-area: filtro;
      position: relative;
      width: var(--composer-control);
      height: var(--composer-control);
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
      cursor: pointer;
      transition: background-color 0.15s ease-in-out;

      i{
        margin: 0;
      }
      
      .chat-message-field-content-icon-filter-count{
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #E5392F;
        color: white;
        border-radius: 999px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 10px;
        font-weight: bold;
        font-variant-numeric: tabular-nums;
        position: absolute;
        top: 0;
        right: -1px;
        border: 1.5px solid white;
      }
    }
    .chat-message-field-content-icon-filter:hover{
      background-color: #F0F4FA;
    }

    .chat-message-field-content-input{
      grid-area: texto;
      display: flex;
      align-items: center;
      min-width: 0;
      position: relative;

      textarea{
        display: block;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        /* Uma linha no estado inicial; o JS cresce ate o max-height e depois rola por dentro */
        height: var(--composer-control);
        min-height: var(--composer-control);
        max-height: min(40vh, 264px);
        padding: 7px 6px;
        border: none;
        border-radius: 0;
        background-color: transparent;
        box-shadow: none;
        outline: 0;
        resize: none;
        overflow-y: hidden;
        font-size: 15px;
        line-height: 22px;
        color: var(--vector-text, #1A2233);
        caret-color: #0F56C9;
        overflow-wrap: anywhere;
        scrollbar-width: thin;
        scrollbar-color: #C9D3E1 transparent;
      }
      textarea::placeholder{
        color: #8A94A6;
      }
      textarea:focus{
        box-shadow: none;
      }
    }
    .chat-message-composer-expanded .chat-message-field-content-input textarea{
      padding: 2px 8px 4px;
    }

    i{
      color: rgb(24, 74, 182);
      font-size: 1em;
    }
    /* Mesma medida em qualquer tela: o override de icones do mobile nao desalinha o composer */
    .chat-message-composer i{
      margin: 0;
      font-size: 15px;
    }

    .chat-message-field-content-icon-container{
      grid-area: acoes;
      width: var(--composer-control);
      height: var(--composer-control);
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
      transition: background-color 0.15s ease-in-out;

      i{
        margin: 0;
        cursor: pointer;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
      }
      #audio:hover{
        background-color: #F0F4FA;
      }
      /* Enviar em destaque: circulo preenchido, como a seta do ChatGPT */
      #send-message{
        background-color: #0F56C9;
        color: #FFFFFF;
        font-size: 14px;
        animation: composer-send-in 0.16s ease-out;
      }
      #send-message:hover{
        background-color: #0A44A6;
      }
      i:active{
        transform: scale(0.92);
      }
      #stop-audio{
        font-size: 13px;
      }
    }
    .chat-message-field-content-icon-container-active{
      background-color: #184ea6;
      /* Pulso discreto enquanto o microfone esta gravando */
      animation: composer-recording 1.6s ease-in-out infinite;

      i{
        color: white;
      }
    }

    .chat-message-field-floating-button{
      position: absolute;
      right: 0;
      top: -80px;
      border-radius: 100%;
      padding: 3px;
      background: linear-gradient(-45deg, #82aaff, #ffffff, #4e85dc, #ffffff);
      background-size: 400% 400%;
      animation: gradientButton 7s ease infinite;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none; 
      -moz-user-select: none;
      -ms-user-select: none;

      i{
        width: 50px;
        height: 50px;
        background-color: white;
        border-radius: 100%;
        color: white;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.4em;
        margin: 0;
        color: #184ea6;
      }
      img{
        width: 50px;
        -webkit-user-drag: none;
        user-drag: none;
        padding: 10px;
        background: white;
        border-radius: 100%;
      }
    }

    /* Botao "ir para o fim": aparece quando a conversa foi rolada para cima, como no chat do Claude web */
    .chat-message-field-scroll-bottom{
      position: absolute;
      left: 50%;
      top: -46px;
      z-index: 3;
      width: 34px;
      height: 34px;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      border: 1px solid #D9DEE6;
      background-color: rgba(255, 255, 255, 0.92);
      -webkit-backdrop-filter: blur(6px);
      backdrop-filter: blur(6px);
      color: #4A5670;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -2px rgba(16, 24, 40, 0.14);
      cursor: pointer;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transform: translate(-50%, 6px) scale(0.92);
      transition: opacity 0.18s ease-out, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2),
                  visibility 0s linear 0.22s, background-color 0.15s ease-in-out, color 0.15s ease-in-out;

      i{
        margin: 0;
        font-size: 13px;
        color: inherit;
      }
    }
    .chat-message-field-scroll-bottom:hover{
      background-color: #FFFFFF;
      color: #0F56C9;
    }
    .chat-message-field-scroll-bottom:focus-visible{
      outline: 2px solid #0F56C9;
      outline-offset: 2px;
    }
    .chat-message-field-scroll-bottom-visible{
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translate(-50%, 0) scale(1);
      transition: opacity 0.18s ease-out, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2),
                  visibility 0s, background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    }

    .chat-message-field-content-alert-out {
      opacity: 0 !important;
      transform: translateY(6px) !important;
    }
    .chat-message-field-content-alert {
      position: absolute;
      /* acima dos demais elementos do campo de mensagem (botao flutuante,
         perguntas padroes), para o aviso nunca sair por tras deles */
      z-index: 30;
      background: rgba(13, 83, 165, 0.38);
      border-radius: 16px;
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
      backdrop-filter: blur(7.6px);
      -webkit-backdrop-filter: blur(7.6px);

      top: -70px;
      display: flex;
      align-content: center;
      padding: 10px 20px;
      color: white;
      font-weight: bold;
      text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.472);
      font-size: 0.8em;
      user-select: none;
      opacity: 1;
      transform: translateY(0);
      transition: opacity var(--overlay-fade, 0.15s) var(--overlay-ease, ease-out),
                  transform var(--overlay-motion, 0.18s) var(--overlay-ease, ease-out);
      pointer-events: none;
      /* p{
        margin: 0 !important;
      } */
    }
  }

}
@media (prefers-reduced-motion: reduce){
  .chat-message-field .chat-message-field-content .chat-message-field-scroll-bottom{
    transition: opacity 0.1s linear, visibility 0s;
    transform: translate(-50%, 0);
  }
}
@keyframes composer-send-in{
  from{ opacity: 0; transform: scale(0.8); }
  to{ opacity: 1; transform: none; }
}
@keyframes composer-recording{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(24, 78, 166, 0.35); }
  50%{ box-shadow: 0 0 0 6px rgba(24, 78, 166, 0); }
}
@keyframes gradientButton {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

/* ------------------------- */
/* CONVERSA */
/* ------------------------- */
.chat-message-content{
  /* --chat-composer-overlap: distancia do fim da conversa ate o topo da pilula (JS medirSobreposicaoComposer).
     --chat-fade-size: altura da dissolucao acima da pilula, como no chat do Claude web */
  --chat-composer-overlap: 64px;
  --chat-fade-size: 48px;
  --chat-fade-start: calc(var(--chat-composer-overlap) - 10px);
  height: 100%;
  /* Base de 200px, crescendo com o composer expandido: a ultima mensagem sempre para acima da dissolucao */
  padding: 150px 0 max(200px, calc(var(--chat-composer-overlap) + var(--chat-fade-size) + 24px)) 0;
  width: 100%;
  display: flexbox;
  overflow: scroll;
  overscroll-behavior: contain;
  /* Mensagens se dissolvem ao passar por tras do composer em vez de cortar seco na borda.
     Mascara (e nao degrade de cor) funciona sobre qualquer fundo da pagina; as paradas seguem uma curva
     ease-in-out para nao formar a "linha" visivel que um degrade linear de 2 pontos deixa */
  -webkit-mask-image: linear-gradient(to top,
    transparent 0,
    transparent var(--chat-fade-start),
    rgba(0, 0, 0, 0.05) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.15),
    rgba(0, 0, 0, 0.2) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.3),
    rgba(0, 0, 0, 0.5) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.5),
    rgba(0, 0, 0, 0.8) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.7),
    rgba(0, 0, 0, 0.95) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.85),
    #000 calc(var(--chat-fade-start) + var(--chat-fade-size)));
  mask-image: linear-gradient(to top,
    transparent 0,
    transparent var(--chat-fade-start),
    rgba(0, 0, 0, 0.05) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.15),
    rgba(0, 0, 0, 0.2) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.3),
    rgba(0, 0, 0, 0.5) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.5),
    rgba(0, 0, 0, 0.8) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.7),
    rgba(0, 0, 0, 0.95) calc(var(--chat-fade-start) + var(--chat-fade-size) * 0.85),
    #000 calc(var(--chat-fade-start) + var(--chat-fade-size)));

  .fa-copy, .fa-star{
    cursor: pointer;
  }

  .pergunta{
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    background-color: #0D53A5;
    color: white;
    border-radius: 10px;
    padding: 10px 18px;
    max-width: 55%;
    justify-self: self-end;
    margin-left: auto;
    white-space-collapse:preserve;
    height: 60px;
    min-height: fit-content;

    p{
      margin: 0;
      padding: 0;
    }
    .pergunta-divider{
      border-top: 1px solid rgba(208, 208, 208, 0.464);
      display: block;
      width: 100%;
      margin-top: 10px;
    }
    .pergunta-buttons{
      display: flex;

      i{
        height: 25px; 
        width: 25px;
        /* background-color: red; */
        display: flex;
        align-items: end;
        justify-content: center;
      }
      .fa-star {
        margin-left: 10px;
      }
    }

  }

  .chat-message-content-resposta{
    background-color: #FFFFFFB2;
    max-width: 65%;
    border-radius: 10px;
    padding: 10px 25px 10px 15px;
    margin: 12px 0;

    .chat-message-content-resposta-decoration{
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: rgb(24, 74, 182);
      min-height: 22px;

      img{
        width: 12px;
      }
      .loader{
        margin: 0;
        width: 12px;
        border: 3px solid rgb(24, 74, 182);
      }
      i{
        width: 22px;
        height: 22px;
        padding: 4.5px;
        cursor: pointer;
      }
      .chat-message-content-resposta-decoration-audio-active{
        background-color: #2154a5bf;
        color: white;
        border-radius: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8em;
        padding-top: 5px;
      }
    }
    .chat-message-content-resposta-actions{
      margin-top: 8px;
      padding: 8px 0 0 15px;
      position: relative;
      i {
        cursor: pointer;
      }
    }
    .chat-message-content-resposta-filtro{
      position: relative;
      margin-top: 8px;
      padding: 8px 0 0px 2px;
      font-size: 0.9em;
      color: rgb(87, 87, 87);
      p{
        margin: 0;
      }
      i{
        transition: 0.15s ease-in-out;
      }
      .chat-message-content-resposta-filtro-header{
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        height: 27px;
      }
      .chat-message-content-resposta-filtro-detail{
        font-size: 0.85em;
        overflow: hidden;
        max-height: 500px;
        transition: 0.15s ease-in-out;
      }
      .chat-message-content-resposta-filtro-icon{
        transform: rotate(-90deg);
      }
    }
    .chat-message-content-resposta-recursos{
      position: relative;
      margin-top: 8px;
      padding: 8px 0 0px 2px;
      font-size: 0.9em;
      color: rgb(87, 87, 87);
      p{
        margin: 0;
      }
      i{
        transition: 0.15s ease-in-out;
      }
      .chat-message-content-resposta-recursos-header{
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        height: 27px;
      }
      .chat-message-content-resposta-recursos-detail{
        font-size: 0.85em;
        overflow: hidden;
        max-height: 500px;
        transition: 0.15s ease-in-out;
      }
      .chat-message-content-resposta-recursos-icon{
        transform: rotate(-90deg);
      }
    }
    .chat-message-content-resposta-inactive{
      max-height: 0 !important;
    }
    .chat-message-content-resposta-divider{
      position: absolute;
      width: 100%;
      height: 1px;
      background-color: #a1a1a14d;
      top: 0;
      left: 0;
    }
    .resposta{
      margin: 5px 0 0 0;
      justify-self: self-start;

      /* Os titulos da resposta chegam como **texto** e viram <strong>: ganham o azul do sistema */
      strong,
      b{
        color: var(--vector-accent);
        font-weight: 700;
      }

      /* Elementos gerados pelo markdown da resposta (VectorChatHistorico::formatarResposta) */
      p{
        margin: 0 0 8px 0;
      }
      h1, h2, h3, h4, h5, h6{
        margin: 14px 0 6px 0;
        font-weight: 700;
        line-height: 1.3;
        color: var(--vector-accent);
      }
      h1{ font-size: 1.35em; }
      h2{ font-size: 1.25em; }
      h3{ font-size: 1.15em; }
      h4, h5, h6{ font-size: 1.05em; }
      > :first-child{
        margin-top: 0;
      }
      > :last-child{
        margin-bottom: 0;
      }
      ul, ol{
        margin: 0 0 8px 0;
        padding-left: 22px;
      }
      li > ul,
      li > ol{
        margin-bottom: 0;
      }
      li{
        margin-bottom: 2px;
      }
      hr{
        margin: 12px 0;
        border: 0;
        border-top: 1px solid #a1a1a14d;
      }
      code{
        padding: 1px 4px;
        border-radius: 4px;
        background-color: #a1a1a126;
        color: inherit;
        font-size: 0.9em;
      }
      pre{
        margin: 0 0 8px 0;
        padding: 8px 10px;
        border: 0;
        border-radius: 6px;
        background-color: #a1a1a126;
        white-space: pre-wrap;

        code{
          padding: 0;
          background: none;
        }
      }
      blockquote{
        margin: 0 0 8px 0;
        padding: 2px 10px;
        border-left: 3px solid var(--vector-accent);
        font-size: inherit;
      }
      table{
        display: block;
        max-width: 100%;
        overflow-x: auto;
        margin: 0 0 8px 0;
        border-collapse: collapse;
      }
      th, td{
        padding: 4px 8px;
        border: 1px solid #a1a1a14d;
      }
      a{
        text-decoration: underline;
      }
    }

    /* Mensagens de processamento enquanto a resposta nao retorna (texto com brilho percorrendo) */
    .resposta-processando{
      display: inline-block;
      color: #7a8699;
      background: linear-gradient(90deg, #7a8699 0%, #7a8699 40%, rgb(24, 74, 182) 50%, #7a8699 60%, #7a8699 100%);
      background-size: 250% 100%;
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: resposta-processando-brilho 3.5s linear infinite;
      transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .resposta-processando-saindo{
      opacity: 0;
      transform: translateY(-4px);
    }

    .chat-message-content-resposta-documentos{
      position: relative;
      margin-top: 8px;
      padding-top: 8px;
      cursor: pointer;
      .chat-message-content-resposta-documentos-content{
        display: flex;
        border: 1px solid #D5E0EE;
        width: fit-content;
        font-size: 0.9em;
        border-radius: 6px;
        background-color: #FFFFFFB2;
        overflow: hidden;
        min-height: 35px;

        .chat-message-content-resposta-documentos-content-icon{
          background-color: #D5E0EE;
          color: #2153a5;
          display: flex;
          align-items: center;
          justify-items: center;
          
          i{
            padding: 0 10px;
            transform: rotate(-45deg);
          }
        }
        p{
          padding: 0 10px;
          margin: 0;
          align-self: center;
        }
      }
    }

    .chat-message-content-resposta-suggestion{
      position: relative;
      padding-top: 8px;
      margin-top: 8px;
      .chat-message-content-resposta-suggestion-content{
        cursor: pointer;
        display: flex;
        align-content: center;
        border: 1px solid rgb(194, 194, 194);
        width: fit-content;
        font-size: 0.9em;
        border-radius: 4px;
        padding: 8px 15px;
        color: #FFFFFF;
        background-color: #0D53A5;
        border-radius: 100px;
        font-weight: 400;

        p{
          margin: 0;
        }
        i{
          margin-left: 7px;
          padding-top: 4px;
          font-size: 0.9em;
        }
      }
    }
  }
}

/* ------------------------- */
/* FILTER */
/* ------------------------- */
.chat-message-content-filter{
  width: 100%;
  user-select: none;
  padding-bottom: 40px;
  
  .chat-message-content-filter-header{
    background: #FAFAFF;
    padding: 10px 25px 10px 15px;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;

    .chat-message-content-filter-header-decoration{
      width: 100%;
      img{
        width: 12px;
      }
    }
    p{
      margin: 5px 0 0 0;
      font-size: 0.85em;
    }
  }

  .chat-message-content-filter-invalid{
    border: 1px solid rgba(207, 38, 38, 0.35) !important;
  }

  .chat-message-content-filter-periodo-options-data:hover, .chat-message-content-filter-documento-options-data:hover{
    background-color: rgba(24, 74, 182, 0.077);
  }
  .chat-message-content-filter-periodo-options-data-selected:hover{
    background-color: transparent !important;
  }

  .chat-message-content-filter-atendimento{
    background: #f8f8fc;
    padding: 10px 10px 13px 15px;
    margin-top: 10px;
    border-radius: 5px;
    /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */

    .chat-message-content-filter-atendimento-title{
      margin: 5px 0;
      font-size: 0.9em;
    }
    .chat-message-content-filter-atendimento-options{
      background-color: #c9c9c94d;
      border-radius: 4px;
      display: flex;
      align-content: center;
      padding: 5px;
      position: relative;
      cursor: pointer;

      p {
        margin: 0 5px;
        padding: 2px 0;
        width: 50%;
        text-align: center;
        font-size: 0.9em;
        z-index: 3;
      }
      .chat-message-content-filter-atendimento-options-selected{
        background-color: white;
        width: 48%;
        height: 70%;
        position: absolute;
        align-self: center;
        z-index: 2;
        border-radius: 4px;
        left: 0;
        right: auto;
        transition: 0.1s ease-in-out;
        /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */
      }
      .chat-message-content-filter-atendimento-options-selected-first{
        left: 8px;
      }
      .chat-message-content-filter-atendimento-options-selected-second{
        left: 50%;
      }
    }
  }

  .chat-message-content-filter-periodo{
    background: #f8f8fc;
    padding: 10px 10px 13px 15px;
    margin-top: 10px;
    border-radius: 5px;
    /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */

    .chat-message-content-filter-periodo-title{
      margin: 5px 0;
      font-size: 0.9em;
    }
    .chat-message-content-filter-periodo-options{
      background-color: white;
      border: 1px solid rgba(255, 255, 255, 0);
      border-radius: 4px;
      box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;

      .chat-message-content-filter-periodo-options-data{
        padding: 8px 10px;
        display: flex;
        align-items: center;
        position: relative;
        flex-wrap: wrap;
        border-radius: 12px;
        cursor: pointer;

        .chat-message-content-filter-periodo-options-data-radio{
          background-color: #c9c9c94d;
          color: #e9e9e94d;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 100%;
          width: 20px;
          height: 20px;
        }
        .chat-message-content-filter-periodo-options-data-radio-active{
          background-color: #2153a5;
          color: white;
        }

        .chat-message-content-filter-periodo-options-data-divider{
          position: absolute;
          width: 95%;
          height: 1px;
          background-color: #c9c9c94d;
          top: 0;
        }

        .chat-message-content-filter-periodo-options-data-periodo{
          display: flex;
          justify-content: center;
          height: 0px;
          max-height: 0px;
          width: 100%;
          overflow: hidden;
          transition: 0.4s ease-in-out;
          cursor: default;

          .chat-message-content-filter-periodo-options-data-periodo-input{
            margin: 20px 10px 0 10px;
            td.active{
              border-radius: 0;
            }

            #calendarioField {
              background-color: transparent
            }

            .form-control {
              border: none;
              background-color: #EDEDF3;
            }
          }
        }
        .chat-message-content-filter-periodo-options-data-periodo-active{
          height: 100%;
          max-height: 500px;
        }

        p {
          margin: 0 10px;
          font-size: 0.9em;
        }
      }
    }
  }
  .chat-message-content-filter-documento{
    background: #f8f8fc;
    padding: 10px 15px 13px 15px;
    margin-top: 10px;
    border-radius: 5px;
    /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    .chat-message-content-filter-documento-title{
      margin: 5px 0;
      font-size: 0.9em;
    }
    .chat-message-content-filter-documento-button{
      margin: 5px 0;
      font-size: 0.85em;
      color: #2153a5;
      cursor: pointer;
    }

    .chat-message-content-filter-documento-options{
      background-color: white;
      border: 1px solid rgba(255, 255, 255, 0);
      border-radius: 4px;
      box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
      width: 100%;

      .chat-message-content-filter-documento-options-data{
        padding: 8px 10px;
        display: flex;
        align-items: center;
        position: relative;
        border-radius: 12px;
        cursor: pointer;

        .chat-message-content-filter-documento-options-data-check{
          background-color: #c9c9c94d;
          color: #e9e9e94d;
          display: flex;
          align-items: center;
          justify-content: center;
          border-radius: 6px;
          width: 20px;
          height: 20px;
        }
        .chat-message-content-filter-documento-options-data-check-active{
          background-color: #2153a5;
          color: white;
        }

        .chat-message-content-filter-documento-options-data-divider{
          position: absolute;
          width: 95%;
          height: 1px;
          background-color: #c9c9c94d;
          top: 0;
        }

        p {
          margin: 0 10px;
          font-size: 0.9em;
        }
      }
    }
  }

  .chat-message-content-filter-temperatura{
    /* Enquadramento do grupo herdado de .chat-message-content-filter-documento */
    .chat-message-content-filter-temperatura-options{
      background-color: white;
      border: 1px solid rgba(255, 255, 255, 0);
      border-radius: 4px;
      box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
      width: 100%;
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      padding: 12px 10px;

      input[type="range"]{
        flex: 1;
        width: auto;
        min-width: 0;
        margin: 0 5px;
        accent-color: #2153a5;
        cursor: pointer;
      }
      .chat-message-content-filter-temperatura-value{
        background-color: #2153a5;
        color: white;
        flex: 0 0 auto;
        white-space: nowrap;
        margin: 0 5px 0 15px;
        padding: 2px 4px;
        min-width: 34px;
        text-align: center;
        border-radius: 6px;
        font-size: 0.9em;
      }
    }
  }

  .chat-message-content-filter-button{
    background: #f8f8fc;
    padding: 10px 15px 13px 15px;
    margin-top: 10px;
    border-radius: 5px;
    /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    button{
      background-color: #0D53A5;
      color: white;
      font-weight: 600;
      width: 100%;
      height: 50px;
      border: none;
      border-radius: 8px;
      font-size: 14px;
    }
  }
}
.chat-message-content-filter-hidden {
  display: none;
}



/* ------------------------- */
/* EFEITO DIGITAÇÃO NA RESPOSTA */
/* ------------------------- */
.cursor {
  display: inline-block;
  width: 4px;
  height: 10px;
  background: #b1b0b0; /* Cor do cursor */
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes resposta-processando-brilho {
  0% { background-position: 100% 0; }
  100% { background-position: -150% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .resposta-processando{
    animation: none;
    transition: none;
  }
}

/* ------------------------- */
/* TROCAR PACIENTE */
/* ------------------------- */
.chat-change{
  width: 550px;
  max-width: 90%;
  height: 900px;
  max-height: 90%;
  background: white;
  position: absolute;
  top: 100%;
  /* abre junto com o fundo escuro (blurPage) — precisa ficar acima dele */
  z-index: var(--overlay-panel-z, 1950);
  border-radius: 10px;
  padding: 20px;
  transition: 0.6s ease-in-out;
  transform: translateY(0);

  .chat-change-content{
    height: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
  }
  .chat-change-paciente, .chat-change-atendimento, .chat-change-documentos{
    height: 100%;
    width: 100%;
    max-width: 100%;
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    background-color: white;
  }
}
.chat-change-active {
  top: 50%;
  transform: translateY(-55%);
}

/* ------------------------- */
/* CHANGE PACIENTE */
/* ------------------------- */
.chat-paciente-options{
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  z-index: 2;

  .chat-paciente-options-content{
    display: flex;
    flex-wrap: wrap;
    height: 100%;

    .chat-paciente-options-content-title{
      width: 100%;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: space-between;

      .chat-paciente-options-content-title-icon{
        padding: 0px 5px;
        margin-right: 10px;
        border-radius: 100%;
        cursor: pointer;
        height: 30px;
        width: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .chat-paciente-options-content-title-icon:active{
        background: rgb(234, 234, 234);
      }
    }
    .chat-paciente-options-content-search{
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      width: 100%;
      height: 30px;
      font-size: 0.85em;
      border-radius: 8px;
      position: relative;
      font-size: 0.9em;
      font-weight: 400;
      color: rgb(77, 77, 77);
      overflow-x: hidden;
      white-space: nowrap;

      input{
        width: 100%;
        height: 100%;
        background: rgb(234, 234, 234);
        border-radius: 8px;
        padding-left: 25px;
      }
      i{
        position: absolute;
        left: 10px;
      }

    }

    .chat-paciente-options-content-text-1{
      display: flex;
      align-items: center;
      width: 100%;
      height: 15px;
      margin-top: 8px;
      font-size: 0.8em;
      color: rgb(141, 141, 141);
    }

    .chat-paciente-options-content-options{
      width: 100%;
      height: 75%;
      overflow-y: scroll;

      .chat-paciente-options-content-options-data{
        display: flex;
        align-items: center;
        padding: 12px 8px;
        margin: 1px 5px 0 5px;
        position: relative;
        cursor: pointer;

        .chat-paciente-options-content-options-data-divider{
          position: absolute;
          top: 0;
          left: 2.5%;
          background: rgba(231, 231, 231, 0.742);
          width: 95%;
          height: 1px;
        }

        .chat-paciente-options-content-options-data-paciente{
          display: flex;
          flex-wrap: nowrap;
          align-content: start;
          font-size: 0.85em;
          width: 100%;

          .chat-paciente-options-content-options-data-paciente-image{
            margin-left: 8px;
            img{
              width: 40px;
              height: 40px;
              border-radius: 100%;
            }
          }

          .chat-paciente-options-content-options-data-paciente-info{
            width: 100%;
            margin-left: 10px;
            display: flex;
            flex-wrap: wrap;
            p{
              margin: 0;
              padding: 0;
            }
            .chat-paciente-options-content-options-data-paciente-info-text{
              width: 100%;
              height: 20px;
              margin-right: 10px;
              overflow-x: hidden;
              position: relative;

              .chat-paciente-options-content-options-data-paciente-info-text-name{
                bottom: 0;
                left: 0;
                width: 100%;
                font-weight: bold;
                white-space: nowrap;
                position: absolute;
              }
            }
            .chat-paciente-options-content-options-data-paciente-info-age{
              font-size: 1em;
              color: rgb(100, 100, 100);
              width: 100%;
            }
          }
          
        }
      }
      .chat-paciente-options-content-options-data:hover{
        background-color: rgba(24, 74, 182, 0.077) !important;
      }

      .chat-paciente-options-content-options-no-results{
        display: flex;
        justify-content: center;
        color: rgb(129, 129, 129);
      }
    }
  }
}

/* ------------------------- */
/* CHANGE ATENDIMENTO */
/* ------------------------- */
.chat-atendimento-options{
  height: 100%;
  z-index: 3;
  background: white;

  .chat-atendimento-options-content{
    display: flex;
    flex-wrap: wrap;
    height: 100%;

    .chat-atendimento-options-content-title{
      width: 100%;
      height: 30px;
      display: flex;
      align-items: center;

      .chat-atendimento-options-content-title-icon{
        padding: 0px 5px;
        margin-right: 10px;
        border-radius: 100%;
        cursor: pointer;
        height: 30px;
        width: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .chat-atendimento-options-content-title-icon:active, .chat-atendimento-options-content-title-icon-close:active{
        background: rgb(234, 234, 234);
      }

      .chat-atendimento-options-content-title-icon-close{
        padding: 0px 5px;
        border-radius: 100%;
        margin-left: auto;
        margin-right: 10px;
        cursor: pointer;
        height: 30px;
        width: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
      }


    }

    .chat-atendimento-options-content-paciente{
      border: 1px solid rgba(200, 200, 200, 0.504);
      display: flex;
      flex-wrap: nowrap;
      align-content: center;
      font-size: 0.85em;
      width: 100%;
      border-radius: 8px;
      padding: 2px 0;

      .chat-atendimento-options-content-paciente-image{
        display: flex;
        align-items: center;
        justify-items: center;
        margin: 1px 0 1px 8px;
        img{
          width: 40px;
          height: 40px;
          border-radius: 100%;
        }
      }

      .chat-atendimento-options-content-paciente-info{
        width: 100%;
        margin-left: 10px;
        display: flex;
        flex-wrap: wrap;
        align-content: center;
        p{
          width: 100%;
          margin: 0;
          padding: 0;
        }
        .chat-atendimento-options-content-paciente-info-text{
          width: 100%;
          height: 20px;
          margin-right: 10px;
          overflow-x: hidden;
          position: relative;
          .chat-atendimento-options-content-paciente-info-text-name{
            bottom: 0;
            left: 0;
            width: 100%;
            font-weight: bold;
            white-space: nowrap;
            position: absolute;
          }
        }
        .chat-atendimento-options-content-paciente-info-age{
          font-size: 0.95em;
          color: rgb(100, 100, 100);
        }
      }
    }

    .chat-atendimento-options-content-search{
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      width: 100%;
      height: 30px;
      font-size: 0.85em;
      border-radius: 8px;
      position: relative;
      font-size: 0.9em;
      font-weight: 400;
      color: rgb(77, 77, 77);
      overflow-x: hidden;
      white-space: nowrap;
      margin-top: 10px;

      input{
        width: 100%;
        height: 100%;
        background: rgb(234, 234, 234);
        border-radius: 8px;
        padding-left: 25px;
      }
      i{
        position: absolute;
        left: 10px;
      }
    }

    .chat-atendimento-options-content-text-1{
      display: flex;
      align-items: center;
      width: 100%;
      height: 15px;
      margin-top: 8px;
      font-size: 0.8em;
      color: rgb(141, 141, 141);
    }

    .chat-atendimento-options-content-options{
      width: 100%;
      height: 60%;
      font-size: 0.9em;
      overflow-y: scroll;

      .chat-atendimento-options-content-options-data{
        display: flex;
        align-items: center;
        padding: 12px 8px;
        position: relative;
        margin: 1px 5px 0 5px;
        border-radius: 8px;
        cursor: pointer;

        .chat-atendimento-options-content-options-data-divider{
          position: absolute;
          top: 0;
          left: 2.5%;
          background: rgba(231, 231, 231, 0.742);
          width: 95%;
          height: 1px;
        }

        .chat-atendimento-options-content-options-data-atendimento{
          display: flex;
          flex-wrap: wrap;
          align-content: start;
          font-size: 0.85em;
          width: 100%;
          margin-left: 8px;

          p{
            margin: 0;
            padding: 0;
            color: rgb(129, 129, 129);
          }

          .chat-atendimento-options-content-options-data-atendimento-info{
            width: 50%;
            .chat-atendimento-options-content-options-data-atendimento-info-number{
              font-weight: bold;
              color: black;
            }
            
          }
          .chat-atendimento-options-content-options-data-atendimento-detail{
            width: 50%;
          }

        }
      }
      .chat-atendimento-options-content-options-data:hover{
        background-color: rgba(24, 74, 182, 0.077) !important;
      }

      .chat-atendimento-options-content-options-no-results{
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: rgb(129, 129, 129);
      }
    }

    .chat-atendimento-options-content-message{
      width: 100%;
      margin-top: 20px;
      opacity: 1;
      height: 30px;
      
      p{
        width: 100%;
        color: rgb(139, 139, 139);
        text-align: center;
        font-size: 0.8em;
        margin: 0;
      }
    }
    .chat-atendimento-options-content-message-hidden{
      opacity: 0;
    }
  }
}

/* ------------------------- */
/* DOCUMENTOS */
/* ------------------------- */
.chat-documentos{
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  /* O wrapper ocupa a altura que sobra e o scroll fica na lista, nunca no
     container — assim o botao Voltar fica sempre encostado no rodape da modal,
     com a lista cheia ou com um documento so */
  .chat-documentos-wrapper{
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .chat-documentos-header{
    flex: none;
    width: 100%;
    height: fit-content;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0;

    .chat-documentos-header-info{
      width: 100%;
      background-color: rgba(24, 74, 182, 0.088);
      padding: 8px 15px;
      font-size: 0.9em;
      border-radius: 6px;
    }
  }

  .chat-documentos-content{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background-color: white;
    /* o padding-bottom de 180px existia para o ultimo item nao ficar atras do
       botao; ele agora esta fora da area de scroll */
    padding: 10px 3px;
    border-top: 1px solid #a1a1a14d;
  }

  .chat-documentos-content-item{
    width: 99%;
    height: fit-content;
    padding: 10px;
    margin: auto;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: rgba(9, 30, 66, 0.25) 0px 4px 8px -2px, rgba(9, 30, 66, 0.08) 0px 0px 0px 1px;


    .chat-documentos-content-item-header{
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;

      .chat-documentos-content-item-header-decoration{
        display: flex;
        border: 1px solid #EDEDF3;
        width: fit-content;
        border-radius: 6px;
        max-width: 95%;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        margin-right: 10px;
        width: 100%;

        .chat-documentos-content-item-header-decoration-left {
          width: 15%;
          max-width: 40px;
          background-color: rgba(24, 74, 182, 0.217);
          border-right: 1px solid #EDEDF3;
          color: #2153a5;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          display: flex;
          align-items: center;
          font-size: 0.85em;
        }

        .chat-documentos-content-item-header-decoration-right {
          width: 100%;
          padding: 3px 5px;
          margin: 0;

          .chat-documentos-content-item-header-decoration-right-descricao {
            font-size: 0.85em;
          }
          .chat-documentos-content-item-header-decoration-right-detalhe {
            font-size: 0.7em;
          }
        }

        p{
          margin: 0;
        }
      }
      i{
        margin-right: 15px;
        color: rgb(127, 127, 127);
        transform: rotate(0deg);
        transition: 0.15s ease-in-out;
      }
      .chat-documentos-content-item-header-decoration-icon-open{
        transform: rotate(-180deg);
      }

    }

    .chat-documentos-content-item-loader {
      max-height: 5000px;
      overflow: hidden;
      transition: max-height 0.8s ease-in;

      .loader {
        margin: 15px auto;
        border: 4px solid rgb(24, 74, 182);
        width: 30px;
      }
    }
    .chat-documentos-content-item-loader-hidden {
      max-height: 0;
      transition: max-height 0.2s ease-out;
    }

    .chat-documentos-content-item-container {
      max-height: 5000px;
      overflow: hidden;
      transition: max-height 0.8s ease-in;
    }
    
    .chat-documentos-content-item-container-hidden {
      max-height: 0;
      transition: max-height 0.2s ease-out;
    }

    .chat-documentos-content-item-container-atendimento{
      .chat-documentos-content-item-container-atendimento-title{
        color: rgb(158, 158, 158);
        font-size: 0.8em;
        margin-bottom: 3px;
      }
      .chat-documentos-content-item-container-atendimento-descricao{
        font-size: 0.8em;
        font-weight: 500;
      }
      p{
        margin: 0;
      }
    }
    .chat-documentos-content-item-container-conteudo{
      margin-top: 10px;
      word-break: break-word;
      overflow-wrap: break-word;
      white-space: normal;

      .chat-documentos-content-item-container-conteudo-title{
        color: rgb(158, 158, 158);
        font-size: 0.8em;
        margin-bottom: 3px;
      }
      .chat-documentos-content-item-container-conteudo-descricao{
        font-size: 0.8em;
        font-weight: 500;
      }
      p{
        margin: 0;
      }
    }
    .chat-documentos-content-item-container-tipo{
      margin-top: 10px;
      .chat-documentos-content-item-container-tipo-title{
        color: rgb(158, 158, 158);
        font-size: 0.8em;
        margin-bottom: 3px;
      }
      .chat-documentos-content-item-container-tipo-descricao{
        font-size: 0.8em;
        font-weight: 500;
      }
      p{
        margin: 0;
      }
    }
    .chat-documentos-content-item-container-data{
      margin-top: 10px;
      .chat-documentos-content-item-container-data-title{
        color: rgb(158, 158, 158);
        font-size: 0.8em;
        margin-bottom: 3px;
      }
      .chat-documentos-content-item-container-data-descricao{
        font-size: 0.8em;
        font-weight: 500;
      }
      p{
        margin: 0;
      }
    }

    .chat-documentos-content-item-container-profissional{
      display: flex;

      .chat-documentos-content-item-container-profissional-foto{
        display: flex;
        align-items: center;
        img{
          width: 40px;
          height: 40px;
          border-radius: 100%;
        }
      }
      .chat-documentos-content-item-container-profissional-info{
        display: flex;
        flex-wrap: wrap;
        margin-left: 8px;
        align-content: center;

        .chat-documentos-content-item-container-profissional-info-descricao{
          color: rgb(158, 158, 158);
        }
        .chat-documentos-content-item-container-profissional-info-nome{
          font-weight: bold;
        }
        p{
          width: 100%;
          margin: 0;
          font-size: 0.8em;
        }
      }
    }
  }
  .chat-documentos-button{
    flex: none;
    width: 100%;
    height: fit-content;
    min-height: fit-content;
    padding-top: 10px;
    background-color: white;

    button{
      width: 100%;
      height: 50px;
      color: white;
      background-color: #0D53A5;
      border-radius: 8px;
      border: none;
      font-weight: 500;
      font-size: 14px;
    }
  }
  .chat-documentos-divider{
    width: 100%;
    height: 1px;
    background: rgb(234, 234, 234);
    display: block;
    margin: 13px 0 10px 0;
  }
}





/* ------------------------- */
/* MEDIA */
/* ------------------------- */
@media(max-width:852.98px) {

  .chat-message{
    padding: 0 1px 20px 1px;
  }
  
  .chat-message-paciente{
    --paciente-gutter: 16px;
    --paciente-avatar: 38px;
    --paciente-radius: 20px;
    top: 14px;
    gap: 10px;
    padding: 6px 6px 6px 8px;

    .chat-message-paciente-info{
      .chat-message-paciente-info-name{
        font-size: 0.82em;
      }
      .chat-message-paciente-info-atendimento,
      .chat-message-paciente-info-atendimento-ver{
        font-size: 0.74em;
      }
    }
    /* So o icone: botao circular com area de toque de 40px */
    .chat-message-paciente-button{
      button{
        width: 40px;
        min-height: 40px;
        padding: 0;

        p{
          display: none;
        }
        i{
          font-size: 1.05em;
        }
      }
    }
  }
  .chat-message-decoration{
    margin-left: 15px;
    margin-right: 15px;
    .chat-message-decoration-content{
      margin-top: 110px;
      margin-bottom: 110px;
    }
  }

  .chat-message-field{
    margin: 0;
    border-radius: 18px 18px 0 0;
    /* Respiro do home indicator do iPhone sem colar a pilula na borda */
    padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px));

    .chat-message-field-content{
      .chat-message-composer{
        --composer-control: 40px;
      }
      /* 16px evita o zoom automatico do iOS ao focar o campo */
      .chat-message-field-content-input textarea{
        font-size: 16px;
        padding-top: 9px;
        padding-bottom: 9px;
      }
      .chat-message-composer-expanded .chat-message-field-content-input textarea{
        padding-top: 2px;
        padding-bottom: 4px;
        max-height: 34vh;
      }
    }

    .chat-message-field-content{
      i{
        color: rgb(24, 74, 182);
        font-size: 1.2em;
        margin-bottom: 9px;
      }
      .chat-message-field-floating-button{
        right: 15px;
      }
    }
  }
  
  .chat-message-content{
    --chat-fade-size: 36px;
    padding: 100px 0 max(100px, calc(var(--chat-composer-overlap) + var(--chat-fade-size) + 16px)) 0;
    .pergunta{
      max-width: 75%;
      font-size: 0.9em;
    }
    .chat-message-content-resposta{
      max-width: 75%;
      .resposta{
        font-size: 0.9em;
      }
      .chat-message-content-resposta-documentos-content {
        font-size: 0.8em !important;
      }
    }
  }

  .chat-message-content-filter-periodo-options-data{
    #calendarioField {
      background-color: transparent !important;
      border: none !important;
      box-shadow: none !important;
    }
  }
}