/* ==UserStyle==
@name           Proton optimized & customizable for wide screens
@description    Proton website interface is reworked to offer a cleaner and comfortable experience on desktop, with visual adjustments that adapt to your needs.
@version        1.0.1
@author         BreatFR (https://breat.fr)
@namespace      https://breat.fr
@homepageURL    https://usercssjs.breat.fr/p/proton
@updateURL      https://code.breat.fr/p/proton/css/pc.user.css
@supportURL     https://discord.gg/Q8KSHzdBxs
@license        AGPL-3.0-or-later; https://www.gnu.org/licenses/agpl-3.0.txt
@preprocessor   stylus

@var 	text       	separator1  "🌐 WHOLE WEBSITE 🌐"                  		   "_"
@var    checkbox    avatar      "Avatar instead initials"                   	1
@var    text        avatarurl   "Avatar URL"                                	"URL between quotes"
@var	checkbox	hidesponsor	"Hide Sponsor friend"							1
@var    checkbox    carbontheme "Fix Carbon Theme"                          	1
@var    checkbox    meterbar    "Fix Meter bar colors"                      	1

@var 	text       	separator2  "🐈 LUMO 🐈"                  			   	   "_"
@var    text        fontsize    "Custom font size"  							1.2rem
@var    checkbox    hideplus    "Hide Lumo Plus"    							1
@var    checkbox    widemode    "Wide mode"         							1

@var 	text       	separator3  "✉️ MAIL ✉️"								   "_"
@var    checkbox    fixtop      "Fix Space Top"                             	1
@var    checkbox    folders1st  "Folders 1st"                               	1
@var    checkbox    hidelabels  "Hide Labels"                               	1
@var    checkbox    hideleftnav "Hide Left Nav Icon"                        	1
@var    checkbox    hideless    "Hide Less Toggle"                          	1
@var    checkbox    nospace     "Hide space between all messages and folders"	1
@var    checkbox    hideoffer   "Hide Special Offer"                        	1
@var    checkbox    hidetips    "Hide Tips"                                 	1
@var    checkbox    hideview	"Hide View"                               		0
==/UserStyle== */

/* ==Credits==
Website         https://breat.fr
Bluesky			https://bsky.app/profile/breatfroff.bsky.social
facebook        https://www.facebook.com/breatfroff
mastodon        https://mastodon.social/@breat_fr
telegram        https://t.me/breatfr
vk              https://vk.com/breatfroff
X (twitter)     https://x.com/breatfroff
==/Credits== */

/* ==Support==
brave Creators  https://publishers.basicattentiontoken.org/c/breatfr
ko-fi           https://ko-fi.com/breatfr
PayPal          https://paypal.me/breat
==/Support== */

