
/* ------------------------- */
/* COMMON */
/* ------------------------- */
.no-scroll {
  overflow: hidden;
  height: 100%;
}

#index-body{
  background: linear-gradient(0deg, rgba(147,177,212,1) 0%, rgba(250,250,255,0.8631827731092436) 77%);
  background-attachment: fixed;
  field-sizing: content;
}
#index-body, #index-main{
  height: 100%;
}

.d-none{
  display: none !important;
}

/* ------------------------- */
/* TIPOGRAFIA */
/* ------------------------- */
/* Fonte unica do Vector, seguindo o prototipo. O Inspinia carregado antes deste arquivo
   define Open Sans no body, na .label e na .badge, e peso 100 nos titulos: tudo isso e
   sobrescrito aqui. Pilha de fontes do sistema: nenhum arquivo extra para baixar e o
   texto aparece ja na primeira pintura, sem troca de fonte (FOUT).
   Escala de pesos: 400 texto, 500 medio, 600 enfase, 700 titulos. */
:root{
  --vector-font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --vector-text: #1A2233;
  --vector-text-strong: #16213A;
  --vector-text-secondary: #4A5670;
  --vector-text-subtle: #667085;
  --vector-text-muted: #8A94A6;
  /* Azul de destaque do sistema (links, estados ativos, titulos das respostas) */
  --vector-accent: #0D53A5;
}

