/* Profile table, import selectors, and unified ChatFox sidebar — UI only. */

/* The table's first cell always contains the selection box and column gear. */
#root [data-testid="profiles-table"] th:first-child,
#root [data-testid="profiles-table"] td:first-child{
  position:relative!important;
  text-align:left!important;
  padding-left:12px!important;
}
#root [data-testid="profiles-table"] th:first-child .custom-checkbox,
#root [data-testid="profiles-table"] td:first-child .custom-checkbox{
  margin:0!important;
  vertical-align:middle!important;
}
#root [data-testid="profiles-table"] .cf-columns-gear{
  position:absolute!important;
  top:50%!important;
  right:7px!important;
  transform:translateY(-50%)!important;
  width:27px!important;
  height:27px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:7px!important;
  border:1px solid #bdd8f2!important;
  background:#eff7ff!important;
  color:#2475be!important;
  padding:0!important;
  cursor:pointer;
}
#root [data-testid="profiles-table"] .cf-columns-gear svg{width:16px!important;height:16px!important}
#root [data-testid="profiles-table"] .cf-columns-gear:hover{background:#dbedff!important}
#root [data-testid="profiles-table"] td:nth-child(10) .slp-zone{margin-left:5px!important;flex-shrink:0!important}
#root [data-testid="profiles-table"] .cf-launch-cell{vertical-align:middle!important;white-space:normal!important}
#root [data-testid="profiles-table"] .cf-launch-cell > :is(button,span){vertical-align:middle!important}
#root [data-testid="profiles-table"] td:nth-child(2) > div{flex-wrap:wrap!important;gap:4px!important}
#root [data-testid="profiles-table"] thead th{white-space:nowrap!important}
#root [data-testid="profiles-table"] :is(th,td){overflow:visible!important}

/* Custom folder chooser mirrors the ChatFox light editor, not OS default menus. */
#blocked-import-widget select.cf-folder-picker-source{display:none!important}
#blocked-import-widget .cf-folder-picker-toggle{
  box-sizing:border-box!important;min-width:0!important;width:100%!important;
  height:38px!important;min-height:38px!important;display:flex!important;
  align-items:center!important;justify-content:space-between!important;
  gap:8px!important;padding:7px 11px!important;
  border:1px solid #c9d9eb!important;border-radius:9px!important;
  background:#f8fbff!important;color:#263d5b!important;
  box-shadow:0 1px 2px #22456d09!important;text-align:left!important;
  font-size:13px!important;font-weight:500!important;cursor:pointer!important;
}
#blocked-import-widget .cf-folder-picker-toggle:hover{border-color:#8bbced!important;background:#f0f8ff!important}
#blocked-import-widget .cf-folder-picker-toggle:focus-visible{outline:2px solid #3c9ae4!important;outline-offset:2px!important}
#blocked-import-widget .cf-folder-picker-toggle:disabled{opacity:.55!important;cursor:default!important}
#blocked-import-widget .cf-folder-value{display:block!important;min-width:0!important;flex:1!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
#blocked-import-widget .cf-folder-picker-toggle svg{height:17px!important;width:17px!important;flex-shrink:0!important;color:#577aa0!important}
.cf-folder-picker-popover{
  position:fixed;z-index:2147483000;box-sizing:border-box;
  background:#fff;border:1px solid #cbdceb;border-radius:11px;
  box-shadow:0 14px 36px rgba(27,68,108,.18);
  padding:6px;max-height:260px;overflow:auto;scrollbar-width:thin;
  font:500 13px/1.45 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
.cf-folder-picker-popover .cf-folder-choice{
  display:flex;align-items:center;justify-content:space-between;
  width:100%;padding:9px 12px;min-height:36px;border:0;border-radius:7px;
  background:transparent;color:#2d4969;text-align:left;
  font:inherit;cursor:pointer;gap:14px;
}
.cf-folder-picker-popover .cf-folder-choice:hover,
.cf-folder-picker-popover .cf-folder-choice:focus-visible{background:#eaf4ff;outline:none}
.cf-folder-picker-popover .cf-folder-choice[aria-selected="true"]{background:#dfedff;color:#125da8;font-weight:700}
.cf-folder-picker-popover .cf-folder-tick{flex-shrink:0;color:#1774c8}
.cf-folder-picker-popover .cf-folder-empty{padding:12px;color:#71859f}

/* Main app uses the same visual rhythm as /texts/index.html.
   Keep its original links, folder actions and live import toggle. */
body:has(.dolphin-sidebar) #root .dolphin-sidebar{
  background:#f8fbff!important;
  border-color:#dce7f2!important;
}
body:has(.dolphin-sidebar) #root .dolphin-sidebar:not(.w-14) .sidebar-nav{
  padding:13px 7px 18px!important;
}
body:has(.dolphin-sidebar) #root .dolphin-sidebar:not(.w-14) .sidebar-nav .folder-item{
  min-height:42px!important;border-radius:9px!important;
  font-size:13px!important;
}
body:has(.dolphin-sidebar) #root .dolphin-sidebar:not(.w-14) #cf-profile-import-toggle{
  display:flex!important;align-items:center!important;gap:11px!important;
  padding:10px 12px!important;min-height:42px!important;
  width:calc(100% - 16px)!important;
  margin:2px 8px!important;
  border-radius:9px!important;background:transparent!important;
  color:#516783!important;font-size:13px!important;font-weight:500!important;
}
body:has(.dolphin-sidebar) #root .dolphin-sidebar:not(.w-14) #cf-profile-import-toggle:hover{
  background:#edf5ff!important;color:#2166a8!important;
}
body:has(.dolphin-sidebar) #root .dolphin-sidebar:not(.w-14) #texts-sidebar-link{
  font-size:13px!important;border-radius:9px!important;color:#516783!important;
  min-height:42px!important;align-items:center!important;
}
body:has(.dolphin-sidebar) #root .dolphin-sidebar:not(.w-14) #texts-sidebar-link:hover{
  background:#edf5ff!important;color:#2166a8!important;
}