@-moz-document domain("proton.me"), domain("account.protonvpn.com") {
    /* General */
    /* Versions */
    :root {
        --themeversion: 'Theme v1.0.1 by BreatFR (https://breat.fr)';
        --install: ' usercssjs.breat.fr/p/proton';
		--help: ' discord.gg/Q8KSHzdBxs';
        --support1: ' ko-fi.com/breatfr ';
        --support2: ' paypal.me/breat';
        --fontsize: fontsize;
    }

    @media screen and (min-width: 900px) {
        header.header > div:nth-of-type(1) > ul > li:nth-of-type(3) {
            margin-left: auto;
        }
		header.header > div:nth-of-type(1)::after,
		header.header > div:nth-of-type(1)::before {
			background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
            background-clip: text;
            color: transparent;
			display: block;
            font-family: inherit;
            font-size: 1.2rem;
			line-height: calc(60px / 2);
            pointer-events: none;
            position: absolute;
            text-align: center;
			top: 0;
            width: 100vw;
            white-space: pre-line;
            z-index: 9999;
		}
        header.header > div:nth-of-type(1)::after {
            content: var(--themeversion) '\A Help: ' url("https://code.breat.fr/share/images/icons/discord.png") var(--help);
			left: -20%;
        }
		header.header > div:nth-of-type(1)::before {
            content: 'Install & Infos: ' url("https://code.breat.fr/share/images/icons/breat.fr.png") var(--install) '\A Support me: ' url("https://code.breat.fr/share/images/icons/ko-fi.png") var(--support1) ' · ' url("https://code.breat.fr/share/images/icons/paypal.png") var(--support2);
            left: 15%;
        }
    }

    if hideoffer {
        [data-testid="cta:special-offer"] {
            display: none;
        }
    }

	if hidesponsor {
		button[style="--upgrade-color-stop-1: #6243E5; --upgrade-color-stop-2: #D783FF;"] {
			display: none;
		}
	}

    if avatar {
        [data-testid="heading:userdropdown"] > span:nth-of-type(2) > span,
        .user-initials-active > span {
            display: none;
        }
        [data-testid="heading:userdropdown"] > span:nth-of-type(2) {
            border: 0;
            padding: 0;
        }
        [data-testid="heading:userdropdown"] > span:nth-of-type(2)::before {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
			margin-right: .5em;
            padding: 0;
            width: 32px;
        }
        .user-initials-active {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
            padding: 0;
            width: 3.4rem;
        }
    }

    if meterbar {
        .meter-bar-thumb--success {
            --meter-bar-thumb-color-success: var(--signal-success);
        }
        .meter-bar-thumb--warning {
            --meter-bar-thumb-color-warning: var(--signal-warning);
        }
        .meter-bar-thumb--danger {
            --meter-bar-thumb-color-danger: var(--signal-danger);
        }
    }

	if carbontheme {
		:root {
			--bg-hover: rgba(91, 87, 107, 0.2);
			--bg-lowered: #0e0d12;
			--bg-norm: #16141c;
			--bg-search: #292733;
			--bg-weak: #292733;
			--email-message-view-background-color: var(--bg-norm);
			--sidebar-background-color: var(--bg-norm);
			--border-weak: #343140;
			--font-norm: #ffffff;
			--font-weak: #a7a4b5;
			--font-proton: #8a6eff;
		}
		.bg-weak {
			background-color: var(--bg-weak);
		}
		.border-weak {
			border-color: var(--border-weak);
		}
	}
}

@-moz-document url-prefix("https://proton.me/") {
    /* Proton website */
	/* Versions */
	@media screen and (min-width: 900px) {
		header > div:nth-of-type(1)::after {
			display: none !important;
		}
		header > div:nth-of-type(1)::before {
			display: none !important;
		}
	}
}

@-moz-document url-prefix("https://account.proton.me/") {
    /* Proton Account */
	/* Versions */
	@media screen and (min-width: 900px) {
		header.header > div:nth-of-type(1)::after {
			left: -14%;
		}
		header.header > div:nth-of-type(1)::before {
			left: 14%;
		}
	}
}

@-moz-document domain("calendar.proton.me") {
    /* Proton Calendar */
	/* Versions */
	@media screen and (min-width: 900px) {
		header.header > div:nth-of-type(1)::after {
			left: -27.5%;
		}
		header.header > div:nth-of-type(1)::before {
			left: -1.5%;
		}
	}
}