html{
  /* Impede o iOS/Android de inflar o texto sozinho ao girar a tela */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body{
  font-family: var(--vector-font-family);
  color: var(--vector-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* Campos e botoes nao herdam a fonte do body por padrao do navegador */
input,
textarea,
select,
button,
.form-control,
.label,
.badge{
  font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6{
  font-family: inherit;
  font-weight: 700;
  color: var(--vector-text-strong);
  letter-spacing: -0.01em;
}

/* Numeros com largura fixa: codigos de atendimento e datas ficam alinhados em coluna
   e o texto nao "treme" enquanto o usuario digita um codigo na busca */
input,
.choose-atendimento-options-content-options-data-atendimento-detail,
.choose-atendimento-options-content-options-data-atendimento-info-data,
.choose-local-paciente-options-content-options-data-paciente-atendimento,
.chat-historico-content-item-header-info-atendimento{
  font-variant-numeric: tabular-nums;
}

/* ------------------------- */
/* CAMADA DOS ALERTAS E MODAIS */
/* ------------------------- */
/* Escala unica de z-index e de tempos para todo overlay: o alerta sempre sobe
   acima do conteudo, independente do que estiver renderizado por cima dele.
   A visibilidade entra/sai por opacity + visibility (z-index nao e animavel,
   e transiciona-lo mantinha a camada presa atras do conteudo no meio do fade).

   Ordem das camadas, de baixo para cima:
     conteudo da pagina (z-index < 100)
     --overlay-page-z    tela cheia que substitui a pagina (favoritos "ver mais")
     --overlay-blur-z    fundo escuro
     --overlay-panel-z   paineis que abrem SOBRE o fundo escuro (chat-change)
     --overlay-z         alertas e modais
     --overlay-loader-z  preloader
   Quem for renderizado por cima do fundo escuro precisa usar --overlay-panel-z;
   z-index solto abaixo disso fica coberto pelo blur. */
:root{
  --overlay-page-z: 1800;
  --overlay-blur-z: 1900;
  --overlay-panel-z: 1950;
  --overlay-z: 2000;
  --overlay-loader-z: 2100;
  --overlay-fade: 0.15s;
  --overlay-motion: 0.18s;
  --overlay-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.alert,
.background-blur,
.chat-historico-content-alert,
.chat-historico-content-edit-mobile,
.chat-favorita-delete,
.chat-favorita-edit,
.chat-favorita-share,
.chat-favorita-view,
.chat-favorita-content-edit-mobile,
.chat-filter{
  /* fixed: ancorado na viewport — o alerta nao fica preso no topo do documento
     quando a pagina esta rolada, como acontecia com position: absolute */
  position: fixed;
  inset: 0;
  z-index: var(--overlay-z);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--overlay-fade) var(--overlay-ease),
              visibility 0s linear var(--overlay-fade);
}

.alert-on,
.background-blur-active,
.chat-historico-content-alert-on,
.chat-historico-content-edit-mobile-on,
.chat-favorita-delete-on,
.chat-favorita-edit-on,
.chat-favorita-share-on,
.chat-favorita-view-on,
.chat-favorita-content-edit-mobile-on,
.chat-filter:not(.chat-filter-hidden){
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

/* TOOLTIP */
.tooltip{
  .tooltip-inner{
    background-color: rgb(24, 74, 182);
  }
}
.tooltip.top{
  .tooltip-arrow{
    border-top:5px solid rgb(24, 74, 182) !important;
  }
}
.tooltip.right{
  .tooltip-arrow{
    border-right:5px solid rgb(24, 74, 182) !important;
  }
}

.background-blur{
  background-color: rgba(0, 0, 0, 0.491);
  z-index: var(--overlay-blur-z);
}

/* BARRA SCROLL */
* {
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
}

/* PRELOADER */
.box-load{
  display: flex;
  justify-content: center;
  position: absolute;
  width: 100%;
  background-color: rgb(255, 255, 255);
  height: 100%;
  z-index: var(--overlay-loader-z);

  .pre-load{
    margin-top: 20vh;
    .pre-load-img{
      margin-left: auto;
      display: flex;
      justify-content: center;
      img{
        width: 40px;
      }
    }
    h2{
      font-size: 3em;

    }
  }
}

.loader {
  margin: 50px auto;
  justify-self: center;
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 8px solid rgb(24, 74, 182);
  animation:
    l20-1 0.8s infinite linear alternate,
    l20-2 1.6s infinite linear;
}

.remove-loader{
  animation: fadeOut 0.9s forwards;
}

/* Saida do preloader: fica no topo enquanto some e so depois desce */
@keyframes fadeOut {
  0% { opacity: 1; z-index: var(--overlay-loader-z); }
  99% { opacity: 0; z-index: var(--overlay-loader-z); }
  100% { opacity: 0; z-index: -1000; }
}

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

@keyframes l20-1{
   0%    {clip-path: polygon(50% 50%,0       0,  50%   0%,  50%    0%, 50%    0%, 50%    0%, 50%    0% )}
   12.5% {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100%   0%, 100%   0%, 100%   0% )}
   25%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 100% 100%, 100% 100% )}
   50%   {clip-path: polygon(50% 50%,0       0,  50%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
   62.5% {clip-path: polygon(50% 50%,100%    0, 100%   0%,  100%   0%, 100% 100%, 50%  100%, 0%   100% )}
   75%   {clip-path: polygon(50% 50%,100% 100%, 100% 100%,  100% 100%, 100% 100%, 50%  100%, 0%   100% )}
   100%  {clip-path: polygon(50% 50%,50%  100%,  50% 100%,   50% 100%,  50% 100%, 50%  100%, 0%   100% )}
}
@keyframes l20-2{ 
  0%    {transform:scaleY(1)  rotate(0deg)}
  49.99%{transform:scaleY(1)  rotate(135deg)}
  50%   {transform:scaleY(-1) rotate(0deg)}
  100%  {transform:scaleY(-1) rotate(-135deg)}
}

.loading-img{
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ------------------------- */
/* NAVBAR */
/* ------------------------- */

.divider-right{
  position: absolute;
  width: 1px;
  background-color: #EDEDF3;
  height: 140%;
  bottom: -5px;
  right: 0;
}
.divider-left{
  position: absolute;
  width: 1px;
  background-color: rgba(120, 120, 120, 0.19);
  height: 140%;
  bottom: -5px;
  left: 0;
}

.ambiente-de-testes{
  width: 100%;
  background-color: #ed5565;
  color: white;
  position: fixed;
  text-align: center;
  z-index: 6;
  user-select: none;
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 500px;
}

/* Barra superior no formato do prototipo: marca | ferramentas ........ favoritos | conta.
   A altura mora em --navbar-height para o conteudo (#index-container) descontar o mesmo valor. */
:root{
  --navbar-height: 60px;
  --navbar-border: #E3E8EF;
  --navbar-icon: #667085;
  --navbar-icon-muted: #8A94A6;
  --navbar-accent: #0F56C9;
  --navbar-hover-bg: #F0F4FA;
  --navbar-active-bg: #EEF3FD;
}

.navbar-page{
  height: var(--navbar-height);
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--navbar-border);
  position: fixed;
  width: 100%;
  z-index: 5;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  img{
    user-select: none;
    -webkit-user-drag: none;
  }

  .navbar-page-content{
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    height: 100%;
    /* Sem padding a direita: as celulas de favoritos e conta encostam na borda, como no prototipo */
    padding-left: 20px;

    .navbar-page-content-left,
    .navbar-page-content-right{
      display: flex;
      align-items: center;
      min-width: 0;
    }
    .navbar-page-content-right{
      align-items: stretch;
    }

    /* Foco de teclado visivel em todos os controles da barra (o mouse nao ganha o anel) */
    a:focus,
    button:focus{
      outline: none;
    }
    a:focus-visible,
    button:focus-visible{
      outline: 2px solid var(--navbar-accent);
      outline-offset: 2px;
    }
  }

  /* ---------------- MARCA ---------------- */
  .navbar-page-content-left-brand{
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding-right: 18px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
  }
  .navbar-page-content-left-brand:hover,
  .navbar-page-content-left-brand:focus{
    text-decoration: none;
  }
  .navbar-page-content-left-logo{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: none;
    img{
      width: 26px;
      height: 26px;
      object-fit: contain;
      display: block;
    }
  }

  .navbar-page-content-left-description{
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: none;

    .navbar-page-content-left-description-name{
      font-size: 17px;
      font-weight: 700;
      line-height: 1.1;
      letter-spacing: -0.01em;
      white-space: nowrap;
      color: var(--vector-text-strong);
    }
    .navbar-page-content-left-description-version{
      margin-top: 2px;
      font-size: 11px;
      font-weight: 400;
      color: var(--vector-text-muted);
    }
  }

  .navbar-page-content-left-local{
    display: flex;
    align-items: center;
    justify-content: center;

    p{
      margin: 0 12px;
      padding: 0;
    }

    .navbar-page-content-left-local-logo{
      margin-left: 18px;
      font-size: 1.3em;
      color: rgb(24, 74, 182);
    }

    .navbar-page-content-left-local-info-name{
      display: flex;
      align-items: center;
      color: rgb(24, 74, 182);
      font-weight: bold;
    }
    .navbar-page-content-left-local-info-description{
      font-size: 0.8em;
    }
  }

  /* ---------------- FERRAMENTAS (historico, nova conversa) ---------------- */
  .navbar-page-content-left-tools{
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 18px;
    border-left: 1px solid var(--navbar-border);
  }

  .navbar-page-content-icon-button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background-color: transparent;
    color: var(--navbar-icon);
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
  }
  .navbar-page-content-icon-button:hover{
    background-color: var(--navbar-hover-bg);
    color: var(--vector-text-strong);
  }
  .navbar-page-content-icon-button:active{
    transform: scale(0.96);
  }
  /* Painel correspondente aberto */
  .navbar-page-content-icon-button-active,
  .navbar-page-content-icon-button-active:hover{
    background-color: var(--navbar-active-bg);
    color: var(--navbar-accent);
  }

  /* ---------------- CELULAS DA DIREITA (favoritos, conta) ---------------- */
  .navbar-page-content-right-favorite,
  .navbar-page-content-right-user{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-left: 1px solid var(--navbar-border);
  }

  .navbar-page-content-right-favorite{
    width: 52px;
    padding: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    background-color: transparent;
    color: var(--navbar-icon-muted);
    font-size: 17px;
    cursor: pointer;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  }
  .navbar-page-content-right-favorite:hover{
    color: var(--navbar-accent);
    background-color: #FAFBFD;
  }
  /* Estrela cheia = painel de favoritos aberto (o JS alterna fa-regular/fa-solid) */
  .navbar-page-content-right-favorite:has(.fa-solid){
    color: var(--navbar-accent);
  }

  .navbar-page-content-right-user{
    .navbar-page-content-right-user-arrow{
      height: 100%;

      .dropdown-toggle{
        display: flex;
        align-items: center;
        gap: 8px;
        height: 100%;
        padding: 0 16px 0 14px;
        border: 0;
        border-radius: 0;
        background-color: transparent;
        color: var(--navbar-icon-muted);
        cursor: pointer;
        transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;

        i{
          font-size: 11px;
          transition: transform 0.2s var(--overlay-ease);
        }
      }
      .dropdown-toggle:hover{
        color: var(--navbar-accent);
        background-color: #FAFBFD;
      }

      /* Foto ou iniciais (primeiro e ultimo nome): identifica a conta sem ocupar espaco com o nome */
      .navbar-page-content-right-user-avatar{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background-color: var(--navbar-active-bg);
        color: var(--navbar-accent);
        font-size: 12.5px;
        font-weight: 700;
        overflow: hidden;

        img{
          width: 100%;
          height: 100%;
          object-fit: cover;
        }
      }

      /* Menu da conta no mesmo desenho dos menus do prototipo */
      .dropdown-menu{
        min-width: 264px;
        margin-top: 6px;
        margin-right: 10px;
        padding: 6px;
        border: 1px solid #E6ECF5;
        border-radius: 10px;
        box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);

        > li > a{
          display: flex;
          align-items: center;
          gap: 9px;
          padding: 8px 10px;
          border-radius: 7px;
          font-size: 12.5px;
          color: #2B3648;
          cursor: pointer;
        }
        > li > a:hover,
        > li > a:focus{
          background-color: #F2F5FA;
        }
        .divider{
          margin: 6px 0;
          background-color: #EEF2F7;
        }
        #btn-logout{
          color: #B42318;
          i{
            width: 14px;
            text-align: center;
          }
        }
        #btn-logout:hover,
        #btn-logout:focus{
          background-color: #FEF3F2;
        }
      }

      .navbar-page-content-right-user-info{
        cursor: default;

        /* Card do prototipo (Figma "Toast"): gradiente azul com a marca decorativa ao fundo */
        .navbar-page-content-right-user-info-card{
          position: relative;
          overflow: hidden;
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          gap: 14px;
          padding: 12px 12px 16px;
          border-radius: 8px;
          background: radial-gradient(circle at 0% 100%, #0D53A5 0%, #1882CA 100%);
          box-shadow: 0 9px 5px rgba(18, 97, 176, 0.05), 0 4px 4px rgba(18, 97, 176, 0.09), 0 1px 2px rgba(18, 97, 176, 0.1);
        }
        .navbar-page-content-right-user-info-card-decor-outline,
        .navbar-page-content-right-user-info-card-decor-mark{
          position: absolute;
          pointer-events: none;
          user-select: none;
        }
        .navbar-page-content-right-user-info-card-decor-outline{
          top: -8px;
          right: -15px;
          height: calc(100% + 16px);
        }
        .navbar-page-content-right-user-info-card-decor-mark{
          top: 50%;
          right: 4px;
          height: 90%;
          transform: translateY(-40%);
        }

        .navbar-page-content-right-user-info-foto,
        .navbar-page-content-right-user-info-identificacao,
        .navbar-page-content-right-user-info-contato{
          position: relative;
          z-index: 1;
        }
        .navbar-page-content-right-user-info-foto{
          box-sizing: border-box;
          width: 64px;
          height: 64px;
          border: 2px solid #1B76BF;
          border-radius: 50%;
          object-fit: cover;
        }
        /* Sem foto: iniciais no mesmo desenho do avatar padrao (.no-portrait) */
        .navbar-page-content-right-user-info-iniciais{
          display: flex;
          align-items: center;
          justify-content: center;
          background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #EEF3FD 72%);
          color: var(--vector-accent);
          font-size: 22px;
          font-weight: 600;
          letter-spacing: 0.5px;
        }
        .navbar-page-content-right-user-info-identificacao,
        .navbar-page-content-right-user-info-contato{
          display: flex;
          flex-direction: column;
          width: 100%;
          min-width: 0;
          line-height: 1.25;

          > span{
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }
        .navbar-page-content-right-user-info-identificacao{
          gap: 4px;
        }
        .navbar-page-content-right-user-info-contato{
          gap: 6px;
          font-size: 13px;
          color: #ACD1FC;
        }
        .navbar-page-content-right-user-info-nome{
          font-size: 15px;
          font-weight: 500;
          color: #FFFFFF;
        }
        .navbar-page-content-right-user-info-login{
          font-size: 13px;
          color: #ACD1FC;
        }
      }
    }
    .open{
      .dropdown-toggle{
        color: var(--navbar-accent);
        i{
          transform: rotate(180deg);
        }
      }
      .dropdown-menu{
        animation: navbar-menu-in 0.14s var(--overlay-ease);
      }
    }
  }
}

@keyframes navbar-menu-in{
  from{ opacity: 0; transform: translateY(-4px) scale(0.98); }
  to{ opacity: 1; transform: none; }
}

/* ------------------------- */
/* MARCA VECTOR */
/* ------------------------- */
.marca-vector{
  width: 100%;
  z-index: 2;
  position: relative;

  .marca-vector-logo{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    img{
      width: 35px;
    }
  }
  .marca-vector-greeting{
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-content: center;
    h3{
      margin: 0;
    }
  }
  .marca-vector-info p{
    margin-top: 10px;
    color: #696969cc;
    font-size: 0.75em;
    display: flex;
    justify-content: center;
    align-items: center;
    img{
      width: 12px;
      margin: 0 3px;
    }
  }
}

/* ------------------------- */
/* ALERT */
/* ------------------------- */
.alert {
  display: flex;
  justify-content: center;
  align-items: center;
}

.alert-container {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  max-width: 500px;
  transform: scale(0.97);
  transition: transform var(--overlay-motion) var(--overlay-ease);
}

.alert-on .alert-container {
  transform: scale(1);
}

/* ------------------------- */
/* LOG OUT */
/* ------------------------- */
.log-out{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 30px 20px;
  max-width: 400px;
  .log-out-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    background-color: rgba(0, 60, 255, 0.103);
    i{
      font-size: 4.5em;
      color: rgb(24, 74, 182);
    }
  }
  .log-out-text{
    margin: 20px 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
  }

  .log-out-confirm{
    width: 100%;
    button{
      width: 100%;
      margin-bottom: 10px;
      background: rgb(24, 74, 182);
      color: white;
      border: none;
      padding: 12px;
      border-radius: 8px;
    }
  }
  .log-out-cancel{
    width: 100%;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: rgb(24, 74, 182);
    padding: 12px;
  }

}

/* ------------------------- */
/* ESQUECI SENHA */
/* ------------------------- */
.esqueci-senha{
  margin: 20px 5px;
  display: flex;
  flex-wrap: wrap;
  max-width: 400px;
  h4{
    width: 100%;
    font-weight: 700;
    font-style: Bold;
    font-size: 18px;
    text-align: center;
    color: #424A57;
  }
  .esqueci-senha-text{
    width: 70%;
    text-align: center;
    margin: auto;
  }
  form{
    width: 100%;
    margin-top: 30px;

    .esqueci-senha-input{
      position: relative;
      input{
        height: 50px;
        border: 1px solid #EDEDF3;
        border-radius: 8px;
      }

      .esqueci-senha-input-label{
        font-weight: 500;
        font-size: 12px;
        padding: 0px 5px;
        background-color: white;
        color: #858a93;
        position: absolute;
        left: 10px;
        top: -8px;
      }
    }
  }
  .esqueci-senha-button-email{
    width: 100%;
    height: 50px;
    margin-bottom: 5px;
    background: rgb(24, 74, 182);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
  }
  .esqueci-senha-button-sms{
    width: 100%;
    margin-bottom: 5px;
    background: rgba(24, 74, 182, 0.128);
    color: rgb(24, 74, 182);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
  }
  .esqueci-senha-button-cancel{
    width: 100%;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: rgb(24, 74, 182);
    padding: 12px;
    font-weight: 500;
  }
}


/* ------------------------- */
/* ALTERAR SENHA */
/* ------------------------- */
.sis-usuario-alterar-senha{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;

  .sis-usuario-alterar-senha-container{
    background-color: rgb(255, 255, 255);
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 80%;

    p{
      font-size: 1.2em;
      margin: 0 0 30px 0;
    }
    .help-block{
      font-size: 0.9em;
    }

    .sis-usuario-alterar-senha-container-input{
      position: relative;
      margin-bottom: 25px;
      input{
        height: 40px;
      }
    
      .sis-usuario-alterar-senha-container-input-label{
        font-size: 0.8em;
        padding: 0px 5px;
        background-color: white;
        position: absolute;
        left: 12px;
        top: -8px;
      }
    }
    button{
      width: 100%;
      font-size: 1.2em;
    }
  }
}



/* ------------------------- */
/* SUCCESS ESQUECI SENHA */
/* ------------------------- */
.success-esqueci-senha{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 30px 20px;
  max-width: 400px;
  .success-esqueci-senha-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    background-color: rgba(0, 60, 255, 0.103);
    i{
      font-size: 4.5em;
      color: rgb(24, 74, 182);
    }
  }
  .success-esqueci-senha-text{
    margin: 20px 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
  }

  .success-esqueci-senha-confirm{
    width: 100%;
    button{
      width: 100%;
      margin-bottom: 10px;
      background: rgb(24, 74, 182);
      color: white;
      border: none;
      padding: 12px;
      border-radius: 8px;
    }
  }
  .success-esqueci-senha-cancel{
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 12px;
    background: rgb(24, 74, 182);
    color: white;
  }

}

