﻿* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}






:root {
	--toolbar-stage-size: 300px;
	--toolbar-size: 260px;

	--normal-fill: #d4d4d4;
	--hover-fill: #c8c8c8;
	--selected-fill: #bfe8b8;

	--stroke: #7b7b7b;
	--stroke-hover: #5f5f5f;
}












html {
	font-family: arial;
	height: 100%;
	width: 100%;
	display: flex;
}

body {
	display: flex;
	user-select: none;
	margin: 0px;
	padding: 0px;
	font-style: normal;
	height: 100%;
	width: 100%;
}

#centerWrapper {
	position: relative;
	border: 0px;
	width: 100%;
	height: 100%;
	margin: auto;
}

canvas {
	position: fixed;
	width: 100%;
	height: 100%;
}

#btnimgCalc {
	transform: rotate(0deg);
}

#btnimgCalc.panel-hidden {
	transform: rotate(180deg);
}

#rightWrapper {
	position: fixed;
	z-index: 2;
	border: 0px;
	border-left: 1px solid #d6dce8;
	background-color: #f5f7fb;
	right: 0px;
	top: 0px;
	overflow: hidden;
	width: 320px;
	min-width: 260px;
	max-width: 70%;
	height: 100%;
	transition: all 1s;
	padding-left: 0;
}

#rightWrapper.hide {
	transform: translateX(100%);
	visibility: hidden;
}

#rightWrapper,
#rightWrapper * {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 12px;
	letter-spacing: 0;
}

.reSizer {
	width: 3px;
	top: 0;
	left: 0;
	cursor: col-resize;
	height: 100%;
	position: absolute;
	background-color: #c7cfdd;
}

#scrollWrapper {
	display: flex;
	flex-direction: column;
	padding: 8px;
	padding-left: 12px;
	gap: 8px;
	width: 100%;
	height: 100%;
	overflow-y: auto;
	box-sizing: border-box;
}

#objectsContainer {
	width: 100%;
	max-width: 100%;
	border: 0;
	box-sizing: border-box;
}

#objectsContainer div hr {
	margin-top: 5px;
	margin-bottom: 10px;
}

.expr-block-giris {
	position: relative;
}

.expr-block-giris input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	height: 30px;
	background-color: #ffffff;
	border: 1px solid #cfd7e5;
	border-radius: 7px;
	color: #182033;
	padding: 5px 8px;
	outline: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.expr-block-giris input:focus {
	border-color: #5f8dd8;
	box-shadow: 0 0 0 2px rgba(95, 141, 216, 0.18);
}

.command-suggestions {
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 190px;
	overflow-y: auto;
	padding: 5px;
	background: #ffffff;
	border: 1px solid #d8deea;
	border-radius: 8px;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.command-suggestions[hidden] {
	display: none;
}

.command-suggestion {
	width: 100%;
	min-height: 30px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #182033;
	padding: 5px 7px;
	cursor: pointer;
	text-align: left;
}

.command-suggestion:hover {
	background: #eef6ff;
}

.command-suggestion span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
	font-size: 12px;
	font-weight: 700;
}

.command-suggestion small {
	flex: 0 0 auto;
	color: #64748b;
	font-size: 10px;
}

.expr-block {
	position: relative;
	margin-bottom: 6px;
}