@-moz-document url-prefix("https://docs.proton.me/u/") {
    /* Proton Docs */
	/* Versions */
	header.header > div:nth-of-type(1)::after {
		left: -14%;
	}
	header.header > div:nth-of-type(1)::before {
		left: 16%;
	}

    if avatar {
        [data-testid="heading:userdropdown"] > span:nth-of-type(2) > span,
        .user-initials-active > span {
            display: none;
        }
        [data-testid="heading:userdropdown"] > span:nth-of-type(2) {
            border: 0;
            padding: 0;
        }
        [data-testid="heading:userdropdown"] > span:nth-of-type(2)::before {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
			margin-right: .5em;
            padding: 0;
            width: 32px;
        }
        .user-initials-active {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
            padding: 0;
            width: 3.4rem;
        }
	}

    if carbontheme {
		[data-testid="dropdown-button"]:has([data-testid="apps-dropdown-item"]) > .dropdown-content,
        .homepage-header,
        .homepage-header > header,
        main.main-area--with-toolbar.main-area-border,
        .content,
        .sidebar {
            background: var(--bg-lowered) !important;
            background-color: var(--bg-lowered) !important;
        }
        main > div > div > div > div,
        [class="flex h-[2.75rem] items-center text-left"],
        .bg-norm {
            background: var(--bg-norm) !important;
            background-color: var(--bg-norm) !important;
            border-color: var(--bg-norm) !important;
            border-radius: 0;
        }
        main > div > div > div > div,
        [class="flex h-[2.75rem] items-center text-left"],
        [class="divide-weak divide-y"] *,
        .bg-norm {
            color: var(--font-norm) !important;
        }
        [class="divide-weak divide-y"]:hover * {
            background: var(--bg-hover) !important;
            background-color: var(--bg-hover) !important;
        }
        .homepage-header *,
        .sidebar * {
            color: var(--font-norm);
        }
		.sidebar *,
		.main *:not([data-testid="status-container"] *,[href="https://docs.proton.me/u/1/doc"],[href="https://docs.proton.me/u/1/sheet"],[href="https://docs.proton.me/u/1/sheet"] span) {
            color: white !important;
        }

		svg:not(.apps-dropdown-logo-wrapper > svg):not([href="https://docs.proton.me/u/1/doc"] svg):not([href="https://docs.proton.me/u/1/sheet"] svg) path {
            fill: var(--font-norm);
        }

		[data-testid="dropdown-button"]:has([data-testid="apps-dropdown-item"]) {
			border: 0;
		}
		.apps-dropdown-app-name {
			color: var(--font-weak);
		}
		.apps-dropdown-item:hover .apps-dropdown-app-name {
			color: var(--font-norm) !important;
		}
		[data-testid="dropdown-button"]:has([data-testid="apps-dropdown-item"]) > .dropdown-content::after,
		[data-testid="dropdown-button"]:has([data-testid="apps-dropdown-item"]) > .dropdown-content::before {
			display: none;
		}

		[alt="Empty state illustration"] ~ p {
			max-width: 100%;
		}

		/* Search */
		.input {
			background: var(--bg-search);
		}

		/* Doc */
		[href="https://docs.proton.me/u/1/doc"] {
			border-color: #4695f3 !important;
			color: #4695f3 !important;
		}
		[href="https://docs.proton.me/u/1/doc"] > svg {
			stroke: #4695f3 !important;
		}

		/* Sheet */
		[href="https://docs.proton.me/u/1/sheet"] {
			border-color: #21B263 !important;
			color: #21B263 !important;
		}
		[href="https://docs.proton.me/u/1/sheet"] > svg {
			stroke: #21B263 !important;
		}

		/* Sheet new */
		[href="https://docs.proton.me/u/1/sheet"] span {
			color: var(--font-proton);
		}
    }
}

@-moz-document domain("drive.proton.me") {
    /* Proton Drive */
	/* Versions */
	@media screen and (min-width: 900px) {
		header.header > div:nth-of-type(1)::after {
			left: -14%;
		}
		header.header > div:nth-of-type(1)::before {
			left: 13%;
		}
	}
}