/* ------------------------- */
/* HISTORICO CONTENT */
/* ------------------------- */
.chat-historico-inactive{
  width: 0px !important;
  overflow: hidden;
  opacity: 0 !important;
  transition: width 0.1s ease-in-out, opacity 0.15s ease-in-out;
}

.chat-historico{
  width: 375px;
  background-color: #FAFAFF;
  padding: 15px 15px 15px 15px;
  opacity: 1;
  transition: width 0.1s ease-in-out, opacity 0.2s ease-in-out;
  z-index: 4;
  border-right: 1px solid rgba(120, 120, 120, 0.082);

  .chat-historico-search-header{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;

    #close-historico{
      display: none;
    }
    p{
      margin: 0;
      font-weight: 600;
      font-size: 18px;
    }
    i{
      margin-right: 20px;
    }
  }

  .chat-historico-search{
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 10px;

    .chat-historico-search-input{
      width: 100%;
      position: relative;
      margin: 0;

      input{
        width: 100%;
        height: 34px;
        background-color: #F2F5FA;
        border: none;
        border-radius: 8px;
        padding: 0 10px 0 32px;
        font-size: 12.5px;
        color: #1A2233;
        outline: 0;
      }
      input::placeholder {
        color: #8A94A6;
      }
      input:focus{
        box-shadow: inset 0 0 0 1px #0D53A5;
      }
      i{
        position: absolute;
        left: 10px;
        top: 0;
        height: 100%;
        display: flex;
        align-items: center;
        font-size: 13px;
        pointer-events: none;
        color: #8A94A6;
      }
    }
  }
  .chat-historico-content{
    overflow-y: scroll;
    padding: 10px 3px 160px 3px;
    height: 100%;
    border-top: 1px solid #a1a1a14d;
    width: 306px;
    min-width: 100%;

    .chat-historico-content-data{
      font-size: 0.85em;
      margin-bottom: 6px;
      font-weight: 500;
      color: #424A57;
    }
    .chat-historico-content-item-active{
      border: 1.2px solid rgba(24, 74, 182, 0.814) !important;
      background-color: transparent !important;
    }
    .chat-historico-content-item:hover{
      background-color: transparent !important;
    }
    .chat-historico-content-item{
      min-width: 100%;
      width: 300px;
      background-color: white;
      border-radius: 6px;
      padding: 13px 10px 8px 10px;
      margin-bottom: 12px;
      /* box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px; */
      box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 6px;
      cursor: pointer;
      position: relative;
      border: 1px solid transparent;
  
      .chat-historico-content-item-header{
        display: flex;
  
        .chat-historico-content-item-header-foto{
          display: flex;
          align-items: center;
          img{
            width: 34px;
            height: 34px;
            border-radius: 100%;
          }
          .no-portrait{
            --no-portrait-tamanho: 34px;
          }
        }
        .chat-historico-content-item-header-info{
          display: flex;
          align-items: center;
          flex-wrap: wrap;
          /* margin-left: 8px; */
          width: 90%;
          
          .chat-historico-content-item-header-info-nome{
            font-size: 0.8em;
            font-weight: bold;
            color: #404652;
            font-weight: 600;
          }
          .chat-historico-content-item-header-info-atendimento{
            font-size: 0.75em;
            color: rgb(144, 143, 143);
          }
          p{
            margin: 0;
            width: 100%;
          }
        }
        .chat-historico-content-item-header-actions{
          width: 10%;
          display: flex;
          justify-content: center;
          align-items: center;
          position: relative;

          i{
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 100%;
          }
        }
      }
  
      .chat-historico-content-item-text{
        font-size: 0.85em;
        font-weight: 500;
        p{
          margin: 10px 0 0 0px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          height: 25px;
          color: #404652;
        }

        .chat-historico-content-item-text-edit{
          display: flex;
          margin-bottom: 4px;

          input{
            width: 90%;
            border-radius: 7px;
            border: 1px solid #0D53A5;
            padding-left: 5px;
            margin: 0;
          }
          button{
            width: 40px;
            height: 25px;
            border: 1px solid #EDEDF3;
            border-radius: 7px;
            background-color: #FFFFFF;
            margin-left: 7px;
            color: #0D53A5;
            font-weight: 500;
          }
        }
      }
  
      .chat-historico-content-item-divider{
        width: 100%;
        display: block;
        height: 1px;
        background-color: #a1a1a14d;
        margin: 10px 0px 10px 0px;
      }

      .chat-historico-content-item-actions{
        display: none;
        position: absolute;
        top: 44px;
        right: 10px;
        z-index: 20;
        width: 186px;
        flex-direction: column;
        background-color: #FFFFFF;
        border: 1px solid #E6ECF5;
        border-radius: 10px;
        box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
        padding: 6px;

        .chat-historico-content-item-actions-item{
          display: flex;
          align-items: center;
          gap: 9px;
          padding: 8px 10px;
          border-radius: 7px;
          font-size: 12.5px;
          color: #2B3648;
          cursor: pointer;
          transition: 0.15s ease-in-out;

          p{
            margin: 0;
          }
          i{
            width: 14px;
            font-size: 13px;
            text-align: center;
            color: #0F56C9;
          }
        }
        .chat-historico-content-item-actions-item:hover{
          background-color: #F2F5FA;
        }

        .chat-historico-content-item-actions-delete{
          color: #B42318;
          i{
            color: inherit;
          }
        }
        .chat-historico-content-item-actions-delete:hover{
          background-color: #FEF3F2;
        }
      }
      .chat-historico-content-item-actions-active{
        display: flex;
        animation: chat-actions-pop-in 0.12s ease-out;
      }
      .chat-historico-content-item-actions-up{
        top: auto;
        bottom: 44px;
      }
  
    }
  }
}

/* ------------------------- */
/* ALERT DELETE HISTORICO */
/* ------------------------- */
.chat-historico-content-alert {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-historico-content-alert-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 30px 20px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 400px;
  transform: scale(0.97);
  transition: transform var(--overlay-motion) var(--overlay-ease);


  .chat-historico-content-alert-container-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    background-color: rgba(0, 60, 255, 0.103);
    i{
      font-size: 4.5em;
      color: rgb(24, 74, 182);
    }
  }
  .chat-historico-content-alert-container-text{
    margin: 20px 0;
    width: 100%;
    text-align: center;
    font-weight: bold;
  }

  .chat-historico-content-alert-container-confirm{
    width: 100%;
    margin-bottom: 10px;
    background: rgb(24, 74, 182);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;

    .loader {
      margin: 0px auto;
      width: 20px;
      border: 4px solid rgb(255, 255, 255);
    }
  }
  .chat-historico-content-alert-container-cancel{
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    color: rgb(24, 74, 182);
    padding: 12px;
    overflow: hidden;
    transition: 0.4s ease-in-out;
  }
  .chat-historico-content-alert-container-cancel-hidden{
    height: 0px;
    padding: 0;
  }
}

.chat-historico-content-alert-on .chat-historico-content-alert-container {
  transform: scale(1);
}

/* ------------------------- */
/* ALERT EDIT E DELETE HISTORICO MOBILE */
/* ------------------------- */
.chat-historico-content-edit-mobile {
  display: flex;
  justify-content: center;
  align-items: end;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-historico-content-edit-mobile-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 10px 10px 0 0;
  padding: 20px;
  width: 100%;
  transform: translateY(12px);
  transition: transform var(--overlay-motion) var(--overlay-ease);

  button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: start;
    height: 40px;
    background-color: transparent;
    border: none;
    i{
      color: #0D53A5;
    }
    p {
      margin: 0 10px;
    }
  }
}
.chat-historico-content-edit-mobile-on .chat-historico-content-edit-mobile-container {
  transform: translateY(0);
}
.chat-historico-content-edit-mobile-divider{
  width: 100%;
  display: block;
  height: 1px;
  background-color: #8e8e8e28;
  margin: 3px 0;
}

/* ------------------------- */
/* FAVORITA CONTENT */
/* ------------------------- */
.chat-favorita-inactive{
  width: 0px !important;
  overflow: hidden;
  opacity: 0 !important;
  transition: width 0.1s ease-in-out, opacity 0.15s ease-in-out;
}

