/* global styles */

:root {
	/* Chrome-only for now but this will allow smooth size transitions */
	interpolate-size: allow-keywords;
}

html {
	box-sizing: border-box;
}

*,
*:before,
*:after {
	box-sizing: inherit;
}

/* end global styles */

/* enable basic view transitions on everything */
@view-transition {
	navigation: auto;
}

body {
	margin: 0;
	padding: 0;

	/* hide burger menu off to the left of the viewport */
	overflow-x: hidden;

	font-family: "Avenir Next", "Avenir", sans-serif;
}

.watermark {
	background-image: url('/logo.svg');
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
}

header.topbar {
	display: flex;
	flex-direction: row;
	align-items: center;
	padding-left: 0.5em;
	padding-right: 0.5em;

	background-color: #f3efe6;
	border-bottom: 2px inset #e3d9c5;
	color: #372e1a;

	.home-logo {
		flex: 0;
	}

	h1 {
		font-family: 'komika_axisregular', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    	text-align: center;
	}

	&>* {
		flex: 1 1 auto;
	}
}

footer.bottombar {
	text-align: center;
	background-color: #b49862;
	border-top: 1px groove #e3d9c5;
	color: #372e1a;
	display: block;
	position: fixed;
	bottom: 0;
	width: 100vw;
	margin-top: 3em;
	padding: 1em;

	a[href] {
		color: #58492a;
	}
}

main {
	height: 88vh;
	overflow-y: scroll;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	padding: 0.5em;
	
	color: #16120b;

	#reading-list {
		display: flex;
		flex-direction: column;
		gap: 0.5em;
	}
}

/* util classes */
.flex {
	display: flex;
}

.flex-column {
	flex-direction: column;
}

.flex-centered {
	align-items: center;
	justify-content: center;
}

.hidden {
	display: none !important;
}

.u-center {
	text-align: center;
}

.u-komikax {
	font-family: 'komika_axisregular', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* view transition stuff (experimental) */

/* #reading-list .activity,
header.activity-header {
	view-transition-name: activity-banner;
} */

header.topbar .home-logo,
header.activity-header back-button {
	view-transition-name: activity-name;
	width: fit-content;
}

.title-outer {
	position: relative;
	transition: all ease 0.5s;

	button {
		background: none;
		border: none;
		box-shadow: none;
		padding: 0;
		position: absolute;
		height: 100%;

		img {
			width: 2em;
		}

		&.delete-button {
			left: -3em;
		}
		&.edit-button {
			right: -3em;
		}
	}

	&.slide-left {
		transform: translateX(-4em);
	}
	&.slide-right {
		transform: translateX(4em);
	}
}

.title {
    border-radius: 5px;
    padding: 0 1.5em;
	background-color: white;

    border: 1px solid;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);

	text-align: center;
	line-height: 2em;
	font-size: larger;

	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	text-decoration: none;
	color: #342a19;

	img {
		flex: 0;
		width: 64px;
	}

	h3 {
		flex: 1 1 auto;
		white-space: nowrap;
	}
}

.activity-header {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	padding-left: 0.5em;
	padding-right: 0.5em;

	background-color: #0099f7;
	border-bottom: 2px inset #e3d9c5;
	color: #ffed10;

	height: 3em;

	.title {
		margin: 0 auto;
		display: flex;
		align-items: center;
		gap: 1em;
	}

	img {
		height: 2em;
	}

	img, h3 {
		flex: 0;
		white-space: nowrap;
		line-height: 2em;
		margin: 0;
	}
}

button {
	border: 1px dashed #e3d9c5;
    border-radius: 5px;
    padding: 1.5em;
    font-size: 1em;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);

	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

dialog, ::backdrop {
	transition: all 0.5s allow-discrete;

	opacity: 0;
}

[open],
[open]::backdrop {
	opacity: 1;

	&::backdrop {
		opacity: 0.8;
	}
}

@starting-style {
	[open] {
		/* width: 0; */
		height: 0;	
		transform: translateY(20px);
	}

	[open],
	[open]::backdrop {
		opacity: 0;
	}
}

/* component manages its own visibility */
update-notification {
	display: none;
}
  