@-moz-document domain("lumo.proton.me") {
    /* Proton Lumo */
	/* Versions */
	@media screen and (min-width: 900px) {
		header > div:nth-of-type(1)::after,
		header > div:nth-of-type(1)::before {
			background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
            background-clip: text;
            color: transparent;
			display: block;
            font-family: inherit;
            font-size: 1.2rem;
			line-height: calc(60px / 2);
            pointer-events: none;
            position: absolute;
            text-align: center;
			top: 0;
            width: 100vw;
            white-space: pre-line;
            z-index: 9999;
		}
        header > div:nth-of-type(1)::after {
            content: var(--themeversion) '\A Help: ' url("https://code.breat.fr/share/images/icons/discord.png") var(--help);
			left: -10%;
        }
		header > div:nth-of-type(1)::before {
            content: 'Install & Infos: ' url("https://code.breat.fr/share/images/icons/breat.fr.png") var(--install) '\A Support me: ' url("https://code.breat.fr/share/images/icons/ko-fi.png") var(--support1) url("https://code.breat.fr/share/images/icons/paypal.png") var(--support2);
            left: 25%;
        }
    }

    svg {
        min-height: fontsize !important;
        min-width: fontsize !important;
    }

    .markdown-rendering li,
    .markdown-rendering p,
    .markdown-rendering td {
        font-size: fontsize;
        line-height: 1.5;
    }
    .conversation-header {
        font-size: calc(var(--fontsize) + .2rem) !important;
        font-weight: bold;
        line-height: 1.5;
    }

    .user-msg-container {
        border: 1px solid var(--border-norm);
        border-color: var(--border-weak) !important;
        border-radius: var(--border-radius-xl) !important;
    }

    header::before {
        content: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 64 64' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='mask0_26_114' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='0' y='0' width='64' height='64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23EFEBFF'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_26_114)'%3E%3Cpath d='M42.4499 12.1097L49.6457 7.48831C52.1406 5.8859 55.4516 7.43191 55.8298 10.3713L57.5715 23.9337L42.4465 12.1097H42.4499Z' fill='%236D4AFF'/%3E%3Cpath d='M22.9165 12.1097L15.7206 7.48831C13.2257 5.8859 9.91475 7.43191 9.53654 10.3713L7.7948 23.9337L22.9198 12.1097H22.9165Z' fill='%236D4AFF'/%3E%3Cpath d='M13.735 12.9391L17.2284 15.1851L11.5321 19.0136L12.2222 13.6424C12.3151 12.9225 13.1246 12.5476 13.7317 12.9391H13.735Z' fill='%234A2DC5'/%3E%3Cpath d='M51.0915 12.9391L47.598 15.1851L53.2944 19.0136L52.6043 13.6424C52.5114 12.9225 51.7019 12.5476 51.0948 12.9391H51.0915Z' fill='%234A2DC5'/%3E%3Cpath d='M62.5401 38.1462C62.5401 51.9873 46.1147 56.9206 32.413 56.9206C20.37 56.9206 2.28577 51.9873 2.28577 38.1462C2.28577 24.3052 15.7752 10.3148 32.413 10.3148C49.0508 10.3148 62.5401 24.3052 62.5401 38.1462Z' fill='%236D4AFF'/%3E%3Cpath d='M47.1845 42.6603C52.1662 40.5117 54.6588 35.1856 52.7519 30.7641C50.845 26.3426 45.2606 24.5 40.2788 26.6486C35.2971 28.7972 32.8044 34.1233 34.7114 38.5448C36.6183 42.9663 42.2027 44.8088 47.1845 42.6603Z' fill='white'/%3E%3Cpath d='M34.418 33.0505C35.4099 27.875 41.0499 24.4877 46.1358 25.2773C51.6463 26.0171 55.3653 31.594 52.8705 36.7994C53.4809 34.4472 53.1658 31.8926 51.7691 29.9187C47.2637 23.6484 37.0488 26.2328 34.418 33.0505Z' fill='%234129A3'/%3E%3Cpath d='M24.7442 38.542C26.6511 34.1205 24.1585 28.7944 19.1768 26.6458C14.195 24.4973 8.61062 26.3398 6.70368 30.7613C4.79674 35.1828 7.28936 40.5089 12.2711 42.6575C17.2529 44.8061 22.8373 42.9635 24.7442 38.542Z' fill='white'/%3E%3Cpath d='M46.5833 39.8431C48.3991 39.8431 49.871 37.4443 49.871 34.4852C49.871 31.5261 48.3991 29.1273 46.5833 29.1273C44.7675 29.1273 43.2955 31.5261 43.2955 34.4852C43.2955 37.4443 44.7675 39.8431 46.5833 39.8431Z' fill='%234129A3'/%3E%3Cpath d='M18.7383 40.2558C20.5541 40.2558 22.0261 37.857 22.0261 34.8979C22.0261 31.9387 20.5541 29.5399 18.7383 29.5399C16.9225 29.5399 15.4506 31.9387 15.4506 34.8979C15.4506 37.857 16.9225 40.2558 18.7383 40.2558Z' fill='%234129A3'/%3E%3Cpath d='M25.0387 33.0505C22.4079 26.2328 12.1929 23.6484 7.68763 29.9187C6.29423 31.8893 5.97574 34.4472 6.58618 36.7994C4.08803 31.5874 7.80706 26.0171 13.3209 25.2773C18.4068 24.4877 24.0501 27.875 25.0387 33.0505Z' fill='%234129A3'/%3E%3Cpath d='M26.7131 42.4526C27.814 42.4526 28.7027 43.3446 28.7027 44.4422' stroke='white' stroke-width='0.577346' stroke-miterlimit='10' stroke-linecap='round'/%3E%3Cpath d='M30.6947 42.4526C29.5939 42.4526 28.7052 43.3446 28.7052 44.4422' stroke='white' stroke-width='0.577346' stroke-miterlimit='10' stroke-linecap='round'/%3E%3Cpath opacity='0.7' d='M21.074 33.3022C21.7593 33.3022 22.3148 32.7467 22.3148 32.0614C22.3148 31.3761 21.7593 30.8206 21.074 30.8206C20.3888 30.8206 19.8333 31.3761 19.8333 32.0614C19.8333 32.7467 20.3888 33.3022 21.074 33.3022Z' fill='white'/%3E%3Cpath opacity='0.7' d='M48.9189 32.8895C49.6041 32.8895 50.1597 32.334 50.1597 31.6487C50.1597 30.9634 49.6041 30.4079 48.9189 30.4079C48.2336 30.4079 47.6781 30.9634 47.6781 31.6487C47.6781 32.334 48.2336 32.8895 48.9189 32.8895Z' fill='white'/%3E%3C/g%3E%3C/svg%3E");
        display: inline-block;
        margin-right: .5em;
    }

    .avatar-and-notice__notice::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-lock-icon lucide-lock'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
        content: "";
        display: inline-block;
        height: fontsize;
        margin-right: .3em;
        vertical-align: middle;
        width: fontsize;
    }
    .avatar-and-notice__notice {
        color: white;
    }

    if avatar {
        [data-testid="heading:userdropdown"] > span:nth-of-type(2) > span,
        .user-initials-active > span {
            display: none;
        }
        [data-testid="heading:userdropdown"] > span:nth-of-type(2) {
            border: 0;
            padding: 0;
        }
        [data-testid="heading:userdropdown"] > span:nth-of-type(2)::before {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
            padding: 0;
            width: 32px;
        }
        .user-initials-active {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
            padding: 0;
            width: 3.4rem;
        }
    }

    if hideplus {
        .chat-history-upsell,
        .navigation-item:has(.lumo-plus-button),
 		.navigation-item:has([href="https://account.proton.me/u/1/lumo/dashboard?addon=lumo"]) {
            display: none;
        }
    }

	if carbontheme {
		header,
		.sidebar {
			background: var(--bg-lowered);
		}
	}

    if widemode {
        /* General */
        [style="--max-w-custom:46.5rem;"],
        [style="--max-w-custom: 46.5rem;"],
        [style="--max-w-custom:51.25rem;"],
        [style="--max-w-custom: 51.25rem;"],
        [style*="--md-max-w-custom:90%;"],
        [style*="--md-max-w-custom: 90%;"],
        [style*="--lg-max-w-custom:43rem;"],
        [style*="--lg-max-w-custom: 43rem;"] {
            max-width: 100% !important;
            padding-left: 1em;
            padding-right: 1em;
            width: 100% !important;
        }

        /* Welcome message */
        .main-text-container > h1 {
            margin: auto;
        }

        /* Conversation header */
        .conversation-header > div {
            margin: auto;
            overflow: hidden;
            position: relative;
            width: 100%;
        }
        .conversation-header > div > div:nth-of-type(1) {
            justify-content: center;
            position: relative;
            width: 100%;
        }
        .conversation-header > div > div:nth-of-type(1) > span {
            width: 100%;
        }
        .conversation-header > div > div:nth-of-type(1) > span > button {
            text-overflow: unset !important;
        }
        .conversation-header > div > div:nth-of-type(2) {
            position: absolute;
            right: 1em;
        }

        /* Bubbles */
        .assistant-msg-container {
            margin-left: 0;
            max-width: 80% !important;
            width: auto !important;
        }
        .user-msg-container {
            margin-right: 0;
            max-width: 80% !important;
            width: auto !important;
        }
        .user-msg-container > div:nth-of-type(1) {
            width: 100%;
        }
        .user-msg-container > div:nth-of-type(2) {
            border-radius: 0 0 1em 1em;
        }

        .file-card {
            width: auto;
        }
        .upload-menu {
            min-width: 225px !important;
        }

        .lumo-plus-settings-gradient > div:nth-of-type(1) {
            flex-basis: calc(100% - 250px);
        }
        .lumo-plus-settings-gradient > div:nth-of-type(2) {
            align-items: center !important;
            width: 200px !important;
            justify-content: center !important;
        }
        .lumo-plus-settings-gradient ul li span {
            text-overflow: initial !important;
            overflow: auto !important;
        }

		.text-wrap-balance {
			text-wrap: unset;
		}

		/* Import file */
		div.dropdown-content:has(.dropdown-item-button:not([class*=bg-])) {
			display: flex;
			flex-direction: column;
			width: auto;
		}
		.dropdown-item-button:not([class*=bg-]) > div {
			flex-wrap: nowrap;
			justify-content: space-evenly;
		}
    }
}

