/*Setup {{{*/
@import "fonts.css";
@import "colors.css";

:root {
	--font-logo: clamp(1rem, 0.8rem + 0.8vw, 1.6rem);
	--font-btn: clamp(0.85rem, 0.5rem + 1vw, 1.25rem);
	--header-padding: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
	--gap-size: clamp(0.5rem, 0.3rem + 0.8vw, 1.25rem);
}
*{
	box-sizing: border-box;
	/*outline: 1px solid #ff0000;*/
}
html {
	color-scheme: dark;
	font-size: 16px;
	color: #f0f0f0;
	}

h1 {
	font-size: 2rem;
	margin-bottom: 0px;
}

h2 {
	margin: 0px;
}

img {
	max-width: 100%;
	height: auto;
}
/*}}}*/

body {
	height: 100dvh;
	margin: 0px;
	font-family: 'JetBrains Mono';
	font-weight: 400;
	background-color: var(--bg_regular);
	background-image: url("./assets/bgpattern.png");
	/* background-repeat: no-repeat; */
	background-repeat: repeat;
	background-position: center top;
	/* background-size: cover; */
	background-size: auto;
}

/*GRADIENT OVERLAY {{{*/
.gradientoverlay {
	height: 100dvh;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;

	-webkit-mask-image: linear-gradient(
		to bottom,
		transparent clamp(2.5rem, 1.5rem + 5vw, 3.5rem),
		black clamp(5rem, 3rem + 6vw, 7rem),
		black calc(100% - clamp(2.5rem, 1.5rem + 5vw, 3.5rem)),
		transparent 100%
	);
	mask-image: linear-gradient(
		to bottom,
		transparent clamp(2.5rem, 1.5rem + 5vw, 3.5rem),
		black clamp(5rem, 3rem + 6vw, 7rem),
		black calc(100% - clamp(2.5rem, 1.5rem + 5vw, 3.5rem)),
		transparent 100%
	);
	z-index: 1;
	/*outline: 2px solid #00ff00;*/
	overflow: hidden;
}
.withfooter {
	-webkit-mask-image: linear-gradient(
		to bottom,
		transparent clamp(2.5rem, 1.5rem + 5vw, 3.5rem),
		black clamp(5rem, 3rem + 6vw, 7rem),
		black calc(100% - clamp(5rem, 3rem + 6vw, 7rem)),
		transparent calc(100% - 64px)
	);
	mask-image: linear-gradient(
		to bottom,
		transparent clamp(2.5rem, 1.5rem + 5vw, 3.5rem),
		black clamp(5rem, 3rem + 6vw, 7rem),
		black calc(100% - clamp(5rem, 3rem + 6vw, 7rem)),
		transparent calc(100% - clamp(2.5rem, 1.5rem + 5vw, 3.5rem))
	);
}
/*}}}*/

/*HEADER AND FOOTER {{{*/
header, footer {
	position: fixed;
	width: 100%;
	right: 0;
	left: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	/*grid-template-columns: auto 1fr auto;*/
	/*gap: 16px;*/
	z-index: 10;
	user-select: none;
	align-items: center;
	padding: 0px var(--header-padding);
	/*outline: 2px solid #ff0000;*/
	height: clamp(5rem, 4rem + 5vw, 7rem);
}
header {
	top: 0;
	/*grid-template-columns: minmax(min-content, 1fr) auto 1fr;*/
}
footer {
	bottom: 0;
}


.modulebox {
	/*outline: 2px solid #0000ff;*/
	display:grid;
	grid-auto-flow: column;
	grid-auto-columns: auto;
	gap: 0.5rem;
}
.modulesright {
	direction: rtl;
}
.modulesleft {
	direction: ltr;
	justify-content: start;
}
.modulescenter {
	/*height: clamp(6.05rem, 5rem + 3vw, 7.25rem);*/
}
/*}}}*/