.chat-favorita{
  width: 375px;
  background-color: #FAFAFF;
  padding: 15px 15px 15px 15px;
  opacity: 1;
  transition: width 0.1s ease-in-out, opacity 0.2s ease-in-out;
  z-index: 4;
  border-left: 1px solid rgba(120, 120, 120, 0.082);

  .chat-favorita-search-header{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;

    .chat-favorita-search-header-bar{
      width: 100%;
      display: flex;
      justify-content: center;
      padding: 5px 0 15px 0;
      display: none;
      .chat-favorita-search-header-bar-content{
        display: block;
        width: 100px;
        height: 3px;
        border-radius: 10px;
        background-color: rgb(168, 168, 168);
      }
    }
    p{
      margin: 0;
      font-weight: 500;
      font-size: 18px;
    }
    i{
      margin-right: 20px;
    }

    /* Atalho para a tela cheia dos compartilhados */
    .chat-favorita-search-header-ver-mais{
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 0;
      border: none;
      background: none;
      color: #0D53A5;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: 0.15s ease-in-out;

      i{
        margin: 0;
        font-size: 11px;
      }
    }
    .chat-favorita-search-header-ver-mais:hover{
      color: #0A44A6;
    }
  }

  .chat-favorita-search{
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    margin-bottom: 10px;

    .chat-favorita-search-input{
      width: 100%;
      position: relative;
      margin: 0;

      input{
        width: 100%;
        height: 34px;
        background-color: #F2F5FA;
        border: none;
        border-radius: 8px;
        padding: 0 10px 0 32px;
        font-size: 12.5px;
        color: #1A2233;
        outline: 0;
      }
      input::placeholder {
        color: #8A94A6;
      }
      input:focus{
        box-shadow: inset 0 0 0 1px #0D53A5;
      }
      i{
        position: absolute;
        left: 10px;
        top: 0;
        height: 100%;
        display: flex;
        align-items: center;
        font-size: 13px;
        pointer-events: none;
        color: #8A94A6;
      }
    }
  }

  .chat-favorita-tabs{
    width: 100%;
    display: flex;
    gap: 6px;
    padding: 3px;
    margin-bottom: 10px;
    background-color: #EDEDF3;
    border-radius: 9px;

    .chat-favorita-tabs-item{
      flex: 1;
      text-align: center;
      padding: 6px 0;
      border-radius: 7px;
      font-size: 0.85em;
      font-weight: 600;
      color: #78808D;
      cursor: pointer;
      user-select: none;
      transition: 0.15s ease-in-out;
    }
    .chat-favorita-tabs-item-active{
      background-color: #FFFFFF;
      color: #0D53A5;
      box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    }
  }

  .chat-favorita-content{
    overflow-y: scroll;
    padding: 10px 3px 160px 3px;
    height: 100%;
    border-top: 1px solid #a1a1a14d;
    width: 306px;
    min-width: 100%;
  }
}

/* ------------------------------------------------- */
/* GRUPOS DA ABA COMPARTILHADOS (Por mim / Por outros)*/
/* ------------------------------------------------- */
.chat-favorita-grupo{

  .chat-favorita-grupo-header{
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 2px 8px 2px;
    cursor: pointer;
    user-select: none;

    .chat-favorita-grupo-header-rotulo{
      font-size: 0.7em;
      font-weight: 700;
      color: #78808D;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      white-space: nowrap;
    }
    .chat-favorita-grupo-header-total{
      font-size: 0.7em;
      font-weight: 700;
      color: #B6C0D0;
    }
    .chat-favorita-grupo-header-linha{
      flex: 1;
      height: 1px;
      background-color: #EEF2F7;
    }
    .chat-favorita-grupo-header-chevron{
      font-size: 0.7em;
      color: #78808D;
      transition: transform 0.15s ease-in-out;
    }
  }
}

.chat-favorita-grupo-recolhido{

  .chat-favorita-grupo-content{
    display: none;
  }
  .chat-favorita-grupo-header-chevron{
    transform: rotate(-90deg);
  }
}

/* ------------------------------------------------- */
/* CARDS DE FAVORITO (aba lateral e tela cheia)      */
/* ------------------------------------------------- */
.chat-favorita-content,
.chat-favorita-full-content{

    .chat-favorita-content-item-com-titulo .chat-favorita-content-item-header p{
      font-weight: 500;
      color: #667085;
    }
    .chat-favorita-content-item:hover{
      background-color: transparent !important;
    }
    .chat-favorita-content-item{
      min-width: 100%;
      width: 300px;
      background-color: white;
      border-radius: 6px;
      padding: 13px 10px 0px 10px;
      margin-bottom: 12px;
      box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 6px;
      cursor: pointer;
      position: relative;
      border: 1px solid transparent;


      .chat-favorita-content-item-header{
        font-size: 0.8em;
        font-weight: bold;

        .chat-favorita-content-item-header-titulo{
          display: block;
          margin-bottom: 4px;
          font-size: 1.05em;
          font-weight: bold;
          line-height: 1.35;
          color: #16213A;
        }

        p {
          width: 95%;
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          color: #404652;
          line-height: 1.2em;
          overflow: hidden;
          min-height: 28px;
          max-height: 28px;
          transition: 0.5s ease-in-out;
        }

        .chat-favorita-content-item-header-full-text {
          display: block;
          -webkit-line-clamp: unset;
          -webkit-box-orient: unset;
          text-overflow: unset;
          white-space: normal;
          max-height: 500px;
        }
      }

      .chat-favorita-content-item-credito{
        display: flex;
        align-items: center;
        gap: 7px;
        margin: 9px 0 8px 0;

        .chat-favorita-content-item-credito-avatar{
          flex: none;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 20px;
          height: 20px;
          border-radius: 50%;
          background-color: #EEF3FD;
          color: #0F56C9;
          font-size: 10px;
        }
        .chat-favorita-content-item-credito-nome{
          font-size: 11.5px;
          color: #8A94A6;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        .chat-favorita-content-item-credito-tag{
          flex: none;
          display: flex;
          align-items: center;
          gap: 4px;
          padding: 2px 7px;
          border-radius: 5px;
          background-color: #F0F4FA;
          color: #4A5670;
          font-size: 10px;
          font-weight: 700;
          text-transform: uppercase;
          white-space: nowrap;

          i{
            font-size: 9px;
          }
        }
      }

      .chat-favorita-content-item-divider{
        width: 100%;
        display: block;
        height: 1px;
        background-color: #a1a1a14d;
        margin: 0;
      }


      .chat-favorita-content-item-footer{
        display: flex;
        /* justify-content: space-between; */
        align-items: center;
        gap: 4px;
        width: 100%;
        height: fit-content;
        min-height: 40px;
        padding-right: 10px;
        
        i{
          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 0.8em;
          width: 28px;
          height: 25px;
          transition: 0.15s ease-in-out;
        }
        .fa-ellipsis{
          font-size: 1em !important;
        }

        .chat-favorita-content-item-footer-compartilhado {
          display: inline-flex;
          align-items: center;
          gap: 6px;
          height: 28px;
          padding: 0 10px;
          border-radius: 7px;
          background-color: #EEF3FD;
          color: #0F56C9;
          font-size: 11.5px;
          font-weight: 600;
          white-space: nowrap;
          cursor: pointer;
          transition: 0.15s ease-in-out;

          i{
            width: auto;
            height: auto;
            font-size: 12px;
            color: inherit;
          }
        }
        .chat-favorita-content-item-footer-compartilhado:hover{
          background-color: #FEF3F2;
          color: #B42318;
        }


        .chat-favorita-content-item-footer-adicionar{
          display: inline-flex;
          align-items: center;
          gap: 6px;
          height: 28px;
          padding: 0 11px;
          border-radius: 7px;
          background-color: #0D53A5;
          color: #FFFFFF;
          font-size: 11.5px;
          font-weight: 600;
          white-space: nowrap;
          cursor: pointer;
          transition: 0.15s ease-in-out;

          i{
            width: auto;
            height: auto;
            font-size: 11px;
            color: inherit;
          }
        }
        .chat-favorita-content-item-footer-adicionar:hover{
          background-color: #0A44A6;
        }
        .chat-favorita-content-item-footer-adicionar.disabled{
          opacity: 0.6;
        }

        .chat-favorita-content-item-footer-adotada{
          display: inline-flex;
          align-items: center;
          gap: 6px;
          height: 28px;
          padding: 0 10px;
          border-radius: 7px;
          background-color: #E9F7EF;
          color: #0A7A43;
          font-size: 11.5px;
          font-weight: 600;
          white-space: nowrap;
          cursor: pointer;
          transition: 0.15s ease-in-out;

          i{
            width: auto;
            height: auto;
            font-size: 11px;
            color: inherit;
          }
        }
        .chat-favorita-content-item-footer-adotada:hover{
          background-color: #FEF3F2;
          color: #B42318;
        }
        .chat-favorita-content-item-footer-adotada.disabled{
          opacity: 0.6;
        }

        .fa-chevron-right{
          margin-left: auto;
        }

        .chat-favorita-content-item-footer-open {
          transform: rotate(90deg);
        }
      }

      .chat-favorita-content-item-actions{
        display: none;
        position: absolute;
        bottom: 44px;
        left: 10px;
        z-index: 20;
        width: 186px;
        flex-direction: column;
        background-color: #FFFFFF;
        border: 1px solid #E6ECF5;
        border-radius: 10px;
        box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
        padding: 6px;

        .chat-favorita-content-item-actions-item{
          display: flex;
          align-items: center;
          gap: 9px;
          padding: 8px 10px;
          border-radius: 7px;
          font-size: 12.5px;
          color: #2B3648;
          cursor: pointer;
          transition: 0.15s ease-in-out;

          p{
            margin: 0;
          }
          i{
            width: 14px;
            font-size: 13px;
            text-align: center;
            color: #0F56C9;
          }
        }
        .chat-favorita-content-item-actions-item:hover{
          background-color: #F2F5FA;
        }

        .chat-favorita-content-item-actions-delete{
          color: #B42318;
          i{
            color: inherit;
          }
        }
        .chat-favorita-content-item-actions-delete:hover{
          background-color: #FEF3F2;
        }
      }
      .chat-favorita-content-item-actions-active{
        display: flex;
        animation: chat-actions-pop-in 0.12s ease-out;
      }
      .chat-favorita-content-item-actions-down{
        top: 100%;
        bottom: auto;
      }
    }
}

/* Rodape da aba Compartilhados: leva ao restante da lista na tela de gerenciar favoritos */
.chat-favorita-content-ver-mais{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 12px 0;
  padding: 9px 10px;
  border: 1px dashed #D6DEEA;
  border-radius: 6px;
  background-color: transparent;
  color: #0D53A5;
  font-size: 0.75em;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease-in-out;

  i{
    font-size: 0.9em;
  }
}
.chat-favorita-content-ver-mais:hover{
  border-color: #0D53A5;
  background-color: #F2F6FC;
  color: #0A44A6;
}

