/*
 * MF_MENTORIA V001.0.2.0 — A.8.13.1
 * Identidade visual persistente + avatar canônico no bootstrap + paridade multi-perfil.
 * Camada exclusivamente visual/conversacional; sem autoridade própria.
 */

.mentoria-copilot-central{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  padding:12px;
  border:1px solid #d9e5ee;
  border-radius:14px;
  background:#fff;
  box-shadow:0 7px 18px rgba(15,23,42,.045);
}

.mentoria-copilot-central__heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding-bottom:9px;
  border-bottom:1px solid #e7eef4;
}

.mentoria-copilot-central__heading>span:first-child{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}

.mentoria-copilot-central__heading strong{
  color:#0f2940;
  font-size:12px;
  line-height:1.2;
}

.mentoria-copilot-central__heading small{
  color:#6c8294;
  font-size:9px;
  line-height:1.35;
}

.mentoria-copilot-badge{
  flex:0 0 auto;
  padding:4px 7px;
  border:1px solid #bde6cf;
  border-radius:999px;
  background:#edf9f1;
  color:#16824b;
  font-size:8px;
  font-weight:800;
  white-space:nowrap;
}

.mentoria-copilot-search{
  display:block;
  margin-top:10px;
}

.mentoria-copilot-search input{
  display:block;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:36px;
  padding:8px 10px;
  border:1px solid #cad9e5;
  border-radius:9px;
  background:#fff;
  color:#263b4d;
  font-size:10px;
  outline:none;
}

.mentoria-copilot-search input:focus{
  border-color:#70aaf0;
  box-shadow:0 0 0 3px rgba(59,130,246,.10);
}

.mentoria-copilot-participants{
  display:grid;
  gap:7px;
  max-height:244px;
  margin-top:9px;
  padding-right:3px;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
}

.mentoria-copilot-participant{
  position:relative;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  column-gap:9px;
  min-width:0;
  min-height:58px;
  padding:8px;
  border:1px solid #d8e4ec;
  border-radius:11px;
  background:#fff;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}

.mentoria-copilot-participant.is-actionable{
  cursor:pointer;
}

.mentoria-copilot-participant.is-actionable:hover,
.mentoria-copilot-participant.is-actionable:focus-visible{
  border-color:#8bb7ed;
  background:#f6faff;
  box-shadow:0 5px 14px rgba(37,99,235,.08);
  outline:none;
}

.mentoria-copilot-participant.is-selected{
  border-color:#69b7de;
  background:#edf8fd;
}

.mentoria-copilot-avatar{
  position:relative;
  display:inline-flex;
  width:40px;
  height:40px;
  min-width:40px;
  align-items:center;
  justify-content:center;
  overflow:visible;
  border-radius:999px;
  background:#e9f2f7;
  color:#23506e;
  font-size:10px;
  font-weight:900;
  line-height:1;
}

.mentoria-copilot-avatar img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  border-radius:999px;
  object-fit:cover;
  object-position:center;
}

.mentoria-copilot-state-dot{
  position:absolute;
  right:-1px;
  bottom:-1px;
  z-index:3;
  width:10px;
  height:10px;
  box-sizing:border-box;
  border:2px solid #fff;
  border-radius:999px;
  background:#94a3b8;
}

.mentoria-copilot-participant[data-state="ACTIVE"] .mentoria-copilot-state-dot,
.mentoria-copilot-participant[data-state="ATTENTION"] .mentoria-copilot-state-dot{
  background:#22c55e;
}

.mentoria-copilot-participant[data-state="RECENT"] .mentoria-copilot-state-dot{
  background:#eab308;
}

.mentoria-copilot-participant[data-state="AVAILABLE"] .mentoria-copilot-state-dot{
  background:#3b82f6;
}

.mentoria-copilot-participant[data-state="BLOCKED"] .mentoria-copilot-state-dot{
  background:#94a3b8;
}