/*LOGO {{{*/
.logo {
	display: flex;
	flex-direction: horizontal;
	align-items: center;
	gap: 0.5rem;
	min-width: 0;
	/*outline: 2px solid #00ff00;*/
	flex-shrink: 1;
	justify-self: start;
}
.logoimage {
	object-fit: contain;
	flex-shrink: 1;
	width: clamp(32px, 4vw + 20px, 64px);
	height: clamp(32px, 4vw + 20px, 64px);
	/*outline: 1px solid #ffff00 !important;*/
	transition: all 0.3s;
}
.logoname {
	font-size: clamp(0.8rem, 0.5rem + 1.5vw, 1.5rem);
	font-weight: 700;
	white-space: nowrap;
	min-width: 0;
	flex-shrink: 1;
	color: var(--text_regular);
	/*border: 2px solid #ff0000;*/
	text-decoration: none;
	transition: all 0.3s;
}
@media (max-width: 720px) {
	.logoname {
		display: none;
	}
}
/*}}}*/

/*BUTTON BOXES {{{*/
.buttonbox {
	display: flex;
	gap: 0.5rem;
	background-color: var(--bg_solid);
	border: 0.25rem solid var(--border_color);
	border-radius: 1rem;
	padding: 0.5rem;
	overflow-x: auto;
}

.buttonlink {
	color: var(--text_regular);
	background-color: transparent;
	text-decoration: none;
	font-size: clamp(0.85rem, 0.5rem + 1vw, 1.25rem);
	font-weight: 600;
	transition: all 0.3s;
	padding: clamp(0.5rem, 0.25rem + 3vw, 1rem);
	border-radius: 0.5rem;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
}
.buttonlink:hover, .buttonlink:active {
	color: var(--text_hover);
	background-color: var(--bg_hover);
}
button {
	border: none;
	font-family: inherit;
}
/*}}}*/

.pagetitle {
	font-size: clamp(1.5rem, 1.25rem + 3vw, 3rem);
	font-weight: 700;
	min-width: 0;
	max-width: 65dvw;
	flex-shrink: 1;
	color: var(--text_regular);
	align-self: center;
	min-height: 0;
	/*padding: 0px;*/
	margin: 0rem;
	overflow-x: auto;
	white-space: nowrap;
	/*outline: 2px solid #00ff00 !important;*/
	transition: all 0.3s;
}


/*MAIN {{{*/
main {
	height: 100%;
	width: 100%;
	overflow:auto;
	/*outline: 2px solid #ff0000 !important;*/
	padding: clamp(5rem, 4rem + 5vw, 7rem) 1rem 2.5rem 1rem;
}
.main-footer {
	padding: clamp(5rem, 4rem + 5vw, 7rem) 1rem;
}
/*}}}*/

.content {
	/*height: 100%;*/
	max-width: 1800px;
	margin-left: auto;
	margin-right: auto;
	word-wrap: break-word;
	/*outline: 2px solid #00ffff;*/
}

/*CCTV PAGE {{{*/
.video_container {
	/*outline: 2px solid #00ff00;*/
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
}
#video_feed {
	border: 0.25rem solid var(--border_color);
	border-radius: 1rem;
	max-height: calc(100vh - 5rem - clamp(10rem, 8rem + 10vw, 14rem));
	width: min(1800px, calc((16 / 9) * (100vh - 5rem - clamp(10rem, 8rem + 10vw, 14rem))));
	height: auto;
	box-sizing: border-box;
	aspect-ratio: 16 / 9;
}
.log {
	border: 0.25rem solid var(--border_color);
	border-radius: 1rem;
	width: fit-content;
	background-color: var(--bg_solid);
	padding: 0.5rem;
	color: var(--text_regular);
}
.log_header {
	/*border: 2px solid #0000ff;*/
}
#log-box {
	border-top: 1px solid var(--border_color);
	border-bottom: 1px solid var(--border_color);
	padding: 0.5rem 0;
	margin: 0.5rem 0;
	text-align: left;
}
.log_button {
	/*border: 2px solid #ff0000;*/
	width: 100%;
}
/*}}}*/
