html{
	height: 100%;
	font-family: Ubuntu, Arial;
	--bg: #fff;
	overscroll-behavior: none;
}

@media (prefers-color-scheme: dark){
	html{
		background: #111;
		color: #fff;
		--bg: #111;
	}
}

body{
	height: 100%;
	display: flex;
	margin: 0;
	font-size: 18px;
}

#emails:empty:before{
	content: "You're all caught up!";
	opacity: 0.5;
	text-align: center;
}

*{
	touch-action: pan-x, pan-y;
	box-sizing: border-box;
	user-select: none;
	-webkit-user-select: none;
	flex-shrink: 0;
}
span{ flex: 1; word-break: break-word; }

[hidden]{ display: none !important; }

#left, #middle{
	width: 300px;
	background: #8881;
	display: flex;
	flex-flow: column;
	padding: 20px;
	gap: 10px;
	overflow-y: auto;
	scrollbar-width: 0;
}
::-webkit-scrollbar{ display: none; }
#middle{ padding: 0; gap: 0 }
#middle > h1{ padding: 20px; margin-bottom: 10px; }
#left{
	background: #8882;
}

btn{
	display: block;
	min-height: 40px;
	padding: 6px 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	border-radius: 10px;
	border: 2px #0000 solid;
	gap: 8px;
	-webkit-tap-highlight-color: #0000;
	--bg: #0000;
	background-color: var(--bg);
}
btn:hover{
	background: var(--accent8);
	border: 2px var(--accent4) solid;
}
btn:active{
	background: var(--accent2);
}
svg{
	color: var(--accent);
	width: 18px; height: 18px;
}

.email.email{
	border-left: 0; border-right: 0;
	border-radius: 0;
	padding: 12px;
}
.email:not(.unread) > svg{ color: var(--accent4); }
.email:nth-child(2n){ --bg: #8080801a; }

h1, h2, h3, h4, h5, h6{ margin: 0; }
[middle]{ justify-content: center; }
[grow]{ flex: 1; }
right{ display: flex; flex-flow: row; }
left{ display: flex; flex-flow: row-reverse; }
up{ display: flex; flex-flow: column; }
down{ display: flex; flex-flow: column-reverse; }

#popup{
	position: fixed;
	inset: 0;
	width: 100%;
	height: calc(100% + 100px);
	background: #0008;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .5s cubic-bezier(0.25, 1, 0.25, 1);
	padding-bottom: 100px;
}

.floating{
	border: var(--accent) 2px solid;
	border-radius: 20px;
	padding: 40px;
	background: var(--bg);
	min-width: 400px;
	display: flex;
	flex-flow: column;
	align-items: stretch;
	gap: 20px;
}

input, select, textarea{
	padding: 4px;
	margin: 0;
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	outline: none;
	-webkit-tap-highlight-color: #0000;
	border-bottom: var(--accent) 2px solid;
}

form{ display: contents; }

:disabled{ opacity: 0.5; cursor: not-allowed; }
label{
	border-bottom: var(--accent) 2px solid;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px;
}
label > input, label > select{
	padding: 0;
	border: 0;
	flex: 1;
}
label > :disabled{ opacity: 1; }
label:has(:disabled){ opacity: 0.5; cursor: not-allowed; }

#addacc-error, .acc-options.err{ color: red; }

.account{
	overflow: hidden;
	display: flex;
	flex-flow: column;
	gap: 5px;
}

.account > div, .account > hr{
	margin-left: 20px;
}

.account > btn{
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
}
.account > btn > svg{
	transition: transform .2s cubic-bezier(0.25, 1, 0.25, 1);
}

.acc-options{
	display: flex;
}
.acc-options > btn{
	flex: 1;
}
.acc-options > btn:last-child{ display: none; }
.acc-options.err > btn{ display: none; }
.acc-options.err > btn:last-child{ display: flex; }

.inbox > div{
	color: #8888;
	font-weight: 600;
	min-width: 20px;
	padding: 0 5px;
	height: 20px;
	border-radius: 10px;
	text-align: center;
	line-height: 20px;
	margin-left: auto;
	font-size: 14px;
}

.selected, .selected:hover{
	background: var(--accent);
	color: var(--contrast);
}
.selected > svg, .selected > div{
	color: var(--contrast) !important;
}

hr{
	background: #8888;
	border: 0; margin: 0;
	align-self: stretch;
	flex-basis: 1px;
}

.has-inline-btn{
	display: flex;
	flex-flow: row;
	justify-content: space-between;
}

.inline-btn{
	align-self: center;
	cursor: pointer;
	padding: .5rem 1rem;
	box-sizing: content-box;
}

.inline-btn:active, .inline-btn.disabled{ opacity: 0.5; }

.bold-button{
	font-weight: 600; font-size: 20px;
}