& {
	--toolbar-start-end-padding: 4px;

	--toolbarbutton-border-radius: 3px !important;
	--toolbarbutton-width: 27px;
	--toolbarbutton-height: 27px;
	--toolbarbutton-icon-drop-shadow: drop-shadow(0 1px 0 rgba(255, 255, 255, .3));

	--personal-toolbar-height: 23px;

	:not(.widget-overflow-list) {
		> .toolbarbutton-1:not(
			#gkavatar-container > #gk-firefox-account-button,
			#tabs-newtab-button,
			#new-tab-button,
			.subviewbutton,
			#go-button-box
		) {
			box-shadow: 0 1px 0 0 transparent, inset 0 1px 2px transparent !important;

			&::before {
				background: rgba(255,255,255,1) !important;
				border-radius: var(--toolbarbutton-border-radius) !important;
			}

			&:not([disabled]) {
				&:hover {
					&::before {
						opacity: .25;
					}

					border-bottom-color: color-mix(
						in srgb,
						var(--toolbarbutton-border-color-hot, var(--default-toolbarbutton-border-color-hot)) 80%,
						black
					) !important;
					box-shadow: 0 1px 0 0 rgb(0, 0, 0, 14%),
						inset 0 1px 0 0 color-mix(
							in srgb,
							var(--toolbarbutton-border-color-hot, var(--default-toolbarbutton-border-color-hot)) 30%,
							white
						),
						inset 0 0 2px color-mix(
							in srgb,
							var(--toolbarbutton-border-color-hot, var(--default-toolbarbutton-border-color-hot)) 30%,
							white
						) !important;
				}

				&:active,
				&[open] {
					&::before {
						content: unset;
					}

					background: linear-gradient(
						to bottom,
						rgb(0,0,0,.4),
						rgb(0,0,0,.1) 1%,
					) !important;
					box-shadow: 0 1px 0 0 transparent,
						inset 0 1px 2px rgb(0, 0, 0, 18%) !important;
					border-color: var(
						--toolbarbutton-border-color-active,
						var(--default-toolbarbutton-border-color-active)
					) !important;
				}
			}
			&[disabled] {
				.toolbarbutton-icon,
				image:first-of-type {
					fill: color-mix(
						in srgb,
						var(--toolbarbutton-icon-color, var(--default-toolbarbutton-icon-color)) 25%,
						transparent
					) !important;
				}
			}

			&#reload-button,
			&#home-button {
				.toolbarbutton-icon {
					margin-bottom: 0 !important;
				}
			}
		}
	}

	&:not([personalbar="newtab"]) #PersonalToolbar > * {
		margin-bottom: 1px !important;
	}

	#PersonalToolbar .bookmark-item:not(
		.menu-iconic,
		.menuitem-iconic,
		[data-l10n-id="places-empty-bookmarks-folder"]
	) {
		box-shadow: 0 1px 0 0 transparent, inset 0 1px 2px transparent !important;
		transition: border-color 100ms linear, background-color 100ms linear, color 100ms linear, box-shadow 100ms linear;

		&:not([disabled]) {
			&:hover,
			&:active,
			&[open] {
				background-color: transparent !important;
			}

			&:hover {
				background-color: rgba(255, 255, 255, 0.6) !important;
				border-bottom-color: color-mix(
					in srgb,
					var(--toolbarbutton-border-color-hot, var(--default-toolbarbutton-border-color-hot)) 80%,
					black
				) !important;
				box-shadow: 0 1px 0 0 rgb(0, 0, 0, 14%),
					inset 0 1px 0 0 color-mix(
						in srgb,
						var(--toolbarbutton-border-color-hot, var(--default-toolbarbutton-border-color-hot)) 30%,
						white
					),
					inset 0 0 2px color-mix(
						in srgb,
						var(--toolbarbutton-border-color-hot, var(--default-toolbarbutton-border-color-hot)) 30%,
						white
					) !important;
			}

			&:active,
			&[open] {
				background-color: rgba(240, 240, 240, 0.5) !important;
				background: linear-gradient(
					to bottom,
					rgb(0,0,0,.4),
					rgb(0,0,0,.1) 1%,
				) !important;
				box-shadow: 0 1px 0 0 transparent,
					inset 0 1px 2px rgb(0, 0, 0, 18%) !important;
				border-color: var(
					--toolbarbutton-border-color-active,
					var(--default-toolbarbutton-border-color-active)
				) !important;
			}
		}
		&[disabled] {
			.toolbarbutton-icon,
			image:first-of-type {
				fill: color-mix(
					in srgb,
					var(--toolbarbutton-icon-color, var(--default-toolbarbutton-icon-color)) 25%,
					transparent
				) !important;
			}
		}
	}


	/*
		GTK+ SysTheme - exclusive toolbarbutton styling
	*/
	&[gksystheme="gtk"]:not([gkthemed], [gkchrthemed], [geckium-sixtyeight]) {
		:not(.widget-overflow-list)
		> .toolbarbutton-1:not(
			#gkavatar-container > #gk-firefox-account-button,
			#tabs-newtab-button,
			#new-tab-button,
			.subviewbutton) {
			box-shadow: unset !important;

			&:not([disabled]) {
				&:hover {
					box-shadow: unset !important;
				}
				&:active,
				&[open] {
					box-shadow: unset !important;
				}
			}
		}

		// Pinned bookmarks
		#PersonalToolbar .bookmark-item:not(
			.menu-iconic,
			.menuitem-iconic,
			[data-l10n-id="places-empty-bookmarks-folder"]
		) {
			background-color: transparent !important;
			border: 0 !important;
			outline: 0 !important;
			box-shadow: unset !important;
		}
	}
}