.expr-block input,
.expr-block output {
	display: block;
	width: 100%;
	min-height: 24px;
	height: 24px;
	line-height: 22px;
	box-sizing: border-box;
	margin: 0;
	background-color: #ffffff;
	border: 1px solid #d8deea;
	color: #1f2937;
	padding: 0 42px 0 25px;
	outline: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.expr-block input {
	border-radius: 7px 7px 0 0;
	border-bottom-color: transparent;
	font-weight: 600;
}

.expr-block output {
	border-top: 0;
	border-radius: 0 0 7px 7px;
	color: #475569;
	background-color: #fbfcff;
	font-size: 11px;
}

.expr-block::after {
	content: "";
	position: absolute;
	top: 24px;
	left: 25px;
	right: 42px;
	border-top: 1px solid #d8deea;
	pointer-events: none;
}

.expr-block .btn {
	position: absolute;
	top: 24px;
	background-color: transparent;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.expr-block .gizle {
	left: 4px;
	border: 2px solid rgba(255, 255, 255, 0.8);
	box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16);
}

.expr-block .duzenle {
	right: 20px;

	background-image: url(../img/edit.svg);
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
}

.expr-block .sil {
	right: 5px;

	background-image: url(../img/clear.svg);
	background-size: 14px 14px;
	background-repeat: no-repeat;
	background-position: center;
}

.expr-block .sil:hover {
	background-color: #e8edf6;
}

.expr-block .duzenle:hover {
	background-color: #e8edf6;
}

.expr-block .gizle:hover {
	filter: brightness(0.96);
}

.sliders {
	display: grid;
	grid-template-columns: auto 1fr;
	row-gap: 5px;
	column-gap: 7px;
	align-items: center;
	margin-top: 5px;
}

/* Right Toolbar */
.rightToolbar {
	position: fixed;
	top: 8px;
	right: 320px;
	z-index: 4;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	transition: right 1s;
	pointer-events: auto;
}

.rightToolbar .calcMenuButton,
.rightToolbar .rightToolbarButton,
.rightToolbar .helpMenuButton,
.rightToolbar .historyControls button,
.rightToolbar .clearControl button {
	position: static;
	top: auto;
	right: auto;
	left: auto;
	bottom: auto;
	transform: none;
	z-index: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	outline: none;
	border: 1px solid gray;
	border-radius: 5px 0 0 5px;
	cursor: pointer;
	background: #eeeeee;
	pointer-events: auto;
	transition: background 0.2s;
}

.rightToolbar .calcMenuButton:hover,
.rightToolbar .rightToolbarButton:hover,
.rightToolbar .helpMenuButton:hover,
.rightToolbar .historyControls button:hover:not(:disabled),
.rightToolbar .clearControl button:hover:not(:disabled) {
	background: #dddddd;
}

.rightToolbar .historyControls,
.rightToolbar .clearControl {
	position: static;
	left: auto;
	bottom: auto;
	transform: none;
	z-index: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: transparent;
	pointer-events: auto;
}

.rightToolbar .historyControls button:disabled,
.rightToolbar .clearControl button:disabled {
	cursor: default;
	opacity: 0.35;
	filter: grayscale(1);
}

.rightToolbar button img,
.rightToolbar .historyControls button img,
.rightToolbar .clearControl button img {
	display: block;
	margin: 0 auto;
	width: 26px;
	max-height: 26px;
	filter: grayscale(1) brightness(0.45);
}

#btnimgCalc,
#btnimgAcordeon {
	transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
}

.rightToolbar #btnimgCalc:not(.panel-hidden) {
	filter: grayscale(1) brightness(0.85);
	opacity: 0.65;
}

.rightToolbar #btnimgCalc.panel-hidden {
	filter: grayscale(1) brightness(0.45);
	opacity: 1;
}

#btnimgAcordeon {
	transform: rotate(90deg);
}

.rightToolbar.is-open #btnimgAcordeon {
	transform: rotate(180deg);
}

.rightToolbarCollapsible {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	pointer-events: none;
	transition: max-height 0.45s ease, opacity 0.25s ease;
}

.rightToolbar.is-open .rightToolbarCollapsible {
	max-height: 260px;
	opacity: 1;
	pointer-events: auto;
}

.set-popup {
	display: none;
	position: absolute;
	border: 3px solid #f1f1f1;
	background-color: white;
	top: 0;
	right: 0;
	z-index: 9;
	text-align: left;
	height: 100%;
	width: 20%;
}

.setTitle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	text-align: end;
	background-color: cadetblue;
	padding: 8px 12px;
}

#set-popup .setTitle span {
	color: white;
	font-weight: bold;
}

.setTitle .btn-close:hover {
	opacity: 1;
}

.setContainer {
	display: block;
	font-size: small;
	padding: 10px;
}

.setContainer label {
	display: block;
	width: 100%;
}

.setContainer input {
	margin-bottom: 10px;
	background: #f1f1f1;
	text-indent: 5px;
	width: 100%;
	height: 25px;
	outline: none;
	border: 0;
}

.setContainer input:focus {
	background-color: #ddd;
}

.btn-close {
	background-color: cadetblue;
	color: white;
	padding: 5px;
	border: none;
	cursor: pointer;
	opacity: 0.8;
	font-size: 20px;
}

