/*Theme will always be the first imported script*/
@import url('/css/theme.css');

/*Animated "loading" placeholder icon*/
@import url('/css/libs/spinner.css');

@import url('/css/background.css');
@import url('/css/modal.css');
@import url('/css/card.css');
@import url('/css/button.css');
@import url('/css/tooltip.css');
@import url('/css/code.css');

/* Dark overlay styles */
.dark-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	pointer-events: none;
	z-index: 10;
	transition: clip-path 0.3s ease;
	clip-path: polygon(var(--focus-overlay));
}

.dark-overlay>div {
	padding-left: 1rem;
	padding-top: 1rem;
	color: white;
}

#loader {
	position: absolute;
	bottom: 1rem;
	right: 1rem;
}

.notification {
	position: absolute;
	float: right;
	top: 1rem;
	right: 1rem;
	color: var(--secondary);
}

.notif-icon {
	position: absolute;
	float: right;
	top: 0;
	right: 0;
	color: var(--primary-text);
}

.notif-bubble {
	position: absolute;
	top: -.5rem;
	right: -.5rem;
	font-weight: bolder;
	color: var(--secondary);
	background-color: var(--emphasis-text);
	border-radius: 100px;
	height: 1rem;
	min-width: 1rem;
	text-align: center;
	line-height: 1rem;
}

#runtime-errors {
	color: var(--emphasis-text);
	position: absolute;
	top: 0;
	z-index: 8999;
	/* above everything except modals */
}

.runtime-error {
	background-color: rgba(0, 0, 0, 0.4);
}

#pdf-viewer {
	position: fixed;
	top: 0;
	z-index: 8997;
	display: none;
	width: 100%;
	height: 100%;
}

.close-pdf-viewer {
	position: fixed;
	bottom: .5rem;
	left: .5rem;
	z-index: 8998;
	color: white;
	background-color: rgba(0, 0, 0, .75);
	border-radius: 1rem;
	width: 2rem;
	height: 2rem;
	vertical-align: middle;
	text-align: center;
	margin: .5rem;
}

h4 {
	margin-bottom: 0.2rem;
}

h3 {
	margin-bottom: 0.3rem;
}

a {
	color: var(--secondary-text);
}

hr {
	color: var(--suppress-text);
}

.editor {
	outline: none;
	overflow-y: auto;
	padding-left: 48px;
	counter-reset: line;
}

.editor div {
	display: block;
	position: relative;
	white-space: pre-wrap;
}

.editor div::before {
	content: counter(line);
	counter-increment: line;
	position: absolute;
	right: calc(100% + 16px);
	opacity: 0.5;
}

.editor-toolbar {
	background-color: white;
}

.editor-statusbar>.cursor {
	display: none;
}

.editor-preview-side {
	color: black;
}

input {
	height: 1.5rem;
	border: none;
	border-radius: var(--border-radius);
	margin-bottom: 5px;
	transition: all 0.25s ease-in-out;
	min-width: 190px;
}

input[type="checkbox"] {
	transform: translateY(0.27rem);
	min-width: unset;
}

input[type="file"] {
	border-radius: unset;
}

input.wide {
	width: calc(100% - 9.5rem);
}

.invalid {
	background-color: var(--emphasis-text);
}

.invalid-fg {
	color: var(--emphasis-text);
}

.invisible {
	background: none;
	width: 0;
	height: 0;
	border: none;
	color: transparent;
	position: absolute;
	left: -100%;
}

.marquee {
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	position: relative;
}

.marquee p {
	position: absolute;
	width: 100%;
	height: 100%;
	text-align: left;
	animation: marquee-left 10s ease infinite;
	transform: translateX(100%);
}

@keyframes marquee-left {
	0% {
		transform: translateX(0);
	}

	30% {
		transform: translateX(0);
	}

	80% {
		transform: translateX(-150%);
	}

	90% {
		transform: translateX(-150%);
	}

	100% {
		transform: translateX(0);
	}
}