/* Espera da lista: ocupa o lugar do conteudo enquanto nenhum card foi carregado ainda */
.chat-favorita-content-loading{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: rgb(148, 148, 148);
  i{
    font-size: 0.9em;
  }
  p{
    margin: 0;
    font-size: 0.9em;
    font-weight: bold;
  }
}

/* ------------------------------------------------- */
/* AVATAR SEM FOTO (views/site/_no-portrait.php)     */
/* ------------------------------------------------- */
/* Mesmo desenho do .estado-vazio-icone (degrade radial, traco no azul de destaque e anel
   suave), no tamanho das fotos. O anel externo e fino para nao invadir o layout das listas. */
.no-portrait{
  --no-portrait-tamanho: 40px;
  flex: none;
  box-sizing: border-box;
  width: var(--no-portrait-tamanho);
  height: var(--no-portrait-tamanho);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--vector-accent);
  background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #EEF3FD 72%);
  box-shadow: 0 0 0 3px rgba(13, 83, 165, 0.05), inset 0 0 0 1px rgba(13, 83, 165, 0.14);

  > svg{
    width: 50%;
    height: 50%;
  }
}

/* ------------------------------------------------- */
/* ESTADO VAZIO (views/site/_estado-vazio.php)       */
/* ------------------------------------------------- */
/* Um unico componente para toda lista ou busca sem resultado: icone do contexto (com selo de
   busca quando ha termo), titulo que diz o que aconteceu, descricao com o termo em destaque,
   dicas de ajuste e acoes de saida. A entrada escalonada guia o olhar do icone ate a acao. */
