/* Keep optional controls inside the account Settings popover, not the 44px gear button. */
#yap-tool-menu .yap-sidebar-footer,
#yap-tool-menu #yap-menu-settings { min-width:0!important; max-width:100%!important; }
#yap-tool-menu #yap-menu-settings > .top-actions {
  box-sizing:border-box!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior:contain!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions > #yap-install,
#yap-tool-menu #yap-menu-settings > .top-actions > #yap-location-controls {
  box-sizing:border-box!important;
  position:relative!important;inset:auto!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  margin:0!important;flex:0 0 auto!important;
  overflow-wrap:normal!important;word-break:normal!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions > #yap-install {
  display:block!important;min-height:39px!important;
  padding:9px 11px!important;border:0!important;border-radius:9px!important;
  color:var(--fg)!important;background:transparent!important;
  font:500 13px/1.4 system-ui,sans-serif!important;
  white-space:normal!important;text-align:left!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions > #yap-install[hidden]{display:none!important}
#yap-tool-menu #yap-menu-settings > .top-actions > #yap-install:hover,
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls > summary:hover {
  background:var(--bubble)!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls > summary{
  min-height:39px!important;display:flex!important;align-items:center!important;
  box-sizing:border-box!important;width:100%!important;
  padding:9px 11px!important;border-radius:9px!important;
  font:500 13px/1.4 system-ui,sans-serif!important;
  white-space:normal!important;overflow-wrap:normal!important;
  list-style:none;color:var(--fg)!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls > summary::-webkit-details-marker{
  display:none;
}
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls > summary::after{
  content:"⌄";margin-left:auto;opacity:.6;
}
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls[open] > summary::after{
  transform:rotate(180deg);
}
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls > .yap-location-options{
  position:static!important;inset:auto!important;
  box-sizing:border-box!important;width:100%!important;
  min-width:0!important;max-width:100%!important;
  max-height:min(36dvh,290px)!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  margin:4px 0 8px!important;padding:9px!important;
  border:1px solid var(--border)!important;border-radius:10px!important;
  box-shadow:none!important;background:var(--panel)!important;color:var(--fg)!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions .yap-location-options input,
#yap-tool-menu #yap-menu-settings > .top-actions .yap-location-options button,
#yap-tool-menu #yap-menu-settings > .top-actions .yap-location-options a{
  box-sizing:border-box!important;max-width:100%!important;min-width:0!important;
  overflow-wrap:anywhere!important;
}
#yap-tool-menu #yap-menu-settings > .top-actions > .yap-location-controls:not([open]) > .yap-location-options{
  display:none!important;
}
@media(max-width:700px){
 #yap-tool-menu #yap-menu-settings > .top-actions{
  max-height:min(60dvh,480px)!important;
 }
}
