:root {
	font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	font-weight: 400;

	color-scheme: light;
	color: #2d3748;
	background-color: #f7fafc;

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* .tl-shape {
	pointer-events: visible !important;
	touch-action: auto !important;
} */

.tlui-navigation-zone {
	display: none !important;
}

.tl-background {
	background-color: white !important;
}

.tlui-help-menu {
	display: none !important;
}

.tlui-menu-zone {
	position: absolute !important;
	right: 50% !important;
	bottom: 3.5rem !important;
}

.tlui-debug-panel {
	display: none !important;
}

.tlui-popover {
	display: none !important;
}

.tlui-slider__container {
	display: none !important;
}

.tlui-style-panel__section {
	display: none !important;
}

.app-container {
	position: relative;
	height: 100vh;
	width: 100vw;
}

.file-manager {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1000;
	background-color: var(--color-panel);
}

/* Add these new styles */
.file-manager-button {
	background-color: var(--color-panel);
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.file-manager-content {
	position: absolute;
	top: 50px;
	left: 10px;
	background-color: white;
	border-radius: 5px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 10px;
	min-width: 200px;
	max-width: 300px;
	display: none;
}

.file-manager-content.expanded {
	display: block;
}

.editor {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	inset: 0;
	overflow: hidden;
}


.shareButtonGroup {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
}

.taskSelector {
	border: 2px solid rgb(77, 171, 247);
	background-color: #f7fafc;
	color: rgb(77, 171, 247);
	padding: var(--space-3) var(--space-4);
	margin: 5px;
	border-radius: var(--radius-2);
	font: inherit;
	font-weight: 600;

	cursor: pointer;
	pointer-events: all;

	transition: background-color 0.3s ease, transform 0.2s ease;
	/* Smooth transitions */
}

.taskSelector:hover {
	opacity: 0.8;
}

.taskSelector.active {
	background-color: rgb(77, 171, 247);
	color: white;
}

.taskSelectorDescription {
	font-size: 10px;
	color: #718096;
}


.lockCodeEditorButton {
	position: fixed;
	bottom: 1rem;
	z-index: 999;
	right: 26%;
	box-shadow: var(--shadow-2);
	/* background: rgb(77, 171, 247); */
	background-color: var(--color-panel);
	/* color: white; */
	border: none;
	font: inherit;
	font-weight: 600;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-2);
	cursor: pointer;
	pointer-events: all;
}

.lockCodeEditorButton:hover {
	opacity: 0.95;
}

.unlockCodeEditorButton {
	background: rgb(77, 171, 247);
	color: white;
	border: none;
	font: inherit;
	font-weight: 600;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-2);
	cursor: pointer;
	pointer-events: all;
}

.unlockCodeEditorButton:hover {
	opacity: 0.95;
}

.executeCodeButton,
.makeRealButton {
	background-color: var(--color-panel);
	color: black;
	border: 1px solid #D0C3F7;
	font: inherit;
	font-weight: 600;
	padding: var(--space-3) var(--space-4);
	cursor: pointer;
	pointer-events: all;
	margin: 0;
	border-radius: 0;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	align-items: center;
}

.executeCodeButton {
	border-top-right-radius: var(--radius-2);
	border-bottom-right-radius: var(--radius-2);
}

.makeRealButton {
	border-top-left-radius: var(--radius-2);
	border-bottom-left-radius: var(--radius-2);
}

.executeCodeButton:hover,
.makeRealButton:hover {
	opacity: 0.95;
}




/* ---------- Execute Result ---------------- */

.exec-res-table {
	width: 100%;
	text-align: left;
	color: #718096;
	border-collapse: collapse;
	border-radius: 15px;
	overflow: hidden;
}

.exec-res-table thead {
	font-size: 12px;
	color: #4a5568;
	background-color: #f7fafc;
}

.exec-res-table thead th {
	padding: 12px 15px;
}

.exec-res-table tbody {
	background-color: #fff;
}

.exec-res-table tbody tr {
	color: #718096;
	border-bottom: 1px solid #e2e8f0;
}

.exec-res-table tbody tr:hover {
	background-color: #f7fafc;
}

.exec-res-table tbody td {
	padding: 12px 15px;
}




/* ------------------ Api Key Input ----------------- */

.your-own-api-key {
	position: absolute;
	top: 10px;
	right: 10px;
	/* width: 100%; */
	/* display: flex;
	flex-direction: column; */
	align-items: center;
	justify-content: center;
	z-index: 9999999;
	color: var(--color-text-0);
	pointer-events: none;
}

.your-own-api-key__inner {
	display: flex;
	flex-direction: row;
	max-width: 300px;
	width: 100%;
	gap: 4px;
	background-color: var(--color-low);
	border-radius: 8px;
	padding: 6px;
	pointer-events: all;
}

.your-own-api-key input {
	all: inset;
	padding: 6px 12px;
	border-radius: 4px;
	color: transparent;
	border: none;
	font-size: 12px;
	background: var(--color-panel);
	width: 100%;
	height: 32px;
	font-size: 12px;
	font-family: Inter, sans-serif;
}

.your-own-api-key__mobile {
	bottom: 108px;
}

.your-own-api-key__mobile input {
	bottom: 108px;
	font-size: 16px !important;
	pointer-events: all;
}

.input__wrapper {
	position: relative;
	flex-grow: 2;
}

.input__wrapper:not(:focus-within)::after {
	content: 'Your OpenAI API Key';
	display: block;
	position: absolute;
	inset: 0px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0px 12px;
	z-index: 999999999;
	background-color: none;
	font-size: 10px;
	font-family: Inter, sans-serif;
}

.input__wrapper::after {
	pointer-events: none;
}

