/* ChatFox: topbar and bottom import popup polish (2026-11-04).
   Presentation-only; original import handlers, selectors and data remain intact. */

/* Balance belongs to the folder list, not the page title. */
#root [data-testid="profiles-table-page"] .top-bar .folder-title [data-fb-badge]{
  display:none!important;
}
#root [data-testid="profiles-table-page"] .top-bar .top-bar-left{
  flex:0 1 auto!important;
  min-width:0!important;
}
#root [data-testid="profiles-table-page"] .top-bar .folder-title{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
  white-space:nowrap!important;
}
#root [data-testid="profiles-table-page"] .top-bar .folder-title > span:nth-child(2){
  max-width:220px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#root [data-testid="profiles-table-page"] .top-bar .top-bar-right{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:nowrap!important;
}
#root [data-testid="profiles-table-page"] .top-bar .top-bar-right > button{
  flex-shrink:0!important;
}

/* Actual popup is portaled to body, outside sidebar overflow:hidden. */
body > #blocked-import-widget{
  position:fixed!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  color:#233e5a!important;
  border:1px solid #d1dfef!important;
  border-radius:14px!important;
  padding:15px 16px 16px!important;
  box-shadow:0 15px 44px rgba(24,56,98,.19),0 2px 8px rgba(24,56,98,.065)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  z-index:2147482000!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;
  scrollbar-width:thin;
}
body > #blocked-import-widget[hidden]{
  display:none!important;
}
body > #blocked-import-widget::before{
  content:"Импорт и проверки";
  display:block;
  padding:0 2px 10px;
  margin:0 0 1px;
  border-bottom:1px solid #e8eef6;
  color:#224b73;
  font-size:14px;
  font-weight:700;
  line-height:1.4;
}
body > #blocked-import-widget > div[style*="grid-template-columns"]{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:9px!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
}
body > #blocked-import-widget > div[style*="grid-template-columns"] > button:not(.cf-folder-picker-toggle){
  box-sizing:border-box!important;
  background:#edf5fd!important;
  border:1px solid #c7daee!important;
  border-radius:9px!important;
  color:#2d6497!important;
  box-shadow:none!important;
  text-shadow:none!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:1.2!important;
  min-height:39px!important;
  height:39px!important;
  min-width:125px!important;
  padding:7px 10px!important;
  white-space:nowrap!important;
}
body > #blocked-import-widget > div[style*="grid-template-columns"] > button:not(.cf-folder-picker-toggle):hover{
  background:#dfeeff!important;
  border-color:#96bfeb!important;
}
body > #blocked-import-widget .cf-folder-picker-toggle{
  width:100%!important;
  min-width:0!important;
  height:39px!important;
  min-height:39px!important;
  padding:8px 11px!important;
  background:#f8fbff!important;
  border:1px solid #cddbea!important;
  border-radius:9px!important;
}
body > #blocked-import-widget .cf-block-queue-note{
  font-size:11px!important;
  padding:0 4px!important;
  margin:0!important;
  color:#768aa2!important;
  line-height:1.45!important;
}
body > #blocked-import-widget > div[style*="display: none"],
body > #blocked-import-widget > div[style*="display:none"]{
  border-radius:8px!important;
}
body > #blocked-import-widget :is(button,select,input):focus-visible{
  outline:2px solid #4097e1!important;
  outline-offset:2px!important;
}
@media(max-width:480px){
  body > #blocked-import-widget{
    padding:12px!important;
  }
  body > #blocked-import-widget > div[style*="grid-template-columns"] > button:not(.cf-folder-picker-toggle){
    min-width:100px!important;
    padding:6px 8px!important;
    font-size:11px!important;
  }
}
