diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..66ef8de0d2a767376740ca57d75b5372cc11ed40 100644
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
   false
 );
 
+XPCOMUtils.defineLazyPreferenceGetter(
+  lazy,
+  "ZEN_URLBAR_BEHAVIOR",
+  "zen.urlbar.behavior",
+  'default'
+);
+
 const DEFAULT_FORM_HISTORY_NAME = "searchbar-history";
 const SEARCH_BUTTON_CLASS = "urlbar-search-button";
 
@@ -349,7 +356,16 @@ export class UrlbarInput {
     // See _on_select().  HTMLInputElement.select() dispatches a "select"
     // event but does not set the primary selection.
     this._suppressPrimaryAdjustment = true;
+    const zenToolbox = this.document.getElementById("navigator-toolbox");
+    this.window.document.documentElement.setAttribute("supress-primary-adjustment", !(
+      zenToolbox.hasAttribute("zen-has-hover") ||
+      zenToolbox.hasAttribute("zen-has-empty-tab") ||
+      zenToolbox.hasAttribute("zen-user-show")
+    ));
     this.inputField.select();
+    this.document.ownerGlobal.setTimeout(() => {
+      this.window.document.documentElement.removeAttribute("supress-primary-adjustment");
+    }, 0);
     this._suppressPrimaryAdjustment = false;
   }
 
@@ -425,6 +441,10 @@ export class UrlbarInput {
     hideSearchTerms = false,
     isSameDocument = false
   ) {
+    if (this.hasAttribute("zen-newtab")) {
+      return;
+    }
+
     // We only need to update the searchModeUI on tab switch conditionally
     // as we only persist searchMode with ScotchBonnet enabled.
     if (
@@ -698,8 +718,16 @@ export class UrlbarInput {
         return;
       }
     }
-
+    const zenToolbox = this.document.getElementById("navigator-toolbox");
+    this.window.document.documentElement.setAttribute("supress-primary-adjustment", !(
+      zenToolbox.hasAttribute("zen-has-hover") ||
+      zenToolbox.hasAttribute("zen-has-empty-tab") ||
+      zenToolbox.hasAttribute("zen-user-show")
+    ));
     this.handleNavigation({ event });
+    this.document.ownerGlobal.setTimeout(() => {
+      this.window.document.documentElement.removeAttribute("supress-primary-adjustment");
+    }, 0);
   }
 
   /**
@@ -1093,7 +1121,11 @@ export class UrlbarInput {
     }
 
     if (!this.#providesSearchMode(result)) {
-      this.view.close({ elementPicked: true });
+      if (this._zenHandleUrlbarClose) {
+        this._zenHandleUrlbarClose(true, true);
+      } else {
+        this.view.close({ elementPicked: true });
+      }
     }
 
     this.controller.recordSelectedResult(event, result);
@@ -2125,6 +2157,10 @@ export class UrlbarInput {
     await this.#updateLayoutBreakoutDimensions();
   }
 
+  async zenUpdateLayoutBreakout() {
+    await this.#updateLayoutBreakout();
+  }
+
   startLayoutExtend() {
     if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) {
       // Do not expand if the Urlbar does not support being expanded or it is
@@ -2147,6 +2183,12 @@ export class UrlbarInput {
 
     this.setAttribute("breakout-extend", "true");
 
+    if (lazy.ZEN_URLBAR_BEHAVIOR == 'float' || (lazy.ZEN_URLBAR_BEHAVIOR == 'floating-on-type' && !this.focusedViaMousedown)) {
+      this.setAttribute("zen-floating-urlbar", "true");
+      this.window.gZenUIManager.onFloatingURLBarOpen();
+    } else {
+      this.removeAttribute("zen-floating-urlbar");
+    }
     // Enable the animation only after the first extend call to ensure it
     // doesn't run when opening a new window.
     if (!this.hasAttribute("breakout-extend-animate")) {
@@ -2166,6 +2208,24 @@ export class UrlbarInput {
       return;
     }
 
+    if (this._zenHandleUrlbarClose) {
+      this._zenHandleUrlbarClose();
+    }
+    
+    // Arc like URLbar: Blur the input on exit
+    const zenToolbox = this.document.getElementById("navigator-toolbox");
+    this.window.document.documentElement.setAttribute("supress-primary-adjustment", !(
+      zenToolbox.hasAttribute("zen-has-hover") ||
+      zenToolbox.hasAttribute("zen-has-empty-tab") ||
+      zenToolbox.hasAttribute("zen-user-show")
+    ));
+    this.window.gBrowser.selectedBrowser.focus();
+    this.document.ownerGlobal.setTimeout(() => {
+      this.window.document.documentElement.removeAttribute("supress-primary-adjustment");
+    }, 0);
+    
+    this.removeAttribute("zen-floating-urlbar");
+
     this.removeAttribute("breakout-extend");
     this.#updateTextboxPosition();
   }
@@ -2485,7 +2545,7 @@ export class UrlbarInput {
 
         this.textbox.parentNode.style.setProperty(
           "--urlbar-container-height",
-          px(getBoundsWithoutFlushing(this.textbox.parentNode).height)
+          px(getBoundsWithoutFlushing(this.textbox.parentNode).height + 8)
         );
         this.textbox.style.setProperty(
           "--urlbar-height",
@@ -2900,6 +2960,7 @@ export class UrlbarInput {
   }
 
   _toggleActionOverride(event) {
+    if (!Services.prefs.getBoolPref("zen.urlbar.enable-overrides")) return;
     if (
       event.keyCode == KeyEvent.DOM_VK_SHIFT ||
       event.keyCode == KeyEvent.DOM_VK_ALT ||
@@ -2998,7 +3059,7 @@ export class UrlbarInput {
    */
   _trimValue(val) {
     let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
-      ? lazy.BrowserUIUtils.trimURL(val)
+      ? this._zenTrimURL(val)
       : val;
     // Only trim value if the directionality doesn't change to RTL and we're not
     // showing a strikeout https protocol.
@@ -3368,6 +3429,10 @@ export class UrlbarInput {
       }
       reuseEmpty = true;
     }