@-moz-document domain("mail.proton.me") {
    /* Proton Mail */
	/* Versions */
	@media screen and (min-width: 900px) {
		header.header .topnav-container {
			background-color: var(--bg-norm);
			margin-top: 0 !important;
			line-height: 60px;
			z-index: 9999;
		}
		header.header > div:nth-of-type(1)::after {
			left: -14%;
		}
		header.header > div:nth-of-type(1)::before {
			left: 14%;
		}
	}

    if fixtop {
        .app-root {
            margin-bottom: 0 !important;
        }
    }

    if hideleftnav {
        .sidebar-collapse-button-container--above-scroll {
            display: none;
        }
    }

	/* Labels */
	ul.unstyled.navigation-list:last-child {
		padding-bottom: 0;
	}
    if hidelabels {
        ul.unstyled.navigation-list > li:has([data-shortcut-target="toggle-labels"]) {
            display: none;
        }
    }
	li.navigation-item--label,
 	ul.unstyled.navigation-list > div.py-2.ml-7.text-sm.color-weak {
		padding-left: 1.75em;
	}

    if hideless {
        ul.unstyled.navigation-list > div:nth-of-type(5) {
            display: none;
        }
    }

    if hidetips {
        .tip-box {
            display: none;
        }
    }

	if folders1st {
		ul.unstyled.navigation-list {
			display: flex;
			flex-direction: column;
		}
		ul.unstyled.navigation-list > li:nth-of-type(2) {
			order: 0;
		}
		ul.unstyled.navigation-list > li:nth-of-type(1) {
			order: 1;
		}
		ul.unstyled.navigation-list > div:nth-of-type(10) {
			order: 2;
		}
	}

	/* View */
	ul.unstyled.navigation-list > div:nth-of-type(10) {
		padding-left: 1.75em;
	}
	if hideview {
		ul.unstyled.navigation-list > li:nth-of-type(1) {
			display: none;
		}
	}

    if nospace {
		ul.unstyled.navigation-list {
			padding-bottom: 0 !important;
		}
        ul.unstyled.navigation-list > li:nth-of-type(1),
 		ul.unstyled.navigation-list > li:nth-of-type(2),
 		ul.unstyled.navigation-list > li:has([data-shortcut-target="toggle-labels"]) {
            margin-top: 0;
        }
    }

    if carbontheme {
        #proton-editor-container,
        #proton-editor-toggle-container,
        #proton-root,
        #proton-root *,
        #rooster-editor,
        #rooster-editor div,
        #rooster-editor p,
        .composer-content--rich-edition,
        .message-content,
        .message-iframe *,
        .protonmail_quote,
        blockquote div,
        blockquote *,
        iframe {
            background-color: var(--email-message-view-background-color) !important;
            color: var(--font-norm) !important;
        }

        blockquote {
            border-bottom-color: var(--border-weak) !important;
            border-left: 3px solid var(--border-weak) !important;
            border-right-color: var(--border-weak) !important;
            border-top-color: var(--border-weak) !important;
        }

        #ellipsis > svg {
            stroke: var(--font-norm) !important;
        }

        /* Signature color */
        .protonmail_signature_block-user,
        .protonmail_signature_block-user table div,
        .protonmail_signature_block-proton {
            color: var(--font-norm) !important;
        }

        /* Link color */
        #rooster-editor a,
        .protonmail_signature_block-user a,
        .protonmail_signature_block-proton a {
            color: #657ee4 !important;
        }

        /* Message list */
        .items-column-list-inner--mail {
            background-color: var(--email-message-view-background-color) !important;
        }
        .item-container:hover {
            box-shadow: var(--shadow-raised);
        }
        .item-container.read {
            background-color: var(--email-message-view-background-color) !important;
            color: var(--email-item-read-text-color) !important;
        }
        .item-container.unread {
            background-color: var(--email-item-unread-background-color) !important;
            color: var(--email-item-unread-text-color) !important;
        }
        .item-container.item-is-selected {
            background-color: var(--email-item-selected-background-color) !important;
            color: var(--email-item-selected-text-color) !important;
        }

        /* Settings */
        .quickSettings,
        .quickSettings .footer,
        .quickSettings .header--drawer {
            background-color: var(--email-message-view-background-color) !important;
        }

        /* Apps dropdown menu */
        ul[style="--apps-dropdown-repeat: 3;"] {
            display: flex !important;
            flex-flow: wrap;
            justify-content: space-evenly;
        }
    }

    /* Images in emails */
    .rio-asin-container-image img {
        mix-blend-mode: normal !important;
    }

    .sidebar {
        inline-size: 260px !important;
    }
}