input,
select {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

select {
	height: 1.5rem;
	border: none;
	border-radius: var(--border-radius);
	margin-bottom: 5px;
	background-color: white;
	transition: all 0.25s ease-in-out;
}

select.fit {
	min-width: 190px;
}

select.big {
	height: 3rem;
	font-size: 120%;
}

iframe {
	background-color: #EEEEEE;
	width: 100%;
	height: 200px;
	border: none;
	border-radius: var(--border-radius);
}

textarea {
	border: none;
	border-radius: var(--border-radius);
	width: 100%;
	max-width: 100%;
	margin-bottom: 5px;
	height: 200px;
	transition: all 0.25s ease-in-out;
}

textarea:disabled {
	color: black;
}

.center {
	margin: 0 auto;
	width: 90%;
}

.suppress {
	color: var(--suppress-text);
}

.navbar {
	position: fixed;
	padding-left: .7rem;
	top: 0;
	left: 0;
	z-index: 1;
}

.navbar>button {
	box-shadow: 2px 4px 4px 0 rgba(0, 0, 0, .5);
}

.navbar>.bottom>button {
	box-shadow: 2px 4px 4px 0 rgba(0, 0, 0, .5);
}

/* If iOS, shift navbar icons to the left a bit */
@supports (-webkit-overflow-scrolling: touch) {
	.navbar>button>i {
		margin-left: -0.55rem;
	}

	.bottom>button>i {
		margin-left: -0.55rem;
	}

	.actions>button>i {
		margin-left: -0.55rem;
	}
}

.top {
	top: 0;
}

.left {
	float: left;
}

.bottom {
	position: fixed;
	bottom: 1rem;
}

.right {
	float: right;
}

.hidden {
	opacity: 0;
}

.visible {
	opacity: 1;
}

.fade {
	transition: all 0.25s ease-in-out;
}

.tag {
	display: inline-flex;
	border: 1px solid var(--secondary-text);
	border-radius: var(--border-radius);
	margin-top: 5px;
	margin-right: 5px;
	padding-left: 2px;
	padding-right: 2px;
	cursor: default;
}

.issue-label {
	display: inline-flex;
	border: none;
	border-radius: 1rem;
	margin: 5px;
	padding-left: 0.3rem;
	padding-right: 0.5rem;
	font-size: 10pt;
	font-style: italic;
}

.issue-id {
	font-style: italic;
	color: var(--suppress-text);
	float: right;
	padding-right: .5rem;
}

.clickable {
	cursor: pointer;
}

.emphasis {
	color: var(--emphasis-text);
}

.inline {
	display: inline;
}

/* Truncate text for different screen sizes */
.truncate {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media all and (min-width: 600px) and (max-width: 699px) {
	.truncate {
		max-width: 540px;
	}
}

@media all and (min-width: 500px) and (max-width: 599px) {
	.truncate {
		max-width: 440px;
	}
}

@media all and (min-width: 400px) and (max-width: 499px) {
	.truncate {
		max-width: 340px;
	}
}

@media all and (min-width: 300px) and (max-width: 399px) {
	.truncate {
		max-width: 240px;
	}
}

@media all and (max-width: 299px) {
	.truncate {
		max-width: 140px;
	}
}

blockquote {
	border-left: 3px solid var(--suppress-text);
	padding-left: 1rem;
	margin-left: 0;
	margin-right: 0;
	margin-bottom: 0.3rem;
}

th {
	text-align: left;
}

.gg-spinner.big {
	transform: translateY(5rem) scale(5, 5);
}

@media (pointer: coarse) {
	.gg-spinner.big {
		left: 50%;
	}
}

.section {
	padding: .5rem 3px;
	border: 1px solid var(--suppress-text);
	border-radius: var(--border-radius);
	margin: .5rem 3px;
	position: relative;
}

.section>label {
	position: absolute;
	top: -.6rem;
	left: 1rem;
	background-color: var(--secondary);
	font-size: 80%;
	padding: 0 3px;
}

.section.alt>label {
	background-color: var(--tertiary);
}

.section>div {
	border: none;
}

.nobr {
	white-space: nowrap;
}

.drag-drop-zone {
	border: 10px dashed var(--suppress-text);
	border-radius: 3rem;
	width: 16rem;
	height: 15rem;
	font-size: 20pt;
	color: var(--suppress-text);
	align-content: center;
	padding-left: 4rem;
	transition: all 0.25s ease-in-out;
}

.drag-drop-zone.emphasis {
	border-color: var(--emphasis-text);
	color: var(--emphasis-text);
}

.password {
	-webkit-text-security: disc;
}


#camera-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9;
	transition: opacity 1s ease, width 0s, height 0s;
	opacity: 1;
}

#camera-container.hidden {
	z-index: -1;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	opacity: 0;
}

#camera-video {
	position: absolute;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

#camera-reticle {
	position: absolute;
	width: 200px;
	height: 200px;
	border: 2px solid var(--emphasis-text);
	border-radius: 0%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}
