/* NEXEI 3.1.1 - barra de ações, recorte de avatar e refinamentos do Assistant */

/* Barra de ações do visualizador: todos os ícones sempre visíveis */
body.page-view .details .actions{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,36px)!important;
  grid-auto-flow:column!important;
  grid-auto-columns:36px!important;
  justify-content:start!important;
  align-items:center!important;
  gap:6px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0 0 12px 0!important;
  padding:4px 0!important;
  overflow:visible!important;
  overflow-x:visible!important;
  transform:none!important;
  left:0!important;
  scroll-padding-left:0!important;
}
body.page-view .details .actions>*{
  width:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
body.page-view .details .actions>form{
  display:block!important;
}
body.page-view .details .actions a,
body.page-view .details .actions button,
body.page-view .details .actions .icon-btn,
body.page-view .details .actions form button{
  width:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  padding:0!important;
  border-radius:11px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  position:static!important;
  transform:none!important;
}
body.page-view .details .actions img,
body.page-view .details .actions svg,
body.page-view .details .actions .action-icon-img,
body.page-view .details .actions .nexei-icon-real,
body.page-view .details .actions .nexei-icon-lite{
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  min-height:20px!important;
  max-width:20px!important;
  max-height:20px!important;
  object-fit:contain!important;
  display:block!important;
}

/* Perfil e recorte */
.profile-photo-field-v311{grid-column:span 1;display:grid;gap:10px;align-self:start}
.profile-cropper-v311[hidden]{display:none!important}
.profile-cropper-v311{position:fixed;inset:0;z-index:180;background:rgba(15,23,42,.58);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px}
.profile-cropper-v311>*{box-sizing:border-box}
.profile-cropper-v311::before{content:"";position:absolute;inset:0;backdrop-filter:blur(3px)}
.profile-cropper-head-v311,
.profile-cropper-head{position:relative;z-index:1;width:min(440px,100%);display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:#fff;border-radius:18px 18px 0 0;border:1px solid #dfe7f3;border-bottom:0}
.profile-cropper-head button{width:34px;height:34px;padding:0;border-radius:10px;background:#f1f5f9;color:#0f172a}
.profile-crop-stage-v311{position:relative;z-index:1;width:min(440px,100%);height:min(440px,calc(100vw - 40px));max-height:440px;background:#111827;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;cursor:grab;border-left:1px solid #dfe7f3;border-right:1px solid #dfe7f3}
.profile-crop-stage-v311.is-dragging{cursor:grabbing}
.profile-crop-stage-v311 canvas{width:100%;height:100%;display:block;object-fit:contain}
.profile-crop-mask-v311{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at center,transparent 0 45%,rgba(15,23,42,.66) 45.5% 100%);border:2px solid rgba(255,255,255,.9);border-radius:0}
.profile-crop-mask-v311::after{content:"";position:absolute;width:90%;height:90%;left:5%;top:5%;border:2px solid rgba(255,255,255,.92);border-radius:50%;box-shadow:0 0 0 999px rgba(15,23,42,.05)}
.profile-crop-controls-v311{position:relative;z-index:1;width:min(440px,100%);padding:14px 16px;background:#fff;border-left:1px solid #dfe7f3;border-right:1px solid #dfe7f3;display:grid;gap:6px}
.profile-crop-controls-v311 label{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;font-weight:800}.profile-crop-controls-v311 input{padding:0}.profile-crop-controls-v311 span{font-size:12px;color:#64748b}
.profile-crop-actions-v311{position:relative;z-index:1;width:min(440px,100%);display:flex;justify-content:flex-end;gap:10px;padding:14px 16px;background:#fff;border:1px solid #dfe7f3;border-top:0;border-radius:0 0 18px 18px}
.profile-avatar-xl img,.sidebar-avatar img{object-fit:cover!important}
.sidebar-avatar{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}

/* Assistant: respostas longas com melhor leitura */
.assistant-msg{white-space:pre-wrap!important}
.assistant-history{overscroll-behavior:contain!important}
.assistant-links{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin-top:8px!important}
.assistant-links a{font-size:11px!important;padding:7px 9px!important}

@media(max-width:520px){
  body.page-view .details .actions{grid-template-columns:repeat(auto-fit,34px)!important;grid-auto-columns:34px!important;gap:5px!important}
  body.page-view .details .actions>*,body.page-view .details .actions a,body.page-view .details .actions button,body.page-view .details .actions .icon-btn,body.page-view .details .actions form button{width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important}
  body.page-view .details .actions img,body.page-view .details .actions svg,body.page-view .details .actions .action-icon-img{width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important}
  .profile-cropper-v311{padding:10px}.profile-crop-stage-v311{height:calc(100vw - 20px)}
}
