/* 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;
}

h1 {
	font-family: Futura, "Trebuchet MS", Arial, sans-serif;
	font-size: 28px;
	font-style: normal;
	font-variant: normal;
	font-weight: 800;
	line-height: 28px;
}

h3 {
	font-family: Futura, "Trebuchet MS", Arial, sans-serif;
	font-size: 17px;
	font-style: normal;
	font-variant: normal;
	font-weight: 700;
	line-height: 23px;
}

p {
	font-family: Futura, "Trebuchet MS", Arial, sans-serif;
	font-size: 14px;
	font-style: normal;
	font-variant: normal;
	font-weight: 400;
	line-height: 23px;
}

blockquote {
	font-family: Futura, "Trebuchet MS", Arial, sans-serif;
	font-size: 17px;
	font-style: normal;
	font-variant: normal;
	font-weight: 400;
	line-height: 23px;
}

pre {
	font-family: Futura, "Trebuchet MS", Arial, sans-serif;
	font-size: 11px;
	font-style: normal;
	font-variant: normal;
	font-weight: 400;
	line-height: 23px;
}

.hidden {
	display: none !important;
}

/* end global styles */

/* view transitions */
@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;

	&>footer {
		text-align: center;
		background-color: #bb070e;
		border-top: 1px groove #0060aa;
		color: #ffed10;
		display: block;
		position: fixed;
		bottom: 0;
		width: 100vw;
		margin-top: 3em;
		padding: 1em;

		a[href] {
			color: #34f9fe
		}		
	}
}

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

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

	.home-logo {
		flex: 0;
	}

	h1 {
		text-shadow: 0px 0px 0 rgb(231, 231, 231),
			-1.5px -1px 0 rgb(0, 0, 0),
			-3px -2px 0 rgb(202, 0, 0),
			-4.5px -3px 0 rgb(187, 0, 0),
			-6px -4px 0 rgb(173, 0, 0),
			-7.5px -5px 2px rgba(0, 0, 0, 0.6),
			-7.5px -5px 1px rgba(0, 0, 0, 0.5),
			0px 0px 3px rgba(0, 0, 0, .2);
		color: white;
		font-variant: small-caps;

		/* margin-right: 64px; */
    	text-align: center;
	}

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

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

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

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

main {
	height: 88vh;
	overflow-y: scroll;
	overflow-x: hidden;
	display: flex;
	flex-direction: column;
	gap: 0.5em;
	padding: 0.5em;
	
	background: white;
	color: black;

	#activity-list, #record-feed {
		display: flex;
		flex-direction: column;
		gap: 0.5em;
	}
}

/* #activity-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;
}

.activity, .record {
    border-radius: 5px;
    padding: 1.5em;
    font-size: 1em;
	background-color: white;

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

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

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

	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 #0060aa;
	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 #0060aa;
    border-radius: 5px;
    padding: 1.5em;
    font-size: 1em;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

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;
	}
}

dialog {
	width: 95vw;
	height: 50vh;
	padding: 0;
	border-radius: 5px;

	form {
		background-color: #0060aa;
		height: 100%;
		position: absolute;
		width: 100%;
		padding: 1em;

		display: flex;
        flex-direction: column;
        align-items: center;

		h1,h2,h3,h4, label {
			color: white;
		}

		fieldset {
			border: none;
			flex: 1;
			display: flex;
			flex-direction: column;
			gap: 1em;
		}

		input, button, select {
			font-size: large;
		}
	}

	#close-modal {
		position: absolute;
		right: 1em;
		top: 1em;
		z-index: 1;
		background: none;
		border: none;
		color: white;
		padding: 0;
		box-shadow: none;

		img {
			height: 2em;
			width: 2em;
		}
	}
}