@font-face {
	font-family: Inter;
	src: url("media/ui/Inter.ttf");
}

@font-face {
	font-family: Inter Italic;
	src: url("media/ui/Inter Italic.ttf");
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	height: 100%;
	font-family: Inter, sans-serif;
	font-weight: 500;
	font-size: 12px;
	line-height: 1.4;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	min-height: 100%;
	margin: 0;
	font: inherit;
	font-size: 1rem;
	background-color: #caddff;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol {
	margin: 0;
}

img,
picture,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
}

h1 {
	font-size: 2rem;
}

i {
	font-family: Inter Italic;
	font-style: normal;

}

#mobile-blocker {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	height: 100dvh;
    width: 100dvw;
	z-index: 100;
	background: black;
	color: white;
	display: none;
	align-items: center;
	justify-content: center;
}

nav {
	position: fixed;
	top: 28px;
	left: 0;
	width: 260px;
	height: calc(100vh - 28px);
	overflow-y: auto;
}

#music-player {
	position: fixed;
	top: 0;
	left: 0;
	height: 28px;
	width: 100%;
}

#playlist {
	position: fixed;
	top: 28px;
	right: 0;
	width: 360px;
	overflow: auto;
	z-index: 10;
}

main {
	position: fixed;
	top: 28px;
	left: 260px;
	width: calc(100% - 260px);
	max-width: calc(100% - 260px);
	bottom: 0;
	overflow-y: auto;
	padding: 16px;
}

a {
	color: #0041b3;
	cursor: pointer;
	text-decoration: underline;
	font-weight: bold;
}

.hidden {
	display: none;
}

.active:after {
	font-family: Arial, sans-serif;
	content: "🡨";
	font-size: 10px;
	padding-left: 2px;
}

/*NAV*/

nav {
	background-color: white;
	padding: 16px;
	border-right: 1px solid #0041b3;
}

nav a {
	text-decoration: none;
}

nav a:hover {
	text-decoration: underline;
}

nav li {
	margin-bottom: 0;
}

nav ul {
	list-style: none;
	padding-left: 2px;
}

nav ul ul {
	padding-left: 24px;
	position: relative;
}

nav ul ul:before {
	content: "";
	display: inline-block;
	position: absolute;
	height: 100%;
	width: 1px;
	left: 14px;
	background-color: #0041b3;
}

.dead {
	color: #797979;
}

.dead:hover {
	text-decoration: none;
	cursor: default;
}

/*MAIN*/

.column {
	width: 380px;
	height: fit-content;
	display: flex;
	flex-direction: column;
	position: relative;
}

article {
	border-radius: 3px;
	background-color: white;
	border: 1px solid #0041b3;
	overflow: hidden;
}

article p {
	padding: 4px 16px;
}

article > *:not(img):first-child {
	padding-top: 16px;
}

article > *:not(img):last-child {
	padding-bottom: 16px;
}

article h1 {
	font-size: 18px;
	font-weight: 700;
	padding: 4px 16px;
	color: #0041b3;
}

.in-margin {
	margin-left: 16px;
	margin-right: 16px;
	border-radius: 3px;
	border: 1px solid #0041b3;
	overflow: hidden;
}

article ul, .content ul {
	padding: 4px 16px;
	list-style-position: inside;
}

article li:not(:last-child), .content ul:not(:last-child) {
	margin-bottom: 4px;
}

.h2box:first-child {
	margin-top: 16px;
}

.h2box {
	display: flex;
	gap: 2px;
	padding: 4px 0;
}

h2 {
	font-size: 14px;
	font-weight: 700;
	color: #0041b3;
}

.line1 {
	background-color: #0041b3;
	width: 14px;
	height: 1px;
	margin-top: 10px;
}

.line2 {
	background-color: #0041b3;
	flex-grow: 1;
	height: 1px;
	margin-top: 10px;
}

.annotated {
	cursor: help;
	text-decoration: underline;
	text-decoration-style: dotted;
	text-decoration-color: #0041b3;
}

#tooltip {
	position: fixed;
	visibility: hidden;
	background-color: white;
	border: 1px solid #0041b3;
	border-radius: 3px;
	padding: 4px 6px;
	z-index: 1;
}

.annotation {
	display: none;
}

.foods-container {
	padding: 16px;
}

.food {
	border: 1px solid #0041b3;
	border-radius: 3px;
	padding: 6px 6px 0 6px;
	display: inline-block;
	margin-bottom: 16px;
	box-shadow: 5px 5px 10px #d4d4d4;
}

.food img {
	border-radius: 3px;
}
.post {
	width: 360px;
	margin-bottom: 20px;
	position: relative;
	overflow: visible;
}

.limited-to-700 {
	max-height: 700px;
	overflow: hidden;
}

.shrunk {
	height: 400px;
}

.read-less::after {
	display:none;
}

.post-front, .post-back {
	width: 100%;
	transition: transform 0.3s ease;
	backface-visibility: hidden;
	display: flex;
	flex-flow: column nowrap;
	border: 1px solid #0041b3;
	border-radius: 3px;
	background-color: white;
}

.post-back {
	position: absolute;
	top: 0;
	left: 0;
	transform: perspective(1000px) rotateY(180deg);
}

.content {
	position: relative;
}

.content > * {
	flex-shrink: 0;
}

.post-back.flipped {
	transform: perspective(1000px) rotateY(0deg);
}

