/* ==UserStyle==
@name           [Oli Bros] Customisation: FastMail
@namespace      The Oliver Bros
@version        0.0.6
@description    Various simplifications and improvements. Depends on Fastmail’s ‘Dark’ theme.
==/UserStyle== */

@-moz-document domain("fastmail.com") {

:root {
	--base-hue: 225;
	--base-shifted-hue: 210;
	--unread-hue: 350;
	--pinned-hue: 180;
	scrollbar-color: hsl(var(--base-shifted-hue), 20%, 18%) hsl(var(--base-hue), 10%, 7%);
}

/*
.v-ListKBFocus {
	opacity: 0;
}
*/

/*
** General
*/

/* Vertically centre page/context name */
.v-MainNavToolbar-appName {
	top: .666rem;
}

/* Remove link underlining */
.u-subtleLink {
	border-bottom: 0;
}

/* Remove no-content graphic */
.v-Empty {
	display: none;
}

/* Main column background colours */
.v-PageHeader {
	background-color: hsl(var(--base-hue), 15%, 8%);
}
.v-Page--sidebar,
.v-ReferralsSource::after {
	background-color: hsl(var(--base-hue), 15%, 8%);
}
.v-Page--contrast {
	background-color: hsl(var(--base-hue), 10%, 13%);
}

/*
** Mail
*/

/* Folders: add rule separators */
.v-MailboxSource {
	border-top: 1px solid hsl(var(--base-hue), 10%, 13%);
}

/* Folders: make font weight consistent */
.v-MailboxSource * {
	font-weight: normal;
}

/* Folders: remove icons */
.v-MailboxSource .app-source .v-Icon {
	display: none;
}

/* Folders: colours */
.v-MailboxSource .app-source {
	background-color: hsl(var(--base-hue), 15%, 10%);
	color: hsl(var(--base-hue), 15%, 50%);
}
.v-MailboxSource .app-source--depth1 {
	color: hsl(var(--base-hue), 15%, 70%);
}
.v-MailboxSource .app-source--depth0 {
	color: hsl(var(--base-hue), 15%, 100%);
}

/* Folders: selected */
.v-MailboxSource .app-source.is-selected {
	font-weight: normal;
	background-color: hsl(var(--base-hue), 13%, 7%);
	color: hsl(var(--base-shifted-hue), 100%, 60%);
}

/* Folders: hover */
.v-MailboxSource .app-source:hover {
	background-color: hsl(var(--base-shifted-hue), 25%, 15%);
}

/* Folders: unread counts */
.v-MailboxSource-badge {
	font-weight: bold;
	background-color: transparent;
	color: hsl(var(--unread-hue), 70%, 65%);
	border: none;
}

/* Threads: typography */
.v-MailboxItem {
	font-weight: normal !important;
}
.v-MailboxItem-name {
	color: hsl(var(--base-shifted-hue), 30%, 50%);
}
.v-MailboxItem-subject {
	color: white;
	font-weight: 600;
}
.v-MailboxItem.is-pinned .v-MailboxItem-subject {
	color: hsl(var(--pinned-hue), 60%, 50%);
}
.v-MailboxItem.is-unread .v-MailboxItem-subject {
	color: hsl(var(--unread-hue), 75%, 65%);
}

/* Threads: improve background colours */
.v-MailboxItem {
	background-color: hsl(var(--base-hue), 8%, 8%);
}
.v-MailboxItem.is-focused,
.v-MailboxItem.is-selected {
	background-color: hsl(var(--base-shifted-hue), 70%, 30%);
}
:is(.v-MailboxItem.is-focused, .v-MailboxItem.is-selected) .v-MailboxItem-name {
	color: white;
}

/* Threads: remove inconsistently-rendering horizontal rules */
/* (threads are absolutely positioned and have height set, so do not scale well) */
.v-MailboxItem * {
	border: 0;
}

/* Threads: hide unread and VIP indicators */
.v-MailboxItem-unread {
	display: none;
}
.v-Mailbox--short .v-MailboxItem-from {
	padding-left: 0 !important;
}

/* Threads: de-emphasise selection checkboxes */
.v-MailboxItem .v-Checkbox.is-unchecked {
	opacity: .5;
}
/* Threads: de-emphasise pin buttons */
.v-MailboxItem:not(.is-pinned) .u-list-pin {
	opacity: .2;
}

/* Message: fix overlapping of horizontal rule */
.v-MessageCard-time, .v-MessageCard-draft, .v-MessageCard-showMore {
	top: 0;
}

}
