/* Popups contents syles */

@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

/* Main menu */
#appMenu-popup .panel-banner-item:after {
	-moz-box-ordinal-group: 0;
	margin: 0 8px 0 0 !important;
}
#appMenu-zoom-controls {
	padding-inline: 12px 0 !important;
}

#appMenu-fxa-status {
	&[fxastatus="signedin"] {
		& > #appMenu-fxa-label {
			padding-left: 22px !important;
			margin-inline-start: -22px !important;
		}
		
		& > #appMenu-fxa-avatar {
			margin-inline-start: 5px !important;
		}
	}
}

#appMenu-fxa-status2 {
	margin: var(--arrowpanel-menuitem-margin) !important;
	
	&[fxastatus] > #appMenu-fxa-label2 > vbox > #appMenu-header-description, #appMenu-fxa-text {
		font-weight: 400 !important;
	}
}
#appMenu-fxa-label2 {
	margin: 0 !important;
	padding: var(--arrowpanel-menuitem-padding) !important;
	
	&:hover {
		background: transparent !important;
	}
}

.proton-zap {
	&::before {
		border-image: none !important;
	}
}

.PanelUI-remotetabs-clientcontainer label {
	margin: var(--arrowpanel-menuitem-margin) !important;
	padding: var(--arrowpanel-menuitem-padding) !important;
}

/* User sync account remove avatar */
#fxa-menu-avatar {
	display: none;
}

/* Add search engine button remove icon */
#pageAction-panel-addSearchEngine .toolbarbutton-badge-stack {
	display: none !important;
}

/* All tabs popover */
.all-tabs-item[selected] {
	border-left: 3px solid var(--gnome-tabbar-tab-active-border-bottom-color);
	box-shadow: none !important;
}

.all-tabs-item > .all-tabs-secondary-button label {
	margin: 0 !important;
}

/* Add bookmark */
#editBookmarkPanel {
	#editBookmarkPanelContent {
		padding: var(--gnome-menu-padding) !important;
		
		label {
			margin-top: calc(var(--gnome-toolbar-spacing) * 2) !important;
			margin-bottom: var(--gnome-toolbar-spacing) !important;
		}
	}
	
	#editBookmarkPanelBottomContent {
		margin-block: calc(var(--gnome-toolbar-spacing) * 2) !important;
	}
}

/* Downloads popover */
#downloadsFooterButtons toolbarseparator {
	padding-inline: 0 !important;
}
#downloadsPanel-mainView .download-state {
	padding: 12px !important;
	border: 0 !important;
	border-radius: var(--gnome-button-radius) !important;
	display: flex;
	align-items: center;
	height: 64px !important;
	margin: 0 !important;
}

#downloadsPanel-mainView .downloadMainArea {
	flex: 1;
	display: flex;
}
#downloadsPanel-mainView .downloadMainArea:hover {
	background: transparent !important;
}

#downloadsPanel-mainView .downloadTypeIcon {
	margin: 0 !important;
	margin-right: 6px !important;
}

#downloadsPanel-mainView .downloadContainer {
	margin-inline-end: 0 !important;
	flex: 1;
	display: flex;
	flex-direction: column;
}

#downloadsPanel-mainView .download-state .downloadButton .button-box {
	padding: 0 !important;
	margin: 0 !important;
}
#downloadsPanel-mainView .download-state toolbarseparator {
	display: none;
}

/* Customization overflow menu position */
#customization-panel-container {
	margin-top: 10px;
	z-index: 10;
}

/* Confirmation Hint */
#confirmation-hint-checkmark-animation-container {
	margin: 12px 6px 12px 12px !important;
}
#confirmation-hint-message-container {
	margin: 12px 12px 12px 0 !important;
}

/* URLbar popups */
#identity-popup-mainView,
#permission-popup-mainView,
#protections-popup-mainView,
#identity-popup-mainView-panel-header {
	max-width: calc(var(--popup-width) + (var(--gnome-menu-padding) * 2)) !important;
	min-width: calc(var(--popup-width) + (var(--gnome-menu-padding) * 2)) !important;
}

/* Trust panel */
#trustpanel-popup-connection {
	gap: 6px !important;
}

#trustpanel-graphic-section {
	--trustpanel-graphic-bg: var(--gnome-card-background) !important;
	border-radius: var(--gnome-card-radius) !important;
	margin: var(--gnome-menu-padding) !important;
	margin-bottom: calc(var(--gnome-menu-padding) * 2) !important;
	padding: var(--gnome-menu-item-inline-padding) !important;
}
#trustpanel-toggle-section {
	margin: var(--gnome-menu-padding) calc(var(--gnome-menu-item-inline-margin) + var(--gnome-menu-item-inline-padding)) !important;
}
#trustpanel-toggle-checkbox-container {
	align-items: center;
	label {
		margin-bottom: 0 !important;
	}
}

#trustpanel-clearcookiesView {
	.trustpanel-section {
		moz-button-group {
			margin-top: var(--gnome-content-padding) !important;
		}
	}	
}

/* Permission popup */
.permission-popup-section {
	padding-bottom: var(--gnome-menu-padding) !important;
}
#permission-popup-permissions-content {
	padding-inline: var(--gnome-menu-padding) !important;
}

.permission-popup-permission-item:first-child, #permission-popup-storage-access-permission-list-header {
    margin-top: 0 !important;
}
.permission-popup-permission-remove-button {
	opacity: 1 !important;
}
.permission-popup-permission-state-label {
    display: none !important;
}

#permission-popup-permission-list-default-anchor:empty {
	padding: 0 !important;
}
.permission-popup-permission-list-anchor[anchorfor="3rdPartyStorage"] {
	padding: 0 !important;
}
.permission-popup-permission-list-anchor[anchorfor="3rdPartyStorage"] > vbox:only-child {
	display: block !important;
	height: 0 !important;
	overflow: hidden;
	visibility: hidden;
	margin: 0 !important;
	margin-bottom: -1px !important;
}
.permission-popup-permission-item-3rdPartyStorage {
	margin-right: 6px;
	margin-bottom: 6px !important;
}
#permission-popup-storage-access-permission-list-header {
	padding: 6px !important;
}

/* Feature recommendation notification, fix width */
#contextual-feature-recommendation-notification {
    width: auto !important;
}

/* Extensions sometimes assume a white background */
.webextension-popup-browser {
	background-color: #fff !important;
}

/* Translate */
#translations-panel-translate:not(:only-child, #hack) {
	margin: 0 !important;
}

#translations-panel-lang-selection > label {
	margin-top: var(--gnome-menu-padding) !important;
}

/* Tab group manager */
#tab-group-default-header ~ toolbarseparator {
	display: none !important;
}

/* Notification Popup */
#notification-popup, #appMenu-notification-popup {
	--arrowpanel-padding: var(--gnome-content-padding) !important;
	.panel-footer {
		--gnome-menu-padding: var(--gnome-content-padding) !important;
	}
}

.webext-perm-domains-list {
	border: 0 !important;
	margin-inline: 0 !important;
}