.estado-vazio{
  --estado-vazio-icone: 64px;
  box-sizing: border-box;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  > *{
    box-sizing: border-box;
    animation: estado-vazio-entrada 0.28s var(--overlay-ease) both;
  }
  > :nth-child(2){ animation-delay: 0.04s; }
  > :nth-child(3){ animation-delay: 0.08s; }
  > :nth-child(4){ animation-delay: 0.12s; }
  > :nth-child(5){ animation-delay: 0.16s; }

  .estado-vazio-icone{
    position: relative;
    flex: none;
    width: var(--estado-vazio-icone);
    height: var(--estado-vazio-icone);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--vector-accent);
    background: radial-gradient(circle at 32% 28%, #FFFFFF 0%, #EEF3FD 72%);
    /* Anel externo suave: da profundidade sem competir com o conteudo da tela */
    box-shadow: 0 0 0 8px rgba(13, 83, 165, 0.05), inset 0 0 0 1px rgba(13, 83, 165, 0.14);

    > svg{
      width: 46%;
      height: 46%;
    }
  }

  .estado-vazio-icone-selo{
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #FFFFFF;
    color: var(--vector-text-subtle);
    box-shadow: 0 1px 3px rgba(22, 33, 58, 0.18);

    svg{
      width: 13px;
      height: 13px;
    }
  }

  .estado-vazio-titulo{
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--vector-text-strong);
    letter-spacing: -0.01em;
  }

  .estado-vazio-descricao{
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--vector-text-subtle);
    text-wrap: pretty;
  }

  /* Termo digitado entre aspas e em destaque: o usuario confere na hora se errou a digitacao */
  .estado-vazio-termo{
    padding: 0;
    background: none;
    color: var(--vector-text-strong);
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .estado-vazio-termo::before{ content: "\201C"; }
  .estado-vazio-termo::after{ content: "\201D"; }

  .estado-vazio-dicas{
    width: 100%;
    margin: 16px 0 0;
    padding: 10px 14px;
    list-style: none;
    text-align: left;
    border-radius: 10px;
    background-color: #F6F8FB;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--vector-text-secondary);

    li{
      position: relative;
      padding-left: 16px;
    }
    li + li{
      margin-top: 4px;
    }
    li::before{
      content: "";
      position: absolute;
      left: 3px;
      top: 0.6em;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background-color: var(--vector-accent);
      opacity: 0.55;
    }
  }

  .estado-vazio-acoes{
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .estado-vazio-acao{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid #D6DEEA;
    border-radius: 999px;
    background-color: #FFFFFF;
    color: var(--vector-text-secondary);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;

    i{
      font-size: 11px;
    }
  }
  .estado-vazio-acao:hover{
    background-color: #F0F4FA;
    border-color: #C3CFE0;
    color: var(--vector-text-strong);
  }
  .estado-vazio-acao:active{
    transform: scale(0.97);
  }
  .estado-vazio-acao:focus-visible{
    outline: 2px solid var(--vector-accent);
    outline-offset: 2px;
  }

  .estado-vazio-acao-primaria{
    border-color: var(--vector-accent);
    background-color: var(--vector-accent);
    color: #FFFFFF;
  }
  .estado-vazio-acao-primaria:hover{
    border-color: #0A44A6;
    background-color: #0A44A6;
    color: #FFFFFF;
  }
}

/* Paineis laterais (historico e favoritos): mesma hierarquia em escala menor */
.estado-vazio.estado-vazio-compacto{
  --estado-vazio-icone: 52px;
  padding: 28px 12px 16px;

  .estado-vazio-icone{
    margin-bottom: 14px;
    box-shadow: 0 0 0 6px rgba(13, 83, 165, 0.05), inset 0 0 0 1px rgba(13, 83, 165, 0.14);
  }
  .estado-vazio-titulo{
    font-size: 14px;
  }
  .estado-vazio-descricao{
    font-size: 12.5px;
  }
  .estado-vazio-acoes{
    margin-top: 14px;
  }
  .estado-vazio-acao{
    min-height: 32px;
    padding: 0 14px;
    font-size: 12px;
  }
}

@keyframes estado-vazio-entrada{
  from{
    opacity: 0;
    transform: translateY(6px);
  }
  to{
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------- */
/* TELA CHEIA DOS COMPARTILHADOS (VER MAIS)          */
/* ------------------------------------------------- */
.chat-favorita-full{
  /* Medida da barra: em telas largas as linhas de filtro param aqui em vez de esticarem
     ate a borda, mantendo botoes e contadores a um passo do campo que comandam */
  --favoritas-full-medida: clamp(560px, 68vw, 1080px);
  /* Eixo dos campos de texto (busca e autor): mesma largura em todas as linhas */
  --favoritas-full-campo: 520px;

  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  background-color: #F4F7FC;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;

  .chat-favorita-full-header{
    flex: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px clamp(14px, 3vw, 26px);
    background-color: #FFFFFF;
    border-bottom: 1px solid #E3E8EF;

    p{
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      color: #16213A;
    }

    .chat-favorita-full-header-voltar{
      flex: none;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      height: 34px;
      padding: 0 12px;
      border: 1px solid #DBE2EC;
      border-radius: 8px;
      background-color: #FFFFFF;
      color: #4A5670;
      font-size: 12.5px;
      font-weight: 600;
      white-space: nowrap;
      cursor: pointer;
      transition: 0.15s ease-in-out;

      i{
        font-size: 11px;
      }
    }
    .chat-favorita-full-header-voltar:hover{
      background-color: #F4F7FC;
    }

    /* Atalho para o bottom sheet: existe apenas no mobile */
    .chat-favorita-full-header-filtros{
      display: none;
    }
  }

  /* BARRA DE FILTROS: uma linha por filtro, com o rotulo fixo a esquerda */
  .chat-favorita-full-search{
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 14px clamp(14px, 3vw, 26px);
    background-color: #FFFFFF;
    border-bottom: 1px solid #E3E8EF;

    /* No desktop os wrappers do bottom sheet nao geram caixa: as linhas de filtro
       continuam sendo itens diretos da barra. No mobile eles viram o sheet. */
    .chat-favorita-full-filtros,
    .chat-favorita-full-filtros-painel,
    .chat-favorita-full-filtros-corpo{
      display: contents;
    }
    /* Faixa do total e cabecalho/rodape do sheet so existem no mobile */
    .chat-favorita-full-topo,
    .chat-favorita-full-filtros-sheet-header,
    .chat-favorita-full-filtros-sheet-footer{
      display: none;
    }

    .chat-favorita-full-filtros-linha{
      display: flex;
      align-items: center;
      gap: 8px;
      /* min(): abaixo da medida a linha e fluida; acima dela para de crescer */
      width: min(100%, var(--favoritas-full-medida));
      min-width: 0;
    }

    .chat-favorita-full-filtros-label{
      width: 96px;
      flex: none;
      font-size: 10.5px;
      font-weight: 700;
      color: #8A94A6;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .chat-favorita-full-search-input{
      position: relative;
      flex: 1;
      min-width: 0;
      max-width: var(--favoritas-full-campo);

      input{
        width: 100%;
        height: 36px;
        padding: 0 12px 0 34px;
        border: 1px solid #DBE6F8;
        border-radius: 9px;
        background-color: #F8FBFF;
        font-size: 0.9em;
      }
      input::placeholder{
        color: #78808D;
        font-weight: 500;
      }
      i{
        position: absolute;
        left: 12px;
        top: 0;
        height: 100%;
        display: flex;
        align-items: center;
        font-size: 0.85em;
        pointer-events: none;
        color: #0D53A5;
      }
    }

    /* Legenda do campo de busca: fica colada nele, nao no fim da barra */
    .chat-favorita-full-search-total{
      flex: none;
      margin-left: 4px;
      font-size: 11.5px;
      font-weight: 600;
      color: #8A94A6;
      white-space: nowrap;
    }

    /* CHIPS DE LISTA E VINCULO: o checkbox nativo fica escondido e o span e a pill.
       O frontend_vector nao inicializa o iCheck do Inspinia, entao o input nativo nao e
       reescrito e o :checked continua valendo para o CSS. */
    .chat-favorita-full-filtros-opcoes{
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
    }

    .chat-favorita-full-filtros-chip{
      /* relative para o input escondido nao se posicionar contra a tela cheia inteira */
      position: relative;
      display: inline-flex;
      margin: 0;
      font-weight: 400;
      cursor: pointer;

      input[type="checkbox"]{
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
      }
      span{
        display: inline-block;
        padding: 6px 11px;
        border: 1px solid #E3E8EF;
        border-radius: 999px;
        background-color: #FFFFFF;
        color: #667085;
        font-size: 11.5px;
        font-weight: 600;
        white-space: nowrap;
        transition: 0.15s ease-in-out;
      }
      span:hover{
        border-color: #CFDFFA;
        background-color: #F8FBFF;
      }
      input[type="checkbox"]:checked + span{
        border-color: #CFDFFA;
        background-color: #EEF3FD;
        color: #0F56C9;
      }
      input[type="checkbox"]:focus-visible + span{
        outline: 2px solid #0F56C9;
        outline-offset: 1px;
      }
    }

    /* AUTOR: busca livre por texto, com X para limpar */
    .chat-favorita-full-filtros-autor{
      display: flex;
      align-items: center;
      gap: 7px;
      height: 32px;
      /* Mesmo eixo do campo de busca: os botoes ao lado seguem a coluna dos campos */
      flex: 1 1 240px;
      min-width: 240px;
      max-width: var(--favoritas-full-campo);
      padding: 0 10px;
      border: 1px solid #E3E8EF;
      border-radius: 8px;
      background-color: #FFFFFF;

      input{
        flex: 1;
        min-width: 0;
        border: 0;
        outline: 0;
        background-color: transparent;
        font-size: 12px;
        color: #2B3648;
      }
      input::placeholder{
        color: #98A2B3;
        font-weight: 500;
      }
      i{
        flex: none;
        font-size: 12px;
        color: #8A94A6;
      }
      .chat-favorita-full-filtros-autor-limpar{
        cursor: pointer;
      }
      .chat-favorita-full-filtros-autor-limpar:hover{
        color: #B42318;
      }
    }
    .chat-favorita-full-filtros-autor:focus-within{
      border-color: #0D53A5;
    }

    /* Limpar e Buscar acompanham o campo de autor em vez de irem para a borda da tela */
    .chat-favorita-full-filtros-limpar{
      flex: none;
      margin-left: 6px;
      padding: 0 4px;
      border: 0;
      background-color: transparent;
      font-size: 11.5px;
      font-weight: 700;
      color: #0F56C9;
      white-space: nowrap;
      cursor: pointer;
    }
    .chat-favorita-full-filtros-limpar:hover{
      color: #0A3D94;
    }

    /* BUSCAR: nada e filtrado sem passar por ele */
    .chat-favorita-full-filtros-buscar{
      flex: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      height: 32px;
      padding: 0 18px;
      border: 0;
      border-radius: 8px;
      background-color: #0D53A5;
      color: #FFFFFF;
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
      cursor: pointer;
      transition: 0.15s ease-in-out;

      i{
        font-size: 11px;
      }
    }
    .chat-favorita-full-filtros-buscar:hover{
      background-color: #0A44A6;
    }
  }

  .chat-favorita-full-content{
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px clamp(14px, 3vw, 26px);

    /* Quem distribui os cards em colunas e o grupo: a lista pode ter mais de um */
    .chat-favorita-grupo{
      flex: none;
    }
    .chat-favorita-grupo-content{
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
      align-content: start;
      gap: 12px;
    }

    /* O card acompanha a coluna do grid: sem largura fixa nem a margem da lista lateral */
    .chat-favorita-content-item{
      display: flex;
      flex-direction: column;
      width: auto;
      min-width: 0;
      margin-bottom: 0;
    }
    /* Divider e footer descem para o pe do card, alinhando os cards da mesma linha */
    .chat-favorita-content-item-divider{
      margin-top: auto;
    }
  }
}

.chat-favorita-full-on{
  z-index: var(--overlay-page-z);
  opacity: 1;
  pointer-events: auto;
}

/* ------------------------- */
/* MODAL DE EXCLUIR FAVORITA */
/* ------------------------- */
.chat-favorita-delete {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-favorita-delete-container {
  margin: 30px 20px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 520px;
  max-width: 100%;
  transform: scale(0.97);
  transition: transform var(--overlay-motion) var(--overlay-ease);

  .chat-favorita-delete-container-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;

    p{
      margin: 0;
      font-weight: 500;
      font-size: 18px;
    }
    i{
      color: #78808D;
      cursor: pointer;
    }
  }

  .chat-favorita-delete-container-content{
    .chat-favorita-delete-container-content-card{
      border: 1px solid #E6ECF5;
      background-color: #F8FAFD;
      border-radius: 8px;
      padding: 12px;

      p{
        margin: 0;
        font-size: 0.85em;
        font-weight: 600;
        color: #16213A;
      }
      span{
        display: block;
        margin-top: 4px;
        max-height: 120px;
        overflow-y: auto;
        font-size: 0.8em;
        line-height: 1.5;
        color: #667085;
      }
    }

    .chat-favorita-delete-container-content-aviso{
      display: flex;
      align-items: flex-start;
      gap: 11px;
      margin-top: 15px;
      border: 1px solid #F6D7D3;
      background-color: #FEF6F5;
      border-radius: 8px;
      padding: 12px;

      i{
        color: #B42318;
        font-size: 1em;
        line-height: 1.4;
      }
      p{
        margin: 0;
        font-size: 0.85em;
        line-height: 1.55;
        color: #5C2B26;
      }
    }
  }

  .chat-favorita-delete-container-footer{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;

    button{
      border-radius: 8px;
      padding: 10px 16px;
      font-size: 0.9em;
      font-weight: 500;
    }
    .chat-favorita-delete-container-footer-cancel{
      border: 1px solid #EDEDF3;
      background-color: transparent;
      color: #4A5670;
    }
    .chat-favorita-delete-container-footer-confirm{
      border: none;
      background-color: #B42318;
      color: #FFFFFF;
    }
    .chat-favorita-delete-container-footer-confirm.disabled{
      opacity: 0.6;
    }
  }
}

.chat-favorita-delete-on .chat-favorita-delete-container {
  transform: scale(1);
}

/* ------------------------- */
/* MODAL DE EDITAR FAVORITA */
/* ------------------------- */
.chat-favorita-edit {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-favorita-edit-container {
  margin: 30px 20px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 520px;
  max-width: 100%;
  transform: scale(0.97);
  transition: transform var(--overlay-motion) var(--overlay-ease);

  .chat-favorita-edit-container-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;

    p{
      margin: 0;
      font-weight: 500;
      font-size: 18px;
    }
    i{
      color: #78808D;
      cursor: pointer;
    }
  }

  .chat-favorita-edit-container-content{
    .chat-favorita-edit-container-content-group + .chat-favorita-edit-container-content-group{
      margin-top: 15px;
    }
    label{
      display: block;
      margin-bottom: 6px;
      font-size: 0.8em;
      font-weight: 600;
      color: #4A5670;
    }
    input[type="text"],
    textarea{
      width: 100%;
      border: 1px solid #EDEDF3;
      border-radius: 8px;
      padding: 10px;
      font-size: 0.9em;
    }
    textarea{
      resize: vertical;
    }
    input[type="text"]::placeholder{
      color: #98A2B3;
      font-weight: 500;
    }
    input[type="text"]:focus,
    textarea:focus{
      outline: none;
      border-color: #0D53A5;
    }
    .chat-favorita-edit-input-error{
      border-color: #D92D20;
    }
    .chat-favorita-edit-container-content-error{
      display: block;
      margin-top: 5px;
      font-size: 0.8em;
      color: #D92D20;
    }

    .chat-favorita-edit-container-content-aviso{
      display: flex;
      align-items: flex-start;
      gap: 11px;
      margin-bottom: 15px;
      border: 1px solid #FBE3B8;
      background-color: #FFFAF0;
      border-radius: 8px;
      padding: 12px;

      i{
        color: #B54708;
        font-size: 1em;
        line-height: 1.4;
      }
      p{
        margin: 0;
        font-size: 0.85em;
        line-height: 1.55;
        color: #6B4318;
      }
    }

    .chat-favorita-edit-container-content-aviso-copia{
      border-color: #DBE6F8;
      background-color: #F6F9FF;

      i{
        color: #0F56C9;
      }
      p{
        color: #31405C;
      }
    }

    .chat-favorita-edit-container-content-share{
      display: flex;
      align-items: center;
      gap: 12px;
      margin-top: 15px;
      padding: 12px;
      border: 1px solid #EDEDF3;
      border-radius: 8px;
      cursor: pointer;

      .chat-favorita-edit-container-content-share-toggle{
        width: 38px;
        height: 22px;
        flex: none;
        display: flex;
        align-items: center;
        padding: 2px;
        border-radius: 11px;
        background-color: #CFD8E6;
        transition: background-color 0.15s ease-in-out;

        span{
          display: block;
          width: 18px;
          height: 18px;
          border-radius: 100%;
          background-color: #FFFFFF;
          box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25);
          margin-left: 0;
          transition: margin-left 0.15s ease-in-out;
        }
      }
      .chat-favorita-edit-container-content-share-text{
        p{
          margin: 0;
          font-size: 0.85em;
          font-weight: 600;
          color: #16213A;
        }
        span{
          font-size: 0.8em;
          color: #78808D;
        }
      }
    }
    .chat-favorita-edit-share-on .chat-favorita-edit-container-content-share-toggle{
      background-color: #0D53A5;
    }
    .chat-favorita-edit-share-on .chat-favorita-edit-container-content-share-toggle span{
      margin-left: 16px;
    }
  }

  .chat-favorita-edit-container-footer{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;

    button{
      border-radius: 8px;
      padding: 10px 16px;
      font-size: 0.9em;
      font-weight: 500;
    }
    .chat-favorita-edit-container-footer-cancel{
      border: 1px solid #EDEDF3;
      background-color: transparent;
      color: #4A5670;
    }
    .chat-favorita-edit-container-footer-confirm{
      border: none;
      background-color: #0D53A5;
      color: #FFFFFF;
    }
    .chat-favorita-edit-container-footer-confirm.disabled{
      opacity: 0.6;
    }
  }
}

.chat-favorita-edit-on .chat-favorita-edit-container {
  transform: scale(1);
}

/* ------------------------- */
/* MODAL DE COMPARTILHAMENTO DA FAVORITA */
/* ------------------------- */
.chat-favorita-share {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-favorita-share-container {
  margin: 30px 20px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 520px;
  max-width: 100%;
  transform: scale(0.97);
  transition: transform var(--overlay-motion) var(--overlay-ease);

  .chat-favorita-share-container-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;

    p{
      margin: 0;
      font-weight: 500;
      font-size: 18px;
    }
    i{
      color: #78808D;
      cursor: pointer;
    }
  }

  .chat-favorita-share-container-content{
    .chat-favorita-share-container-content-card{
      border: 1px solid #E6ECF5;
      background-color: #F8FAFD;
      border-radius: 8px;
      padding: 12px;

      p{
        margin: 0;
        font-size: 0.85em;
        font-weight: 600;
        color: #16213A;
      }
      span{
        display: block;
        margin-top: 4px;
        max-height: 120px;
        overflow-y: auto;
        font-size: 0.8em;
        line-height: 1.5;
        color: #667085;
      }
    }

    .chat-favorita-share-container-content-aviso{
      display: flex;
      align-items: flex-start;
      gap: 11px;
      margin-top: 15px;
      border: 1px solid #DBE6F8;
      background-color: #F6F9FF;
      border-radius: 8px;
      padding: 12px;

      i{
        color: #0D53A5;
        font-size: 1em;
        line-height: 1.4;
      }
      p{
        margin: 0;
        font-size: 0.85em;
        line-height: 1.55;
        color: #31405C;
      }
    }
    .chat-favorita-share-container-content-aviso-remover{
      border-color: #F6D7D3;
      background-color: #FEF6F5;

      i{
        color: #B42318;
      }
      p{
        color: #5C2B26;
      }
    }
  }

  .chat-favorita-share-container-footer{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;

    button{
      border-radius: 8px;
      padding: 10px 16px;
      font-size: 0.9em;
      font-weight: 500;
    }
    .chat-favorita-share-container-footer-cancel{
      border: 1px solid #EDEDF3;
      background-color: transparent;
      color: #4A5670;
    }
    .chat-favorita-share-container-footer-confirm{
      border: none;
      background-color: #0D53A5;
      color: #FFFFFF;
    }
    .chat-favorita-share-container-footer-confirm.disabled{
      opacity: 0.6;
    }
  }
}

.chat-favorita-share-remover .chat-favorita-share-container-footer .chat-favorita-share-container-footer-confirm {
  background-color: #B42318;
}

.chat-favorita-share-on .chat-favorita-share-container {
  transform: scale(1);
}

/* ------------------------- */
/* MODAL DE VISUALIZAR PERGUNTA COMPARTILHADA */
/* ------------------------- */
.chat-favorita-view {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-favorita-view-container {
  margin: 30px 20px;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 520px;
  max-width: 100%;
  transform: scale(0.97);
  transition: transform var(--overlay-motion) var(--overlay-ease);

  .chat-favorita-view-container-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;

    p{
      margin: 0;
      font-weight: 500;
      font-size: 18px;
    }
    i{
      color: #78808D;
      cursor: pointer;
    }
  }

  .chat-favorita-view-container-content{
    .chat-favorita-view-container-content-credito{
      display: flex;
      align-items: center;
      gap: 9px;
      margin-bottom: 14px;

      .chat-favorita-view-container-content-credito-avatar{
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        background-color: #EEF3FD;
        color: #0D53A5;
        font-size: 11px;
      }
      p{
        margin: 0;
        font-size: 0.85em;
        color: #667085;
      }
    }

    .chat-favorita-view-container-content-texto{
      border: 1px solid #E6ECF5;
      background-color: #F8FAFD;
      border-radius: 8px;
      padding: 14px;
      max-height: 320px;
      overflow-y: auto;
      font-size: 0.85em;
      line-height: 1.6;
      color: #2B3648;
      white-space: pre-wrap;
    }

    .chat-favorita-view-container-content-aviso{
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 14px;

      i{
        color: #0A7A43;
        font-size: 0.9em;
      }
      p{
        margin: 0;
        font-size: 0.85em;
        color: #0A7A43;
      }
    }
  }

  .chat-favorita-view-container-footer{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;

    button{
      border-radius: 8px;
      padding: 10px 16px;
      font-size: 0.9em;
      font-weight: 500;
    }
    .chat-favorita-view-container-footer-cancel{
      border: 1px solid #EDEDF3;
      background-color: transparent;
      color: #4A5670;
    }
    .chat-favorita-view-container-footer-copiar{
      border: 1px solid #0D53A5;
      background-color: transparent;
      color: #0D53A5;
    }
    .chat-favorita-view-container-footer-copiar:hover{
      background-color: #F2F7FF;
    }
    .chat-favorita-view-container-footer-original{
      border: none;
      background-color: #0D53A5;
      color: #FFFFFF;
    }
    .chat-favorita-view-container-footer-original:hover{
      background-color: #0A44A6;
    }
    .chat-favorita-view-container-footer-copiar.disabled,
    .chat-favorita-view-container-footer-original.disabled{
      opacity: 0.6;
    }
  }
}

.chat-favorita-view-on .chat-favorita-view-container {
  transform: scale(1);
}

/* ------------------------- */
/* ALERT EDIT E DELETE FAVORITA MOBILE */
/* ------------------------- */
.chat-favorita-content-edit-mobile {
  display: flex;
  justify-content: center;
  align-items: end;
  background-color: rgba(0, 0, 0, 0.491);
}

.chat-favorita-content-edit-mobile-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 10px 10px 0 0;
  padding: 20px;
  width: 100%;
  transform: translateY(12px);
  transition: transform var(--overlay-motion) var(--overlay-ease);

  button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: start;
    height: 40px;
    background-color: transparent;
    border: none;
    i{
      color: #0D53A5;
    }
    p {
      margin: 0 10px;
    }
  }
}
.chat-favorita-content-edit-mobile-on .chat-favorita-content-edit-mobile-container {
  transform: translateY(0);
}
.chat-favorita-content-edit-mobile-divider{
  width: 100%;
  display: block;
  height: 1px;
  background-color: #8e8e8e28;
  margin: 3px 0;
}