+    if (this.hasAttribute("zen-newtab")) {
+      where = "tab";
+      reuseEmpty = true;
+    }
     if (
       where == "tab" &&
       reuseEmpty &&
@@ -3375,6 +3440,9 @@ export class UrlbarInput {
     ) {
       where = "current";
     }
+    if (this.window.gBrowser.selectedTab.hasAttribute("zen-empty-tab")) {
+      return "tab"; // Always open in a new tab if the current tab is "our empty tab".
+    }
     return where;
   }
 
@@ -3632,6 +3700,7 @@ export class UrlbarInput {
       this.setResultForCurrentValue(null);
       this.handleCommand();
       this.controller.clearLastQueryContextCache();
+      this.view.close();
 
       this._suppressStartQuery = false;
     });
@@ -3639,7 +3708,6 @@ export class UrlbarInput {
     contextMenu.addEventListener("popupshowing", () => {
       // Close the results pane when the input field contextual menu is open,
       // because paste and go doesn't want a result selection.
-      this.view.close();
 
       let controller =
         this.document.commandDispatcher.getControllerForCommand("cmd_paste");
@@ -4053,6 +4121,11 @@ export class UrlbarInput {
   }
 
   _on_click(event) {
+    if (event.target == this.inputField) {
+      event.zenOriginalTarget = this.textbox;
+      this._on_mousedown(event);
+    }
+
     if (
       event.target == this.inputField ||
       event.target == this._inputContainer ||
@@ -4124,7 +4197,7 @@ export class UrlbarInput {
       }
     }
 
-    if (this.focusedViaMousedown) {
+    if (this.focusedViaMousedown || this.hasAttribute("zen-newtab")) {
       this.view.autoOpen({ event });
     } else {
       if (this._untrimOnFocusAfterKeydown) {
@@ -4164,9 +4237,16 @@ export class UrlbarInput {
   }
 
   _on_mousedown(event) {
-    switch (event.currentTarget) {
+    switch (event.zenOriginalTarget || event.currentTarget) {
       case this.textbox: {
         this._mousedownOnUrlbarDescendant = true;
+        const isProbablyFloating =
+          (lazy.ZEN_URLBAR_BEHAVIOR == "floating-on-type" &&
+          this.hasAttribute("breakout-extend") && !this.focusedViaMousedown) ||
+          (lazy.ZEN_URLBAR_BEHAVIOR == "float") || this.window.gZenVerticalTabsManager._hasSetSingleToolbar;
+        if (event.type != "click" && isProbablyFloating || event.type == "click" && !isProbablyFloating) {
+          return true;
+        }
 
         if (
           event.target != this.inputField &&
@@ -4178,6 +4258,10 @@ export class UrlbarInput {
 
         this.focusedViaMousedown = !this.focused;
         this._preventClickSelectsAll = this.focused;
+        if (isProbablyFloating) {
+          this.focusedViaMousedown = !this.hasAttribute("breakout-extend");
+          this._preventClickSelectsAll = this.hasAttribute("breakout-extend");
+        }
 
         // Keep the focus status, since the attribute may be changed
         // upon calling this.focus().
@@ -4218,7 +4302,7 @@ export class UrlbarInput {
         }
         // Don't close the view when clicking on a tab; we may want to keep the
         // view open on tab switch, and the TabSelect event arrived earlier.
-        if (event.target.closest("tab")) {
+        if (event.target.closest("tab") || event.target.closest("#tabs-newtab-button")) {
           break;
         }
 