.post-front {
	transform: perspective(1000px) rotateY(0deg);
}

.post-front.flipped {
	transform: perspective(1000px) rotateY(-180deg);
}

.content p, .tags-area, .content h1 {
	padding: 4px 6px;
}

pre {
	margin: 0!important;
}

.content h1 + p {
	padding-top: 0!important;
}

.content img:not(.play-audio):not(.pause-audio):not(p img) {
	display: block;
	max-width: 100%;
	height: auto;
	background-color: black;
	background-image: url("media/ui/throbber.gif");
	background-size: 20px;
	background-repeat: no-repeat;
	background-position: center;
}

.content p img {
	display: inline!important;
	vertical-align: bottom;
}

.info-bar {
	height: 21px;
	padding-top: 3px;
	flex-shrink: 0;
	position: relative;
	cursor: pointer;
	border-bottom: 1px solid black;
	background-color: #0041b3;
	color: white;
}

.post-back .info-bar {
	background-color: #002a73;
}

.read-more {
	text-align: center;
	padding: 1px;
	flex-shrink: 0;
	cursor: pointer;
	background-color: #0041b3;
	border-top: 1px solid #0041b3;
	color: white;
}

.read-more::after {
	content: "";
	position: absolute;
	width: 100%;
	height: 12%;
	bottom: 17px;
	left: 0;
	background: linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255)), linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255));
	cursor: default;
	z-index: 8;
}

.timestamp {
	margin-top: -1px;
	margin-left: 6px;
	color: var(--primary-bg);
}

.info-button {
	position: absolute;
	right: 4px;
	top: 2px;
	height: 16px;
	width: 16px;
	background-color: white;
	color: #0041b3;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: bold;
	padding-bottom: 1px;
}

.speech {
	position: absolute;
	right: -8px;
	top: -4px;
	height: 21px;
	width: 21px;
}

video {
	display: block;
	max-width: 100%;
	height: auto;
	background-color: black;
	background-image: url("media/ui/throbber.gif");
	background-size: 20px;
	background-repeat: no-repeat;
	background-position: center;
}

.in-flow {
	margin: 4px;
	border-radius: 3px;
}

.lightboxable {
	cursor: zoom-in;
}

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;

    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

#lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
	cursor: default;
}

.flexbox {
	display: flex;
}

.flexbox > img {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* GUESTBOOK */

#guestbook-area {
	margin-top: 10px;
	width: 600px;
	padding-bottom: 0;
}

#guestbook-form input, #guestbook-form textarea, #guestbook-form button {
	border-radius: 3px;
}

.admin:after {
	content: " (Admin)";
	color: #ce3f3f;
}

#comments-container {
	height: fit-content;
	max-height: 500px;
	overflow-y: scroll;
	border-top: 1px solid black;
}

.guestbook-item {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	padding: 10px 16px;
	border-bottom: 1px solid #a5bbe1;
}

.guestbook-item:last-of-type {
	border-bottom: none;
}

.guestbook-item:nth-child(odd) {
	background-color:#f2f2f2;
}

.item-nickname {
	font-weight: bold;
}

.item-comment {
	width: 100%;
	padding: 10px 16px 5px 16px;
}

#comment-error {
	color:#ce3f3f;
	display: none;
}

#guestbook-form {
	border-top: 1px solid black;
	display: flex;
	flex-flow: column nowrap;
	gap: 8px;
	padding: 16px;
}

#guestbook-form input, #guestbook-form textarea {
	padding: 5px;
}

#nickname-input {
	width: 160px;
	margin-right: 5px;
}

#form-top {
	display: flex;
	justify-content: space-between;
}

#form-top > div {
	display: flex;
	gap: 5px;
	align-items: center;
}

#secret-input {
	width: 160px;
}

#comment-input {
	display: block;
	height: 100px;
	resize: vertical;
}

button {
	width: fit-content;
	padding: 5px 10px;
}

audio {
    width: calc(100% - 12px);
    margin: 0 6px;
}

/*MUSIC PLAYER*/

#music-player {
	background-color: #0041b3;
	display: flex;
	justify-content: space-evenly;
	padding: 5px 10px;
	gap: 10px;
	z-index: 1;
}

#music-player img {
	cursor: pointer;
}

#music-prev, #music-play-pause, #music-next {
	height: 14px;
	position: relative;
	top: 2px;
}

#music-playlist {
	height: 18px;
}

#music-marquee {
	height: 18px;
	width: 260px;
	background-color: white;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
}

#music-full-duration {
	height: 18px;
	background-color: white;
	border-radius: 3px;
	flex-grow: 1;
	overflow: hidden;
}

#music-played-duration {
	height: 18px;
	width: 0;
	background-color: #82a8e9;
}

#playlist {
	background-color: white;
	border-left: 1px solid black;
	border-bottom: 1px solid black;
	padding: 8px;
	overflow-y: auto;
	border-radius: 0 0 0 3px;
	max-height: calc(100vh - 28px);
}

#playlist ul {
	list-style: none;
	padding-left: 5px;
}

#playlist li {
	margin-bottom: 2px;
}

#playlist a {
	text-decoration: none;
}

#playlist a:hover {
	text-decoration: underline;
}

@media (hover: none) {
	html, body {
		overflow: hidden;
		max-height: 100dvh;
	}
	#mobile-blocker {
		display: flex;
	}
	.unblock #mobile-blocker {
		display: none;
	}
}