@-moz-document domain("pass.proton.me") {
    /* Proton Pass */
	/* Versions */
	@media screen and (min-width: 900px) {
		header > div:nth-of-type(1)::after {
			display: none !important;
		}
		header > div:nth-of-type(1)::before {
			display: none !important;
		}
		header.header::after,
		header.header::before {
			background: linear-gradient(88.55deg, rgb(139, 109, 255) 22.43%, rgb(254, 132, 132) 92.28%);
			background-clip: text;
			color: transparent;
			display: block;
			font-family: inherit;
			font-size: 1.2rem;
			line-height: calc(50px / 2);
			pointer-events: none;
			position: fixed;
			text-align: center;
			top: 0;
			width: 100vw;
			white-space: pre-line;
			z-index: 10;
		}
		header.header::after {
			content: var(--themeversion) '\A Help: ' url("https://code.breat.fr/share/images/icons/discord.png") var(--help);
			left: -25%;
		}
		header.header::before {
			content: 'Install & Infos: ' url("https://code.breat.fr/share/images/icons/breat.fr.png") var(--install) '\A Support me: ' url("https://code.breat.fr/share/images/icons/ko-fi.png") var(--support1) ' · ' url("https://code.breat.fr/share/images/icons/paypal.png") var(--support2);
			left: 10%;
		}

		[data-testid="input-root"] {
			max-width: 300px;
		}
		[data-testid="input-root"] + button {
			margin-left: auto;
		}
	}

    if avatar {
        .avatar {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
            padding: 0;
            width: 32px;
        }
    }
}

