:root {
	--qblue-rgb: #409cff;
	--half-qblue-rgb: #409cff80;
	--bg: #000;
	--fg: #fff;
	--muted: #aaa;
	--panel: #111;
	--border: var(--half-qblue-rgb);
	--term-bg: #05070a;
	--term-fg: #ffffff;
	--term-border: #223244;
}


@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

body {
	font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	overflow: hidden;
}

a {
	color: rgb(var(--qblue-rgb));
}

textarea,
select,
button {
	font: inherit;
	color: var(--fg);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
}

textarea {
	width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	padding: 10px;
}

button {
	padding: 10px 14px;
	font-size: 14px;
	cursor: pointer;
}

.pane .CodeMirror:hover,
select:hover,
button:hover {
	border: 1px solid var(--qblue-rgb);
}

.row {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.app {
	height: 100vh;
	padding: 0px 10px;
	max-width: 100vw;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.top {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

h1 {
	margin: 0;
}

h3 {
	margin: 0;
}

p {
	margin: 0;
}

.panes {
	display: flex;
	gap: 12px;
	flex: 1;
	min-height: 0;
}

.pane {
	display: flex;
	flex-direction: column;
	gap: 0px;
	flex: 1;
	min-width: 0;
	min-height: 0;
}


.pane .CodeMirror {
	flex: 1;
	min-height: 0;
	height: 100%;
	border-radius: 8px;
	border: 1px solid var(--border);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
}

.tab-panels .CodeMirror {
    border-radius: 0px 8px 8px 8px;
}

.pane .CodeMirror-scroll {
	min-height: 0;
}


.cm-s-material-darker.CodeMirror {
    background-color: var(--term-bg) !important;
}


.muted {
	color: var(--muted);
}

:focus-visible {
	outline: 2px solid rgb(var(--qblue-rgb));
	outline-offset: 2px;
}

code {
	background: rgba(255,255,255,.1);
	padding: 4px;
	border-radius: 4px;
}

.CodeMirror-vscrollbar {
  scrollbar-color: #409cff #111;
  scrollbar-width: thin;
}

.btn-progress{
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.btn-progress .fill{
  position: absolute;
  inset: 0;
  width: 0%;
  background: #409cff;
  transform-origin: left center;
  z-index: 0;
  transition: width 120ms linear;
}

.btn-progress .label{
  position: relative;
  z-index: 1;
}

#btnCompile {
  width: 160px;
  display: inline-block;
  text-align: center;
}

.download-appendix-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 0px 10px 10px 0px;
  background: var(--half-qblue-rgb);
  color: inherit;
  cursor: pointer;
}

.download-appendix-btn .icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.download-appendix-btn:hover:not(:disabled) {
  background: var(--qblue-rgb);
}

.download-appendix-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.has-appendix-btn {
	  border-radius: 10px 0px 0px 10px;
}

.tab-buttons {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 20px;
    margin: 0;
    margin-bottom: -1px;
    margin-left: 0;
}

.tab-button {
    height: 20px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    color: var(--muted);
    cursor: pointer;
}

.tab-button:hover {
    color: var(--fg);
    border-color: var(--qblue-rgb);
}

.tab-button.active {
    background: var(--half-qblue-rgb);
    color: var(--fg);
    border-color: var(--border);
    border-bottom-color: var(--term-bg);
}

.tab-panels {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    background: var(--term-bg);
    overflow: hidden;
}

.tab-panel {
    width: 100%;
    min-height: 0;
    display: none;
}

.tab-panel.active {
    display: block;
}

.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  height: 100%;
}

.privacy {
  position: relative;
  font-size: 0.85rem;
}

.privacy-icon {
  margin-left: 6px;
  cursor: help;
  color: #409cff;
  font-weight: bold;
  position: relative;
}

.privacy-tooltip {
  visibility: hidden;
  opacity: 0;
  width: 320px;
  background: #111;
  color: #eee;
  text-align: left;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #409cff;

  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  font-size: 0.8rem;
  line-height: 1.4;

  transition: opacity 0.15s ease;
  pointer-events: none;
}

.privacy-icon:hover .privacy-tooltip {
  visibility: visible;
  opacity: 1;
}

.logo {
  height: 32px;
}
.logo-image {
  height: 32px;
}
