/* NEXEI v308 - acordeão de permissões e ícones de ação maiores */

/* Permissões: categorias recolhidas e apenas uma aberta por vez */
.gov-permission-categories-v307{
  display:flex!important;
  flex-direction:column!important;
  gap:9px!important;
  max-height:520px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:7px!important;
  align-content:stretch!important;
}
.gov-permission-category-v307{
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  margin:0!important;
  overflow:hidden!important;
  position:relative!important;
  contain:layout paint!important;
  border:1px solid #dbe7f8!important;
  border-radius:14px!important;
  background:#fff!important;
}
.gov-permission-category-v307>summary{
  min-height:48px!important;
  box-sizing:border-box!important;
  padding:12px 15px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  cursor:pointer!important;
  user-select:none!important;
  background:#f5f8ff!important;
  list-style:none!important;
  position:relative!important;
  z-index:2!important;
}
.gov-permission-category-v307>summary::-webkit-details-marker{display:none!important}
.gov-permission-category-v307>summary:after{
  content:'+'!important;
  width:24px!important;
  height:24px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:#e8efff!important;
  color:#3157e8!important;
  font-size:18px!important;
  font-weight:900!important;
  flex:0 0 24px!important;
}
.gov-permission-category-v307[open]>summary:after{content:'−'!important}
.gov-permission-category-v307>summary small{margin-left:auto!important;white-space:nowrap!important}
.gov-permission-category-v307>.gov-check-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;
  gap:10px!important;
  padding:12px!important;
  position:relative!important;
  z-index:1!important;
  max-height:350px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#fff!important;
}
.gov-permission-category-v307:not([open])>.gov-check-grid{display:none!important}

/* Indicador redondo: verde ativo, vermelho inativo; sem alavanca */
.gov-permission-toggle-v307{
  grid-template-columns:22px minmax(0,1fr)!important;
  min-height:66px!important;
  gap:11px!important;
  align-items:center!important;
  padding:11px 12px!important;
  border-radius:13px!important;
  cursor:pointer!important;
  overflow:hidden!important;
}
.gov-permission-toggle-v307>input{
  position:absolute!important;
  opacity:0!important;
  width:1px!important;
  height:1px!important;
  pointer-events:none!important;
}
.perm-indicator-v308{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  min-height:16px!important;
  border-radius:50%!important;
  display:block!important;
  background:#ef4444!important;
  box-shadow:0 0 0 4px rgba(239,68,68,.13)!important;
  transition:transform .12s ease,background .12s ease,box-shadow .12s ease!important;
}
.gov-permission-toggle-v307.is-active .perm-indicator-v308{
  background:#22c55e!important;
  box-shadow:0 0 0 4px rgba(34,197,94,.14)!important;
}
.gov-permission-toggle-v307:hover .perm-indicator-v308{transform:scale(1.08)!important}
.gov-permission-toggle-v307.is-active{
  background:#f6fff8!important;
  border-color:#bbf7d0!important;
}
.gov-permission-toggle-v307.is-inactive{
  background:#fffafa!important;
  border-color:#fecaca!important;
}
.gov-permission-toggle-v307 b{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important}
.gov-permission-toggle-v307 small{display:block!important;margin-top:4px!important;line-height:1.35!important}
.gov-permission-toggle-v307 em{font-style:normal!important;color:#3157e8!important;background:#eef2ff!important;border-radius:999px!important;padding:2px 6px!important}

/* Remove por completo o visual antigo de switch, inclusive caso permaneça em cache/HTML legado */
.perm-switch-v307{
  width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;
  border-radius:50%!important;background:#ef4444!important;box-shadow:0 0 0 4px rgba(239,68,68,.13)!important;
}
.perm-switch-v307:after{display:none!important;content:none!important}
.gov-permission-toggle-v307.is-active .perm-switch-v307{background:#22c55e!important;box-shadow:0 0 0 4px rgba(34,197,94,.14)!important}

/* Ícones de ações: maior área de clique e ícone visível sem distorção */
body.page-view .details .actions{
  gap:10px!important;
  padding:4px 50px 10px 2px!important;
  min-height:50px!important;
  align-items:center!important;
}
body.page-view .details .actions a,
body.page-view .details .actions button,
body.page-view .details .actions button.icon-btn,
body.page-view .details .actions .icon-btn,
body.page-view .details .actions form button{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  max-width:44px!important;
  max-height:44px!important;
  padding:9px!important;
  border-radius:13px!important;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:visible!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:25px!important;
  height:25px!important;
  min-width:25px!important;
  min-height:25px!important;
  max-width:25px!important;
  max-height:25px!important;
  object-fit:contain!important;
  object-position:center!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:23px!important;
  line-height:1!important;
}
/* Ações nos cards das listagens */
.doc-actions a,.doc-actions button{
  min-height:42px!important;
  padding:10px 16px!important;
  border-radius:13px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:13px!important;
  font-weight:800!important;
}
.file-item .file-x{width:34px!important;height:34px!important;min-width:34px!important;font-size:20px!important}

@media(max-width:700px){
  .gov-permission-categories-v307{max-height:460px!important}
  .gov-permission-category-v307>.gov-check-grid{grid-template-columns:1fr!important;max-height:330px!important}
  body.page-view .details .actions a,
  body.page-view .details .actions button,
  body.page-view .details .actions .icon-btn{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;max-width:42px!important;max-height:42px!important}
  body.page-view .details .actions img,
  body.page-view .details .actions svg,
  body.page-view .details .actions .action-icon-img{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important}
}