/* ------------------------- */
/* FILTER CHAT */
/* ------------------------- */
/* .chat-filter-hidden nao usa display:none para o fade poder acontecer —
   o estado oculto vem da camada comum de overlay (topo do arquivo) */

.chat-filter{
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.491);

  .chat-filter-container{
    background-color: #FFFFFF;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 20px 0px 20px;
    width: 500px;
    max-width: 80%;
    height: 1025px;
    max-height: 90%;
    border-radius: 16px;
    overflow: hidden;
    transform: scale(0.97);
    transition: transform var(--overlay-motion) var(--overlay-ease);

    .chat-filter-container-header{
      width: 100%;
      height: 5%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 5px;
      p{
        margin: 0;
      }
      i{
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 100%;
        cursor: pointer;
        font-size: 1.3em;
        padding-top: 3px;
      }
      i:hover{
        background-color: rgba(233, 233, 233, 0.742);
      }
    }
    .chat-filter-container-content{
      height: 94%;
      width: 100%;
      overflow: scroll;
    }
  }


}

.chat-filter:not(.chat-filter-hidden) .chat-filter-container{
  transform: scale(1);
}


/* ------------------------- */
/* PAGE CONTENT */
/* ------------------------- */
#index-container{
  width: 100%;
  height: 100%;
  padding-top: var(--navbar-height);
}

#index-content{
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  overflow: hidden;
}

.index-content-page {
  width: 100%;
  position: relative;
  overflow: scroll;
}

#index-content-search{
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  position: absolute;
}

#index-content-chat{
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  position: absolute;
  padding: 0 10px 0 10px;
}

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

  .chat-historico-inactive{
    opacity: 1 !important;
    left: -100% !important;
  }
  .chat-historico{
    position: absolute;
    height: 100%;
    top: 0px;
    left: 0;
    transition: 0.2s ease-in-out;
    width: 338px;
    max-width: 338px;
    border-right: none;
  }

  .chat-favorita-inactive{
    opacity: 1 !important;
    right: -100% !important;
  }
  .chat-favorita{
    position: absolute;
    height: 100%;
    top: 0px;
    right: 0;
    transition: 0.2s ease-in-out;
    border-right: none;
    width: 338px;
    max-width: 338px;

  }
}

