:root {
    --panel-border-color: #b4b4b4 !important;
    --urlbarView-subtract: 23px;
    --urlbarView-min-width: 400px;
    
    @supports -moz-bool-pref("BeautyFox.appearance.IE9PreRelease") {
        --urlbarView-subtract: 34px;

        &[tabsOnNavRow] {
            --urlbar-width-calc: calc(25vw + 7px);
        }
    }
    &[tabsOnNavRow] {
        --urlbar-width-calc: calc(26vw + 10px);
    }
}

.urlbarView {
    transform: translateY(-1px);
    margin-inline: 0 !important;
    box-shadow: var(--pop-up_shadow) !important;
    background-color: white;
    padding: 0 !important;
    width: calc(100% - 2 * (5px + var(--urlbar-container-padding)) - var(--urlbarView-subtract)) !important;
    min-width: var(--urlbarView-min-width) !important;
    border: 1px solid var(--panel-border-color) !important;
}

#urlbar-go-button,
.search-go-button {
    list-style-image: none !important;
    background-image: url(images/go-mask.svg);
    background-repeat: no-repeat;
    background-position: center;
    width: var(--stop-reload-button_width) !important;
    height: 22px !important;
    border-radius: 0 !important;
    opacity: 0.5;
}

#urlbar-go-button {
    order: 2;
}

.urlbarView-action {
    display: none !important;
}

.urlbarView-title {
    color: rgb(0,102,207) !important;

    strong {
        color: black !important;
        font-weight: normal !important;
    }
}

.urlbarView-row {
    strong {
        font-weight: normal !important;
    }

    &:hover,
    &[selected] {
        .urlbarView-url {
            display: none !important;
        }
    }

    &[label] {
        .urlbarView-title {
            color: black !important;
        
            strong {
                color: rgb(0,102,207) !important;
            }
        }

        ~ .urlbarView-row {
            .urlbarView-title {
                color: black !important;
            
                strong {
                    color: rgb(0,102,207) !important;
                }
            }
        }
    }
}

#urlbar {
    &:not([usertyping]) {
        .urlbarView-title {
            color: black !important;
        
            strong {
                color: black !important;
            }
        }
    }
}

.urlbarView-row,
.autocomplete-richlistitem {
    border: 0 !important;
    min-height: 20px !important;
    border-radius: 0 !important;
    margin-left: 4px !important;
    margin-right: 4px !important;
    padding: 0 25px !important;

    &:hover,
    &[selected] {
        background-color: rgb(240, 240, 240) !important;
    }
}

.urlbarView-row[dynamicType='onboardTabToSearch'],
.urlbarView-group-aria-label {
    display: none !important;
}

.urlbarView-row[label] {
    &::before {
        font-size: 9pt !important;
        margin-inline-start: 0 !important;
        left: 10px !important
    }

    &::after {
        content: "";
        position: absolute;
        right: 19px;
        border-top: 1px solid rgb(227, 227, 227);
        width: calc(100% - 114px);
        top: -9px;
    }
}

.ac-title-text {
    color: black !important;

    span {
        color: rgb(0,102,207) !important;
    }
}

.urlbarView-row-inner {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0 !important;
    padding-block: 0 !important;
}

.urlbarView-favicon {
    display: none !important;
}

.urlbarView-type-icon {
    display: none !important;
}

.urlbarView-title-separator {
    display: none !important;
}

.urlbarView-url {
    color: #6d6d6d !important;
    font-size: 9pt !important;
}

.urlbarView-no-wrap {
    display: block !important;
    max-width: 100% !important;
    
}

.urlbarView-overflowable[overflow],
.urlbarView-url[overflow],
.urlbarView-no-wrap {
    overflow-x: hidden !important;
    text-overflow: ellipsis !important;
}

.urlbarView-overflowable[overflow],
.urlbarView-url[overflow] {
    mask-image: none !important;
}

.search-one-offs {
    padding-block: 0 !important;
    padding-left: 12px !important;
    padding-right: 6px !important;
    border-top: 1px solid #d6d6d6 !important;
    background: rgb(252,252,252);
    background: linear-gradient(0deg, rgba(252,252,252,1) 0%, rgba(252,252,252,1) 76%, rgba(232,232,232,1) 100%);
    position: relative;
    min-height: 22px !important;
}

.search-panel-header {
    display: none !important;
}

#urlbar-engine-one-off-item-bookmarks {
    display: none !important;
}

#urlbar-engine-one-off-item-tabs {
    display: none !important;
}

#urlbar-engine-one-off-item-history {
    display: none !important;
}

#pageAction-urlbar-_testpilot-containers {
    display: none !important;
}

.searchbar-separator {
    display: none !important;
}

.ac-type-icon {
    display: none !important;
}

#pageActionButton {
    display: none !important;
}