.your-own-api-key input:focus {
	color: var(--color-text-0);
}

.question__button {
	all: unset;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	background-color: none;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}



/* ADMIN */
.logs-table {
	width: 100%;
	text-align: left;
	color: #000;
	border-collapse: collapse;
	border-radius: 15px;
	overflow: hidden;
	margin: 20px 0;
}

.logs-table thead {
	font-size: 12px;
	color: #fff;
	background-color: rgb(77, 171, 247);
}

.logs-table thead th {
	padding: 12px 15px;
}

.logs-table tbody {
	background-color: #fff;
}

.logs-table tbody tr {
	color: #718096;
	border-bottom: 1px solid #e2e8f0;
}

.logs-table tbody tr:hover {
	background-color: #f7fafc;
}

.logs-table tbody td {
	padding: 12px 15px;
}

.logs-table .cell-content {
	cursor: pointer;
	position: relative;
	max-height: 3em;
	/* Adjust based on line height to fit two lines */
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.logs-table .cell-content.expanded {
	max-height: none;
	white-space: normal;
}

.logs-table .cell-content::after {
	content: 'More';
	position: absolute;
	bottom: 0;
	right: 0;
	background-color: #f9f9f9;
	padding: 0 5px;
	cursor: pointer;
}

.logs-table .cell-content.expanded::after {
	content: 'Less';
	background-color: transparent;
}



/* META UI HELPER */
#meta-ui-helper {
	position: absolute;
	z-index: 900;
	margin: 0;
	pointer-events: auto;
	/* Changed from 'none' to 'auto' to allow interactions */
	background: rgba(255, 255, 255, 0.95);
	padding: 10px;
	border-radius: 5px;
	border: 2px solid #007bff;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	font-family: Arial, sans-serif;
}

#meta-ui-helper .header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 5px;
	/* margin-bottom: 10px; */
}

#meta-ui-helper .header button {
	border: none;
	background: none;
	font-size: 1.2em;
	cursor: pointer;
	color: #007bff;
}

#meta-ui-helper .header button:hover {
	color: #0056b3;
}

#meta-ui-helper .content {
	border-top: 2px solid #007bff;
	padding-top: 5px;
}

#meta-ui-helper .content p {
	margin: 3px 0;
}

#meta-ui-helper .content span {
	display: block;
	margin: 3px 0;
}

#meta-ui-helper .content input {
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 2px 3px;
}

#meta-ui-helper .content button {
	border: none;
	background: none;
	font-size: 1em;
	cursor: pointer;
	color: #007bff;
	margin-left: 5px;
}

#meta-ui-helper .content button:hover {
	color: #0056b3;
}


/* RECOG HISTORIES */
.recognition-histories {
	width: 300px;
	background: rgba(255, 255, 255, 0.9);
	border: 2px solid #007bff;
	border-radius: 5px;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
	padding: 15px;
	font-family: Arial, sans-serif;
	margin: 10px;
	overflow: auto;
}

.recognition-histories h2 {
	font-size: 1.2em;
	color: #007bff;
	margin-bottom: 10px;
	border-bottom: 2px solid #007bff;
	padding-bottom: 5px;
}

.recognition-histories table {
	width: 100%;
	border-collapse: collapse;
}

.recognition-histories th,
.recognition-histories td {
	text-align: left;
	padding: 8px;
	border-bottom: 1px solid #ddd;
}

.recognition-histories th {
	background-color: #f2f2f2;
}

.recognition-histories tr:hover {
	background-color: #f1f1f1;
}

.recognition-histories button {
	border: none;
	background: none;
	color: #007bff;
	cursor: pointer;
	font-size: 0.9em;
}

.recognition-histories button:hover {
	color: #0056b3;
}


.tlui-buttons__grid {
	grid-template-columns: repeat(8, auto) !important;
}

.controlBrushes {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	margin-top: 2rem;
}

.controlBrushes .controlBrushButton {
	z-index: 100;
	box-shadow: var(--shadow-1);
	background: var(--color-panel);
	/* inner border */
	border: 1px solid white;
	font: inherit;
	font-weight: 600;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-2);
	cursor: pointer;
	pointer-events: all;
	margin: 0 var(--space-1);
}

.controlBrushes .controlBrushButton:hover {
	opacity: 0.95;
}

.controlBrushes .controlBrushButton.active {
	border-width: 2px;
}


.source-highlight {
	background-color: rgba(255, 255, 0, 0.3);
}

.target-highlight {
	background-color: rgba(0, 255, 0, 0.3);
}

.editor-actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	position: absolute;
	bottom: 10px;
	right: 10px;
}

.interpretation-result {
	/* position: absolute; */
	z-index: 999;
	/* bottom: 5px; */
	/* right: 5rem; */
	text-align: end;
	font-size: small;
	font-family: 'tldraw_draw';

	display: flex;
	flex-direction: row;
	align-items: center;
	margin-right: 5px;
}

.highlighted-code {
	background: rgba(208, 195, 247, 0.5) !important;
	border-radius: 5px;
	padding: 1px 2px;
}

/* HTML: <div class="loader"></div> */
.loader {
	margin-right: 5px;
	margin-top: 5px;
	width: 15px;
	aspect-ratio: 1;
	border-radius: 50%;
	background: #91C2D7;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
	animation: l1 2s infinite cubic-bezier(0.3, 1, 0, 1);
}

@keyframes l1 {
	33% {
		border-radius: 0;
		background: #D0C3F7;
		clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%)
	}

	66% {
		border-radius: 0;
		background: #91C18E;
		clip-path: polygon(50% 0, 50% 0, 100% 100%, 0 100%)
	}
}