@media(max-width:852.98px) {
  /* ------------------------------------------------------------------ */
  /* GERENCIAR FAVORITOS NO MOBILE                                       */
  /* Cabecalho compacto, busca fixa no topo e filtros em bottom sheet.   */
  /* A barra de filtros inteira nao cabe na tela: ela sai do fluxo e     */
  /* passa a ser aberta sob demanda, deixando a lista com a altura toda. */
  /* ------------------------------------------------------------------ */
  .chat-favorita-full{
    /* dvh acompanha a barra de endereco do navegador; bottom auto evita o over-constrained */
    height: 100dvh;
    bottom: auto;

    .chat-favorita-full-header{
      gap: 10px;
      padding: 11px 12px;

      p{
        flex: 1;
        min-width: 0;
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      /* O Voltar vira icone: no mobile a seta sozinha ja e o gesto de retorno esperado */
      .chat-favorita-full-header-voltar{
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;

        span{
          display: none;
        }
        i{
          font-size: 13px;
        }
      }

      .chat-favorita-full-header-filtros{
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 38px;
        padding: 0 13px;
        border: 1px solid #DBE2EC;
        border-radius: 999px;
        background-color: #FFFFFF;
        color: #2B3648;
        font-size: 12.5px;
        font-weight: 700;
        white-space: nowrap;
        cursor: pointer;
        transition: 0.15s ease-in-out;

        i{
          font-size: 13px;
          color: #0F56C9;
        }

        /* Contador de filtros aplicados: o sheet fechado esconde os chips marcados */
        .chat-favorita-full-header-filtros-badge{
          min-width: 18px;
          height: 18px;
          padding: 0 5px;
          border-radius: 999px;
          background-color: #0F56C9;
          color: #FFFFFF;
          font-size: 10.5px;
          font-weight: 700;
          line-height: 18px;
          text-align: center;
        }
      }
      .chat-favorita-full-header-filtros-ativo{
        border-color: #CFDFFA;
        background-color: #EEF3FD;
        color: #0F56C9;
      }
    }

    /* Todo filtro mora no sheet, busca inclusive; no topo fica so o total da ultima busca */
    .chat-favorita-full-search{
      gap: 0;
      padding: 0;
      border-bottom: 0;
      background-color: transparent;

      /* A faixa carrega o fundo e a borda que no desktop sao da barra inteira */
      .chat-favorita-full-topo{
        display: flex;
        align-items: center;
        padding: 9px 12px;
        background-color: #FFFFFF;
        border-bottom: 1px solid #E3E8EF;
      }
      /* Antes da primeira resposta nao ha total a anunciar: a faixa nem ocupa espaco */
      .chat-favorita-full-topo:has(> .chat-favorita-full-search-total:empty){
        display: none;
      }

      .chat-favorita-full-search-input{
        flex: 1 1 100%;
        max-width: 100%;

        input{
          height: 42px;
          border-radius: 11px;
          /* 16px evita o zoom automatico do iOS ao focar o campo */
          font-size: 16px;
        }
      }

      .chat-favorita-full-search-total{
        margin-left: 0;
        padding: 3px 9px;
        border-radius: 999px;
        background-color: #F4F7FC;
        font-size: 11.5px;
      }

      /* ---------------- BOTTOM SHEET DE FILTROS ---------------- */
      .chat-favorita-full-filtros{
        display: block;
        position: fixed;
        inset: 0;
        z-index: 5;
        background-color: rgba(16, 24, 40, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease-in-out;
      }
      .chat-favorita-full-filtros-on{
        opacity: 1;
        pointer-events: auto;
      }

      .chat-favorita-full-filtros-painel{
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        max-height: 85dvh;
        border-radius: 18px 18px 0 0;
        background-color: #FFFFFF;
        box-shadow: 0 -12px 30px rgba(16, 24, 40, 0.18);
        transform: translateY(100%);
        /* curva de saida de bottom sheet: sai rapido e encosta devagar */
        transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
      }
      .chat-favorita-full-filtros-on .chat-favorita-full-filtros-painel{
        transform: translateY(0);
      }
      /* Durante o arrasto quem manda e o dedo: a transicao atrapalharia o acompanhamento */
      .chat-favorita-full-filtros-painel-arrastando{
        transition: none;
      }

      .chat-favorita-full-filtros-sheet-header{
        position: relative;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 18px 52px 10px 52px;
        /* o arrasto vertical do sheet nao pode virar rolagem da tela atras */
        touch-action: none;

        .chat-favorita-full-filtros-sheet-handle{
          position: absolute;
          top: 8px;
          left: 50%;
          transform: translateX(-50%);
          width: 42px;
          height: 4px;
          border-radius: 999px;
          background-color: #DBE2EC;
        }
        p{
          margin: 0;
          font-size: 14px;
          font-weight: 700;
          color: #16213A;
        }
        .chat-favorita-full-filtros-fechar{
          position: absolute;
          right: 12px;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 34px;
          height: 34px;
          padding: 0;
          border: 0;
          border-radius: 50%;
          background-color: #F4F7FC;
          color: #4A5670;
          font-size: 14px;
          cursor: pointer;
        }
      }

      .chat-favorita-full-filtros-corpo{
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 6px 14px 16px 14px;
        overflow-y: auto;
        /* a rolagem do sheet nao arrasta a lista que fica atras dele */
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;

        .chat-favorita-full-filtros-linha{
          flex-wrap: wrap;
          gap: 8px;
        }
        .chat-favorita-full-filtros-label{
          width: 100%;
          font-size: 11px;
        }
        .chat-favorita-full-filtros-opcoes{
          width: 100%;
          gap: 8px;
        }
        /* O total da busca fica na faixa do topo, nao dentro do sheet */
        .chat-favorita-full-search-total{
          display: none;
        }
        /* Chips com altura de toque confortavel */
        .chat-favorita-full-filtros-chip span{
          padding: 9px 14px;
          font-size: 13px;
        }
        .chat-favorita-full-filtros-autor{
          /* No sheet o campo ocupa a linha inteira: a medida do desktop nao se aplica */
          flex: 1 1 100%;
          min-width: 0;
          max-width: 100%;
          height: 42px;
          border-radius: 10px;

          input{
            font-size: 16px;
          }
          i{
            font-size: 14px;
          }
        }
        /* O Limpar e o Buscar da barra do desktop cedem o lugar ao par do rodape */
        .chat-favorita-full-filtros-limpar,
        .chat-favorita-full-filtros-buscar{
          display: none;
        }
      }

      .chat-favorita-full-filtros-sheet-footer{
        flex: none;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)) 14px;
        border-top: 1px solid #E3E8EF;
        background-color: #FFFFFF;

        .chat-favorita-full-filtros-limpar-sheet{
          flex: none;
          margin-left: 0;
          height: 44px;
          padding: 0 16px;
          border: 1px solid #DBE2EC;
          border-radius: 10px;
          background-color: #FFFFFF;
          color: #4A5670;
          font-size: 13px;
          font-weight: 700;
        }
        .chat-favorita-full-filtros-aplicar{
          flex: 1;
          display: inline-flex;
          align-items: center;
          justify-content: center;
          gap: 8px;
          height: 44px;
          padding: 0 14px;
          border-radius: 10px;
          font-size: 13.5px;
          white-space: nowrap;
          cursor: pointer;

          i{
            font-size: 12px;
          }
        }
      }
    }

    /* A lista vira coluna unica e ganha toda a altura livre da tela */
    .chat-favorita-full-content{
      gap: 10px;
      padding: 14px 12px calc(28px + env(safe-area-inset-bottom, 0px)) 12px;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;

      .chat-favorita-grupo-content{
        grid-template-columns: 1fr;
        gap: 10px;
      }

      .chat-favorita-content-item{
        padding: 14px 12px 0 12px;
        border-radius: 10px;

        /* No card largo cabem tres linhas do prompt antes do corte */
        .chat-favorita-content-item-header p{
          width: 100%;
          -webkit-line-clamp: 3;
          min-height: 0;
          max-height: 3.6em;
        }

        /* Alvos de toque do rodape do card */
        .chat-favorita-content-item-footer{
          min-height: 46px;

          .fa-ellipsis{
            width: 38px;
            height: 34px;
          }
        }
      }
    }
  }

  /* Mobile: so o logo representa a marca; ferramentas e celulas ganham area de toque de 40px */
  :root{
    --navbar-height: 56px;
  }
  .navbar-page{
    .navbar-page-content{
      gap: 12px;
      padding-left: 12px;
    }
    .navbar-page-content-left-brand{
      padding-right: 12px;
    }
    .navbar-page-content-left-tools{
      padding-left: 12px;
      gap: 4px;
    }
    .navbar-page-content-icon-button{
      width: 40px;
      height: 40px;
    }
    .navbar-page-content-right-user .navbar-page-content-right-user-arrow .dropdown-toggle{
      padding: 0 12px;
    }
  }
  .navbar-page-content-left-description{
    display: none !important;
  }
  .navbar-page-content-left-local{
    display: none !important;
  }

  .marca-vector{
    .marca-vector-logo{
      img{
        width: 30px;
      }
    }
    .marca-vector-info p{
      img{
        width: 8px;
      }
    }
  }

  #index-content-chat{
    padding: 0;
  }

  .chat-historico-inactive{
    width: 100% !important;
    opacity: 1 !important;
    right: 100% !important;
  }
  .chat-historico{
    position: absolute;
    width: 100%;
    max-width: 100%;
    height: 100%;
    top: 0px;
    right: 0;
    transition: 0.2s ease-in-out;
    border-right: none;
    
    .chat-historico-search-header{
      margin: 10px 0px 0px 0px;
    }

  }

  .chat-favorita-inactive{
    width: 100% !important;
    opacity: 1 !important;
    left: 100% !important;
  }
  .chat-favorita{
    position: absolute;
    width: 100%;
    max-width: 100%;
    height: 100%;
    top: 0px;
    left: 0;
    transition: 0.2s ease-in-out;
    border-right: none;
    
    .chat-favorita-search-header{
      margin: 10px 0px 0px 0px;
    }

  }

  /* ALERT DO HISTORICO */
  .chat-historico-content-alert {
    align-items: end;
    overflow: hidden;
  }
  .chat-historico-content-alert-container {
    margin: 0;
    border-radius: 10px 10px 0 0;
    width: 100%;
    bottom: 0;
    position: absolute;
    /* translateY em vez de animar bottom: nao recalcula layout a cada frame */
    transform: translateY(100%);
    transition: transform var(--overlay-motion) var(--overlay-ease);
  }
  .chat-historico-content-alert-on .chat-historico-content-alert-container {
    transform: translateY(0);
  }

  /* Copiar e Seguir dividem a linha de cima; Cancelar ocupa a linha de baixo inteira */
  .chat-favorita-view-container-footer{
    flex-wrap: wrap;
    align-items: stretch;

    button{
      padding: 10px 8px;
      text-align: center;
    }
    /* min-width 0 impede que a largura do texto force a quebra dos dois para linhas separadas */
    .chat-favorita-view-container-footer-copiar,
    .chat-favorita-view-container-footer-original{
      flex: 1 1 0;
      min-width: 0;
    }
    .chat-favorita-view-container-footer-copiar{
      order: 1;
    }
    .chat-favorita-view-container-footer-original{
      order: 2;
    }
    .chat-favorita-view-container-footer-cancel{
      order: 3;
      flex: 1 0 100%;
    }
  }
}

/* Telas estreitas: o cabecalho de gerenciar favoritos guarda so os icones */
@media(max-width:400.98px) {
  .chat-favorita-full{
    .chat-favorita-full-header{
      .chat-favorita-full-header-filtros{
        gap: 6px;
        padding: 0 11px;

        span:not(.chat-favorita-full-header-filtros-badge){
          display: none;
        }
      }
    }
    .chat-favorita-full-search{
      .chat-favorita-full-filtros-sheet-footer{
        .chat-favorita-full-filtros-limpar-sheet{
          padding: 0 12px;
        }
      }
    }
  }
}

/* Sem animacao para quem pediu menos movimento no sistema */
@media(prefers-reduced-motion: reduce) {
  :root{
    --overlay-fade: 0.01ms;
    --overlay-motion: 0.01ms;
  }
  .chat-favorita-full,
  .chat-favorita-full .chat-favorita-full-search .chat-favorita-full-filtros,
  .chat-favorita-full .chat-favorita-full-search .chat-favorita-full-filtros-painel{
    transition: none;
  }
  .estado-vazio > *{
    animation: none;
  }
  .estado-vazio .estado-vazio-acao{
    transition: none;
  }
}