.searchbar-engine-one-off-item:not(.searchbar-engine-one-off-add-engine) {
    height: 22px !important;
    min-width: 22px !important;
    margin-top: 4px !important;
    margin-bottom: 3px !important;
    margin-right: 3px !important;

    &:hover {
        background-color: rgb(172,220,247) !important;
        border: 1px solid rgb(60,127,177) !important;
    }

    &:active {
        background-color: rgb(179,204,232) !important;
        border: 1px solid rgb(60,127,177) !important;
    }
}

#urlbar-engine-one-off-item-engine-0 {
    background-color: rgb(215,243,255) !important;
    border: 1px solid rgb(39,159,211) !important;
    border-radius: 3px !important;

    &:hover {
        background-color: rgb(172,220,247) !important;
        border: 1px solid rgb(60,127,177) !important;
    }

    &:active {
        background-color: rgb(179,204,232) !important;
        border: 1px solid rgb(60,127,177) !important;
    }
}

.searchbar-engine-one-off-add-engine {
    position: absolute;
    right: 0;
    align-items: center;
    margin-inline: 0 6px !important;
    border: 1px solid transparent;
    padding: 4px !important;

    &::after {
        content: 'Add';
    }

    &::before {
        content: '';
        position: absolute;
        top: 4px;
        left: -7px;
        width: 1px;
        height: calc(100% - 7px);
        border-left: 1px solid #6d6d6d;
    }

    .box-inherit {
        display: none !important;
    }
}

.urlbarView-button-menu {
    background-color: transparent !important;
    background-size: 8px !important;

    &:hover {
        color: black !important;
    }
}

#urlbar-search-mode-indicator {
    display: none !important;
}

#urlbar-anon-search-settings {
    display: none !important;
}

#searchbar-anon-search-settings {
    display: none !important;
}

#searchbar {
    font-size: 9pt !important;
    position: relative;
}

#urlbar-background,
#searchbar {
    border-radius: 0 !important;
    background-color: transparent !important;

    @media not (-moz-windows-classic) {
        border-top: 1px solid rgba(0,0,0,.5) !important;
        border-bottom: 1px solid rgba(0,0,0,.5) !important;
        border-left: 1px solid rgba(0,0,0,.5) !important;
        border-right: 1px solid rgba(0,0,0,.5) !important;
    }

    @media (-moz-windows-classic) {
        border-top: 1px solid ThreeDShadow !important;
        border-bottom: 1px solid ThreeDHighlight !important;
        border-left: 1px solid ThreeDShadow !important;
        border-right: 1px solid ThreeDHighlight !important;
    }

    &::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        box-sizing: border-box !important;
        
        @media not (-moz-windows-classic) {
            background-color: var(--toolbar-field-background-color) !important;
        }

        @media (-moz-windows-classic) {
            background-color: white !important;
            border-top: 1px solid ThreeDDarkShadow !important;
            border-bottom: 1px solid -moz-Dialog !important;
            border-left: 1px solid ThreeDDarkShadow !important;
            border-right: 1px solid -moz-Dialog !important;
        }
        z-index: 0;
    }
}

#urlbar-background {
    overflow: hidden !important;

    @media not (-moz-windows-classic) {
        border-right: 0 !important;
    }
}

#searchbar {
    background-color: transparent !important;
    border-radius: 0 !important;

    &:hover {
        background-color: transparent !important;

        &::before {
            background-color: var(--toolbar-field-background-color_hover) !important;
        }
    }

    &:focus-within {
        box-shadow: none !important;

        &::before {
            background-color: white !important;
        }
    }
}

.search-panel-tree {
    background-color: white !important;
}

.search-go-container {
    display: none;
}

#search-container {
    margin-inline-start: 6px !important;
    margin-inline-end: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    height: 24px;
}

:root[tabsOnNavRow] {
    #search-container {
        display: none !important;
    }
}

.searchbar-search-button {
    order: 2;
    mask-image: url(images/search-dropdown-mask.svg);
    mask-position: center;
    mask-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.5);
    width: 32px !important;
    margin-right: 6px !important;

    .searchbar-search-icon {
        list-style-image: none !important;
        fill-opacity: unset !important;
    }
}

#urlbar-input,
.searchbar-textbox {
	color: black !important;
}

.searchbar-textbox {
    padding: 0 0 0 7px !important;
    order: 1;
    z-index: 1;
    
    &::placeholder {
        opacity: 1 !important;
    }
}

.searchbar-textbox::placeholder {
    display: none !important;
}

.searchbar-search-icon-overlay {
    display: none !important;
}

:root[tabsOnNavRow] {
	&:not([chromehidden~='toolbar']) {
		#urlbar-container {
			flex: unset !important;
			width: var(--urlbar-width-calc) !important;
			min-width: var(--urlbar-min-width) !important;
		}
	
		toolbarpaletteitem#wrapper-urlbar-container {
			flex: unset !important;
		}
	
		#wrapper-search-container {
			display: none !important;
		}
	}
}

@supports -moz-bool-pref("BeautyFox.appearance.IE10") {
    #identity-box {
        padding-right: 0 !important;
    }
}