@include Option("userChromeJS.Sidra.Urlbar.Compact") {
  #urlbar {
    border-radius: 30px !important;
    border: 0 !important;
  }

  // 排序
  #page-action-buttons > *:not(.urlbar-page-action) {
    @include BoxOrder(99);
  }
  #page-action-buttons {
    > #star-button-box {
      @include BoxOrder(0);
    }
  }

  #urlbar[breakout][breakout-extend] {
    border: none !important;
    box-shadow:
      rgba(0, 0, 0, 0.09) 0px 2px 1px,
      rgba(0, 0, 0, 0.09) 0px 4px 2px,
      rgba(0, 0, 0, 0.09) 0px 8px 4px,
      rgba(0, 0, 0, 0.09) 0px 16px 8px,
      rgba(0, 0, 0, 0.09) 0px 32px 16px !important;
  }

  @include NotOption("userChromeJS.Sidra.Urlbar.Focus.Border.Enabled") {
    /* 地址栏/搜索栏选中边框 */
    #urlbar[focused]:not([suppress-focus-border]) > #urlbar-background,
    #searchbar:focus-within {
      outline: unset !important;
    }
  }

  @include Option("userChromeJS.Sidra.Urlbar.Megarbar.Disabled") {
    #urlbar[breakout][breakout-extend] {
      margin-left: 0 !important;
      width: var(--urlbar-width) !important;
      margin-top: calc(
        (var(--urlbar-container-height) - var(--urlbar-height)) / 2
      ) !important;

      > .urlbar-input-container {
        height: var(--urlbar-height) !important;
        padding-block: var(--urlbar-container-padding) !important;
        padding-inline: var(--urlbar-container-padding) !important;
      }
    }

    #urlbar[breakout][breakout-extend] > #urlbar-background {
      animation-name: unset !important;
    }

    #urlbar[breakout][breakout-extend]
      > :is(#urlbar-input-container, .urlbar-input-container) {
      height: var(--urlbar-height) !important;
      padding-block: 1px !important;
      padding-inline: 1px !important;
      border-bottom-left-radius: 0px !important;
      border-bottom-right-radius: 0px !important;
    }

    /* disable result item roundness */
    #urlbar[breakout] .urlbarView-row-inner {
      border-radius: 0px !important;
    }

    /* disable 'breakout' animation */
    #urlbar[breakout],
    #urlbar[breakout] * {
      animation: unset !important;
      duration: 0s !important;
      animation-duration: 0s !important;
    }

    .urlbarView-body-inner {
      border-top: 0px !important;
    }
  }

  @include Option("userChromeJS.Sidra.Urlbar.Popup.Compact") {
    #urlbar[breakout][breakout-extend] > .urlbarView {
      padding: unset !important;
      margin: unset !important;
      // --urlbarView-labeled-row-margin-top: 0;
      --urlbarView-item-block-padding: 3px;
    }

    #urlbar[breakout] .urlbarView {
      margin-inline: unset !important;
      width: 100% !important;
    }

    /* disable space wasting inside popup around result items */
    #urlbar[breakout] #urlbar-results {
      padding: 0px !important;
      margin: 0px !important;
    }
    #urlbar[breakout] #urlbar-results .urlbarView-body-outer,
    #urlbar[breakout] #urlbar-results .urlbarView-row,
    #urlbar[breakout] #urlbar-results .urlbarView-row-inner {
      margin-inline-start: 0 !important;
      padding-inline-start: 0 !important;
      margin-inline-end: 0 !important;
      padding-inline-end: 0 !important;
    }
    /*
    #urlbar[breakout] #urlbar-results .urlbarView-row-inner {
      padding-inline-start: 4px !important;
      padding-inline-end: 4px !important;
    }*/

    #urlbar[breakout] .urlbarView-row {
      padding-block: 0px !important;
    }

    /* disable space wasting inside popup around search engines */
    #urlbar[breakout] .search-one-offs {
      padding-top: 0px !important;
      padding-bottom: 0px !important;
    }

    #main-window:not([uidensity="compact"]) #identity-box {
      margin-inline-end: unset !important;
    }
  }
}
