/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

#identity-box[pageproxystate="valid"]:is(
    .notSecureText,
    .chromeUI,
    .extensionPage
  )
  > .identity-box-button {
  &:not(:hover) {
    background-color: transparent !important;
  }
  & image {
    list-style-image: url("../icons/firefox.svg") !important;
  }

  & #identity-icon-label {
    display: none !important;
  }

  fill: var(--toolbarbutton-icon-fill) !important;
}

#urlbar-background {
  border-radius: var(--uc-radius) !important;
}

@media not (-moz-bool-pref: "uc.tweak.regular-url") {
  #main-window:not([customizing]) {
    /* url-bar animation */
    #nav-bar {
      display: flex;
      justify-content: center;
      border-radius: var(--user-radius) !important;
    }

    #urlbar-container {
      flex: 1;
      /* max-width: 1000px; */
      margin: auto !important;
    }

    #urlbar-background {
      /* border: none !important; */
    }

    #main-window #urlbar {
      z-index: 9999 !important;
      opacity: 100 !important;
      margin-top: 0 !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      /* transition: width 0.3s ease, left 0.3s ease, margin-top 0.3s ease, margin-left 0.3s ease, margin-right 0.3s ease; */
    }

    #urlbar[breakout="false"][breakout-extend="false"] {
      position: fixed !important;
      width: clamp(400px, 64vw, 800px) !important;

      top: 20vh !important;
      left: calc(50vw - (clamp(400px, 64vw, 800px) / 2)) !important;
      right: calc(50vw - (clamp(400px, 64vw, 800px) / 2)) !important;

      #main-window[titlepreface*="="]:not([sizemode="fullscreen"]) & {
        left: calc(
          (var(--nav-width) / 2) - (clamp(400px, 64vw, 800px) / 2)
        ) !important;
        right: calc(
          (var(--nav-width) / 2) - (clamp(400px, 64vw, 800px) / 2)
        ) !important;
      }

      opacity: 0.97 !important;
      z-index: 100 !important;
      margin-left: auto !important;
      margin-right: auto !important;

      /* transition: width 0.3s ease, left 0.3s ease, margin-top 0.3s ease, margin-left 0.3s ease, margin-right 0.3s ease; */
      .urlbar-input {
        font-size: 16px !important;
      }
    }

    #urlbar:not([breakout="false"][breakout-extend="false"]) {
      & #urlbar-background {
        /* background: transparent !important; */
      }
      & .urlbar-input-container {
        /* text-align: center !important; */
        & .urlbar-input-box {
          transition: none !important;
        }
      }
    }
  }
}