#snackbar {
	visibility: hidden;
	position: fixed;
	left: 50%;
	bottom: 28px;
	z-index: 10000;
	max-width: min(420px, calc(100vw - 32px));
	padding: 12px 16px;
	border-radius: 8px;
	background: rgba(17, 24, 39, 0.92);
	color: #fff;
	text-align: left;
	font: 600 15px/1.35 Arial, Helvetica, sans-serif;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 12px);
	transition:
		opacity 180ms ease,
		transform 180ms ease,
		visibility 180ms ease;
}

#snackbar.show,
#snackbar.is-visible {
	visibility: visible;
	opacity: 1;
	transform: translate(-50%, 0);
}

.tool-toast-title,
.tool-toast-message {
	display: block;
}

.tool-toast-title {
	margin-bottom: 4px;
	font-size: 13px;
	letter-spacing: 0;
}

.tool-toast-message {
	font-weight: 500;
}

@media (max-width: 640px) {
	#snackbar {
		width: calc(100% - 24px);
		max-width: calc(100% - 24px);
		bottom: 12px;
		border-radius: 8px;
	}
}

.help-popup {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.52);
	z-index: 9999;
	justify-content: center;
	align-items: center;
	padding: 14px;
}

#help-header {
	position: sticky;
	top: 0;
	background: #ffffff;
	z-index: 10;
	padding: 12px 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #e2e8f0;
}

.help-content {
	background: #f8fafc;
	color: #172033;
	width: min(520px, 100%);
	max-height: min(82vh, 760px);
	overflow-y: auto;
	border-radius: 12px;
	position: relative;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.help-content h2 {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
}

.help-content h3 {
	margin: 10px 14px 8px;
	color: #64748b;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
}

.help-content h4 {
	margin: 0;
}

.help-content pre {
	margin: 6px 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	padding: 8px;
	border-radius: 8px;
	color: #334155;
	font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
	font-size: 12px;
	white-space: pre-wrap;
}

.help-close {
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	background: #eef2f7;
	border: none;
	border-radius: 8px;
	color: #334155;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.help-close:hover {
	background: #e2e8f0;
}

.help-search {
	position: sticky;
	top: 55px;
	z-index: 9;
	padding: 10px 14px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.help-search input {
	width: 100%;
	height: 32px;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 0 10px;
	background: #ffffff;
	color: #172033;
	outline: none;
	font: inherit;
}

.help-search input:focus {
	border-color: #5f8dd8;
	box-shadow: 0 0 0 2px rgba(95, 141, 216, 0.18);
}

.help-section {
	padding: 0 14px 14px;
}

.help-topic {
	margin: 7px 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 9px;
	overflow: hidden;
}

.help-topic[hidden] {
	display: none;
}

.help-topic summary {
	min-height: 34px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 10px;
	color: #1e293b;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	user-select: none;
}

.help-topic summary::marker {
	content: "";
}

.help-topic summary::after {
	content: "›";
	width: 22px;
	height: 22px;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	border-radius: 6px;
	background: #f1f5f9;
	color: #475569;
	font-size: 18px;
	line-height: 1;
	transition: transform 0.15s ease, background 0.15s ease;
}

.help-topic[open] summary {
	background: #eef6ff;
	border-bottom: 1px solid #dbeafe;
}

.help-topic[open] summary::after {
	transform: rotate(90deg);
	background: #dbeafe;
	color: #1d4f8f;
}

.help-topic-body {
	padding: 8px;
}

code.example {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	margin: 4px 5px 0 0;
	padding: 4px 7px;
	border-radius: 7px;
	background: #edf2f8;
	color: #1e3a5f;
	cursor: pointer;
	font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background 0.15s ease, color 0.15s ease;
}

code.example:hover {
	background: #dbeafe;
	color: #0f2f54;
}

#made-signature {
	position: fixed;
	left: 44px;
	bottom: 56px;
	z-index: 2000;
	color: #5f6368;
	font: italic 600 13px "Segoe Script", "Bradley Hand ITC", "Comic Sans MS", cursive;
	text-decoration: none;
	letter-spacing: 0;
	opacity: 0.72;
}

#made-signature:hover {
	opacity: 1;
	text-decoration: none;
}

#made-signature:hover .made-highlight {
	color: #1a73e8;
}

@media (max-width: 560px) {
	.help-popup {
		align-items: stretch;
		padding: 8px;
	}

	.help-content {
		width: 100%;
		max-height: none;
		height: 100%;
		border-radius: 10px;
	}

	.help-search {
		top: 55px;
	}
}