@-moz-document domain("account.protonvpn.com") {
    /* Proton VPN */
	/* Version */
	@media screen and (min-width: 900px) {
		header.header > div:nth-of-type(1)::after {
			left: -25%;
		}
		header.header > div:nth-of-type(1)::before {
			left: 10%;
		}
	}
}

@-moz-document domain("wallet.proton.me") {
    /* Proton Wallet */
	@media screen and (min-width: 900px) {
		header.header {
			height: 60px;
		}
		header.header > div:nth-of-type(1)::after {
			left: -30%;
		}
		header.header > div:nth-of-type(1)::before {
			left: 15%;
		}
	}

    if avatar {
        [data-testid="heading:userdropdown"]::before {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            display: inline-flex;
            height: 38.19px;
            order: 1;
            width: auto;
        }
        .user-initials-active {
            aspect-ratio: 1 / 1;
            background: url(avatarurl) center center / cover no-repeat;
            border-radius: .5em;
            content: "";
            height: auto;
            margin: auto;
            padding: 0;
            width: 3.4rem;
        }
    }

    .sidebar {
        width: auto;
    }
}

@-moz-document regexp("(chrome|moz)-extension://.+") {
/* ===================================================
    Stylus popup
=================================================== */
    html:has([href*="domain=proton.me"]):has(label:nth-of-type(20):last-of-type) {
        /* Title */
        #stylus-popup #message-box-title {
            width: 100%;
        }
        /* Input content */
        #stylus-popup #message-box .config-body > label input {
            border-radius: .5em;
            text-align: center;
        }

        /* Range */
        #stylus-popup #message-box .config-body > label span:nth-of-type(2) {
            text-align: right;
        }

        /* Color picker size */
        #stylus-popup #message-box .config-body > label .colorview-swatch,
        #stylus-popup #message-box .config-body > label .colorview-swatch a,
        #stylus-popup #message-box .config-body > label .colorview-swatch::before {
            border-radius: .5em;
        }

        /* Select size */
        #stylus-popup #message-box .config-body > label select {
            border-radius: .5em;
            text-align: center;
        }

        /* Fake spaces to improve presentation */
        /* Whole website */
        #stylus-popup #message-box .config-body > label:nth-of-type(1) input,
        /* Lumo */
        #stylus-popup #message-box .config-body > label:nth-of-type(7) input,
		/* MMail */
        #stylus-popup #message-box .config-body > label:nth-of-type(11) input {
            height: 0;
            max-width: 0;
            min-width: 0;
            opacity: 0;
            padding: 0;
            pointer-events: none;
            width: 0;
        }

        /* Avoid move when click on fake titles */
        #stylus-popup #message-box .config-body > label:nth-of-type(1),
        #stylus-popup #message-box .config-body > label:nth-of-type(7),
        #stylus-popup #message-box .config-body > label:nth-of-type(11) {
            pointer-events: none;
        }

        /* Bigger lines for fake titles */
        #stylus-popup #message-box .config-body > label:nth-of-type(1) *,
        #stylus-popup #message-box .config-body > label:nth-of-type(7) *,
        #stylus-popup #message-box .config-body > label:nth-of-type(11) * {
            line-height: 3;
        }

        /* Center fake titles */
        #stylus-popup #message-box .config-body > label:nth-of-type(1) span,
        #stylus-popup #message-box .config-body > label:nth-of-type(7) span,
        #stylus-popup #message-box .config-body > label:nth-of-type(11) span {
            margin-right: 0;
            min-width: 100%;
            text-align: center;
        }
    }
}
