:root {
	--color-accent: #1133ff;
}

* {
	box-sizing: border-box;
}

h1 {
	font-size: 1.5rem;
	margin: 0;
}
h2 {
	font-size: 1.2rem;
	margin: 0;
}

html {
	min-height: 100vh;
}

body {
	font-family: sans-serif;
	background-color: #fafafa;
	color: #222;
	line-height: 1.4;

	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;

	margin: 0;
	padding: 0;
}

p {
	margin: 0 0 0.7em;
	word-wrap: break-word;
}
p:last-child {
	margin: 0;
}

.alert {
	background-color: #ffefb4;
	padding: 1rem;
	border: 1px solid #eedfa4;
	border-radius: 0.5rem;
	width: max-content;
	margin: 0 auto;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

header {
	background-color: var(--color-accent);
	color: #fff;
	width: 100%;

	padding: 1rem;
	margin: 0 0 1rem;

	display: flex;
	flex-direction: row;
	align-items: top;

	box-shadow: 0 0px 10px 5px rgba(0, 0, 0, 0.15);
}

header div {
	flex-grow: 1;
	text-align: center;
}
header div > * {
	max-width: 40rem;
	margin: 0 auto;
}
header div a {
	color: #ccf;
}
header img {
	width: 2rem;
}

.timeline,
.timeline__context,
.signin {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	max-width: 40rem;
	margin-top: 1rem;
}

.timeline__context {
	padding: 0 1rem;
}

.timeline__note,
.timeline__compose,
.signin,
.notification {
	background-color: #fff;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	border-radius: 0.5rem;
}

.timeline__context > .timeline__note {
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.timeline__note > div,
.timeline__note > details {
	padding: 0.5rem;
}

.timeline__compose {
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
	padding: 0.5rem;
}

.timeline__compose form {
	flex-grow: 1;
}

.timeline__compose textarea {
	width: 100%;
	height: 5rem;
	font-family: inherit;
}

.flex--row {
	display: flex;
	flex-direction: row;
}
.flex--grow {
	flex-grow: 1;
}

.note__header {
	border-bottom: 1px solid #ccc;
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
}
.note__name {
	display: flex;
	flex-direction: row;
	gap: 0.3em;
}
.note__reblog {
	color: var(--color-accent);
	font-weight: bold;
	text-wrap-mode: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	margin-bottom: -0.5rem;
}
.note__displayname {
	font-weight: 700;
	text-wrap-mode: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}
.note__header a,
.note__reblog a {
	color: inherit;
	text-decoration: none;
}
.note__attachments img,
.note__attachments video {
	max-width: 100%;
	max-height: 60vh;
}

.note__avatar {
	width: 3rem;
	height: 3rem;
	object-fit: cover;
	border-radius: 0.5rem;
	word-wrap: break-word;
	overflow: hidden;
}

.note__header > div {
	min-width: 0;
}

.note__header time {
	color: #707070;
}

.note__actions {
	display: flex;
	flex-direction: row;
	justify-content: space-evenly;
	align-items: center;
}

.note__actions span,
.note__actions form {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
}

.note__actions button {
	background: none;
	border: none;
	margin: 0;
	padding: 0;
	cursor: pointer;
	height: 24px;
}

.note__actions button[disabled] {
	opacity: 0.3;
	position: relative;
	cursor: default;
}

.note__actions button[disabled]::after {
	display: block;
	content: "";
	background-color: #1f1f1f;

	box-sizing: border-box;
	border: 1.5px solid #fff;
	width: 24px;
	height: 5px;

	position: absolute;
	top: 9.5px;
	rotate: 45deg;
}

.note__spoiler summary {
	color: #cf5f5f;
	cursor: pointer;
	list-style-type: "⚠️ ";
}

.note__spoiler:not([open]) summary::after {
	display: block-inline;
	content: " (click to open)";
	font-style: italic;
	color: grey;
}

.note__emoji {
	height: 1.3em;
	vertical-align: text-bottom;
}

.form__row {
	display: flex;
	flex-direction: row;
}

label {
	font-weight: bold;
	display: block;
}

.signin {
	align-items: center;
	padding: 1rem;
}

footer {
	width: 100%;
	text-align: center;
	margin: 1em 0 0;
	padding: 0.75em 1.5em;
	border-top: 1px solid rgba(0, 0, 0, 0.15);
	background-color: rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

a.header__notifications {
	color: white;
	text-decoration: none;
	position: relative;
}
.header__unread {
	position: absolute;
	top: 0em;
	right: -0.3em;
	width: 1.6em;
	height: 1.6em;
	font-size: 0.75em;
	color: var(--color-accent);
	border: 0.2em solid var(--color-accent);
	background-color: white;
	border-radius: 100%;
}

.notification .note__header {
	padding: 0.5rem;
	border-bottom: none;
}

.notification .timeline__note {
	border: 1px solid rgba(0, 0, 0, 0.15);
	padding: 0;
	margin: 0 0.75rem 0.75rem;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}
.notification .timeline__note .note__actions {
	display: none;
}

.notification--unread {
	background-color: #ffffcc;
}
.notification--unread .timeline__note {
	background-color: #ffffee;
}