.mentoria-copilot-participant__body{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:1px;
}

.mentoria-copilot-participant__body strong{
  max-width:100%;
  overflow:hidden;
  color:#14293c;
  font-size:10px;
  line-height:1.22;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mentoria-copilot-participant__body>small{
  color:#526a7c;
  font-size:9px;
  line-height:1.25;
}

.mentoria-copilot-participant__meta{
  display:flex;
  min-width:0;
  gap:5px;
  flex-wrap:wrap;
}

.mentoria-copilot-participant__meta small{
  color:#7a8d9b;
  font-size:8px;
  line-height:1.2;
}

.mentoria-copilot-participant__open{
  align-self:center;
  color:#2169d3;
  font-size:9px;
  font-weight:800;
  white-space:nowrap;
}

.mentoria-copilot-participant.is-blocked .mentoria-copilot-participant__open{
  color:#94a3b8;
}

.mentoria-copilot-empty{
  padding:11px 8px;
  color:#718596;
  font-size:9px;
  line-height:1.4;
  text-align:center;
}

/* Identidade persistente no canal atual. */
.mentoria-copilot-identity-strip{
  display:flex;
  min-width:0;
  align-items:center;
  gap:9px;
  padding:7px 12px;
  border-bottom:1px solid #e2ebf1;
  background:linear-gradient(90deg,#f7fbff,#fff);
}

.mentoria-copilot-identity-strip .mentoria-copilot-avatar{
  width:34px;
  height:34px;
  min-width:34px;
}

.mentoria-copilot-identity-strip__copy{
  display:flex;
  min-width:0;
  flex:1;
  flex-direction:column;
  gap:1px;
}

.mentoria-copilot-identity-strip__copy strong{
  overflow:hidden;
  color:#173247;
  font-size:10px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mentoria-copilot-identity-strip__copy small{
  color:#667e90;
  font-size:8px;
}

.mentoria-copilot-identity-strip__status{
  flex:0 0 auto;
  padding:4px 7px;
  border:1px solid #cfe1ec;
  border-radius:999px;
  background:#f3f8fb;
  color:#477088;
  font-size:8px;
  font-weight:800;
  white-space:nowrap;
}

/* Avatar do usuário vira entrada de perfil, como no Portal do Aluno. */
.mentoria-mfchat-user-avatar[data-mfc-profile-toggle]{
  cursor:pointer;
  outline:none;
  transition:box-shadow .16s ease,transform .16s ease;
}

.mentoria-mfchat-user-avatar[data-mfc-profile-toggle]:hover,
.mentoria-mfchat-user-avatar[data-mfc-profile-toggle]:focus-visible{
  box-shadow:0 0 0 4px rgba(59,130,246,.14);
  transform:translateY(-1px);
}

.mentoria-copilot-profile-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  z-index:250;
  box-sizing:border-box;
  width:min(300px,calc(100vw - 24px));
  padding:12px;
  border:1px solid #d7e2ea;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 40px rgba(15,23,42,.18);
}

.mentoria-copilot-profile-popover[hidden]{
  display:none!important;
}

.mentoria-copilot-profile-popover__person{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:center;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid #e8eef3;
}

.mentoria-copilot-profile-popover__person .mentoria-copilot-avatar{
  width:44px;
  height:44px;
  min-width:44px;
}

.mentoria-copilot-profile-popover__person>span:last-child{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}

.mentoria-copilot-profile-popover__person strong{
  overflow:hidden;
  color:#142a3c;
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mentoria-copilot-profile-popover__person small{
  color:#6e8292;
  font-size:9px;
}

.mentoria-copilot-profile-popover__actions{
  display:grid;
  gap:5px;
  margin-top:9px;
}

.mentoria-copilot-profile-popover__actions a,
.mentoria-copilot-profile-popover__actions button{
  display:flex;
  box-sizing:border-box;
  width:100%;
  min-height:34px;
  align-items:center;
  justify-content:space-between;
  padding:7px 9px;
  border:0;
  border-radius:8px;
  background:#f7fafc;
  color:#20384b;
  font:inherit;
  font-size:9px;
  font-weight:700;
  text-align:left;
  text-decoration:none;
  cursor:pointer;
}

.mentoria-copilot-profile-popover__actions a:hover,
.mentoria-copilot-profile-popover__actions button:hover{
  background:#eaf4ff;
  color:#1458b8;
}

/* Conversas recentes recebem o mesmo sinal visual de identidade do roster. */
.mentoria-copilot-history-card{
  position:relative;
}

.mentoria-copilot-history-card .mentoria-mfchat-unified-counterpart-avatar,
.mentoria-copilot-history-card .mentoria-mfchat-history-avatar{
  position:relative;
  overflow:visible!important;
}

.mentoria-copilot-history-card .mentoria-copilot-state-dot{
  right:-2px;
  bottom:-2px;
}

.mentoria-copilot-history-card[data-state="ACTIVE"] .mentoria-copilot-state-dot,
.mentoria-copilot-history-card[data-state="ATTENTION"] .mentoria-copilot-state-dot{
  background:#22c55e;
}

.mentoria-copilot-history-card[data-state="RECENT"] .mentoria-copilot-state-dot{
  background:#eab308;
}

.mentoria-copilot-history-card[data-state="BLOCKED"] .mentoria-copilot-state-dot{
  background:#94a3b8;
}

.mentoria-copilot-history-card a{
  white-space:nowrap;
}

/* Cards de perfil lateral do Estudo Tutorado também ganham affordance de perfil. */
.mentoria-study-side-profile[data-mfc-profile-card]{
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;
}

.mentoria-study-side-profile[data-mfc-profile-card]:hover,
.mentoria-study-side-profile[data-mfc-profile-card]:focus-visible{
  border-color:#b8d5ee;
  background:#f7fbff;
  box-shadow:0 5px 14px rgba(37,99,235,.06);
  outline:none;
}

@media (min-width:1051px){
  .mentoria-mfchat-full-shell .aim-workspace-rail-left .mentoria-copilot-central{
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0 0 10px!important;
    overflow:visible!important;
  }
}

@media (max-width:1050px){
  .mentoria-copilot-participants{
    max-height:none;
  }
}

@media (max-width:640px){
  .mentoria-copilot-participant{
    grid-template-columns:38px minmax(0,1fr);
  }

  .mentoria-copilot-participant__open{
    grid-column:2;
    justify-self:start;
  }

  .mentoria-copilot-profile-popover{
    position:fixed;
    top:72px;
    right:12px;
    left:12px;
    width:auto;
  }
}
/* A.8.13-r1.1 — projeções compactas nos drawers dos perfis. */
.mentoria-copilot-central--drawer{
  margin:10px 0;
  padding:10px;
  border-radius:11px;
  box-shadow:none;
}

.mentoria-copilot-central--drawer .mentoria-copilot-participants{
  max-height:190px;
}

.mentoria-copilot-central--drawer .mentoria-copilot-participant{
  grid-template-columns:36px minmax(0,1fr) auto;
  min-height:52px;
  padding:7px;
}

.mentoria-copilot-central--drawer .mentoria-copilot-avatar{
  width:36px;
  height:36px;
  min-width:36px;
}

.mentoria-copilot-identity-strip--drawer{
  margin:0;
  padding:7px 10px;
  border-top:1px solid #e5edf3;
  border-bottom:1px solid #e5edf3;
  background:#f8fbfd;
}

.mentoria-mfchat-study-panel .mentoria-copilot-identity-strip--drawer,
.mentoria-admin-mfchat-panel .mentoria-copilot-identity-strip--drawer{
  width:auto;
}

@media (max-width:640px){
  .mentoria-copilot-central--drawer .mentoria-copilot-participant{
    grid-template-columns:34px minmax(0,1fr);
  }
}
/* A.8.13-r1.2 — avatar de perfil nos shells da Mentoria. */
.mentoria-copilot-shell-profile-slot{
  position:absolute;
  top:18px;
  right:18px;
  z-index:12;
}

.mentoria-mentor-hero{
  position:relative;
}

.mentoria-copilot-shell-profile-wrap{
  position:relative;
  display:inline-flex;
  min-width:0;
}

.mentoria-copilot-shell-profile{
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  box-sizing:border-box;
  min-width:190px;
  max-width:min(330px,48vw);
  min-height:54px;
  padding:7px 10px;
  border:1px solid rgba(190,211,229,.9);
  border-radius:12px;
  background:rgba(255,255,255,.96);
  color:#183349;
  box-shadow:0 5px 16px rgba(15,23,42,.08);
  cursor:pointer;
  text-align:left;
}

.mentoria-copilot-shell-profile:hover,
.mentoria-copilot-shell-profile:focus-visible{
  border-color:#89b9e8;
  background:#f8fbff;
  outline:none;
  box-shadow:0 7px 18px rgba(37,99,235,.12);
}

.mentoria-copilot-shell-profile .mentoria-copilot-avatar{
  width:40px;
  height:40px;
  min-width:40px;
}

.mentoria-copilot-shell-profile__copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}

.mentoria-copilot-shell-profile__copy strong{
  overflow:hidden;
  color:#173247;
  font-size:10px;
  line-height:1.2;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mentoria-copilot-shell-profile__copy small{
  overflow:hidden;
  color:#6b8090;
  font-size:8px;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.mentoria-copilot-shell-profile__chevron{
  color:#7890a2;
  font-size:14px;
  font-weight:800;
}

.mentoria-copilot-shell-profile-wrap .mentoria-copilot-profile-popover{
  top:calc(100% + 7px);
  right:0;
}

.mentoria-mentorado-tools .mentoria-copilot-shell-profile{
  min-width:220px;
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.32);
  color:#fff;
  box-shadow:none;
}

.mentoria-mentorado-tools .mentoria-copilot-shell-profile__copy strong,
.mentoria-mentorado-tools .mentoria-copilot-shell-profile__copy small,
.mentoria-mentorado-tools .mentoria-copilot-shell-profile__chevron{
  color:inherit;
}

.mentoria-mentorado-tools .mentoria-copilot-shell-profile:hover,
.mentoria-mentorado-tools .mentoria-copilot-shell-profile:focus-visible{
  background:rgba(255,255,255,.22);
  border-color:rgba(255,255,255,.55);
}

@media (max-width:900px){
  .mentoria-copilot-shell-profile-slot{
    position:static;
    margin:10px 0 0;
  }

  .mentoria-copilot-shell-profile{
    width:100%;
    max-width:100%;
  }
}

@media (max-width:640px){
  .mentoria-copilot-shell-profile{
    min-width:0;
    grid-template-columns:38px minmax(0,1fr) auto;
  }
}


/* A.8.13.1 — paridade do avatar-perfil nas superfícies administrativas. */
.mentoria-admin-governance-shell .mentoria-copilot-profile-host{
  position:relative;
}

.mentoria-admin-governance-shell .mentoria-copilot-profile-host .mentoria-copilot-shell-profile-slot{
  position:relative;
  top:auto;
  right:auto;
  float:right;
  margin:0 0 12px 18px;
}

.mentoria-admin-governance-shell .mentoria-copilot-profile-host::after{
  content:"";
  display:block;
  clear:both;
}

@media (max-width:900px){
  .mentoria-admin-governance-shell .mentoria-copilot-profile-host .mentoria-copilot-shell-profile-slot{
    float:none;
    width:100%;
    margin:0 0 12px;
  }

  .mentoria-admin-governance-shell .mentoria-copilot-profile-host .mentoria-copilot-shell-profile-wrap{
    width:100%;
  }
}
