/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
	/* Fluid typography — all font-size values come from here only */
	--font-2xs: clamp(0.55rem, 0.48rem + 0.3vw, 0.65rem);
	/* ~9–10px  hotkeys, badges */
	--font-xs: clamp(0.65rem, 0.58rem + 0.35vw, 0.75rem);
	/* ~10–12px small labels    */
	--font-sm: clamp(0.7rem, 0.63rem + 0.35vw, 0.8rem);
	/* ~11–13px secondary text  */
	--font-base: clamp(0.8rem, 0.72rem + 0.4vw, 1rem);
	/* ~13–16px body / buttons  */
	--font-md: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
	/* ~16–20px section heads   */
	--font-lg: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
	/* ~20–28px large headings  */
	--font-xl: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
	/* ~28–40px display text    */

	/* Touch targets — every tappable element uses these */
	--btn-h: clamp(2.75rem, 2.5rem + 0.5vw, 3rem);
	/* min ~44px, max ~48px     */
	--btn-px: clamp(0.5rem, 0.4rem + 0.5vw, 1.25rem);
	/* horizontal button pad    */
	--input-h: clamp(2rem, 1.875rem + 0.3vw, 2.5rem);
	/* input / select height    */

	/* Spacing */
	--gap-xs: clamp(0.2rem, 0.15rem + 0.2vw, 0.35rem);
	--gap-sm: clamp(0.35rem, 0.3rem + 0.25vw, 0.5rem);
	--gap-md: clamp(0.6rem, 0.5rem + 0.5vw, 1rem);
}

body {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

* {
	margin: 0;
}

[type="file"] {
	display: none;
}

#svgcontent p,
#svgcontent p * {
	line-height: 1em;
}

.advanced {
	display: none;
}

[data-togglebody="hide-right-panel"] {
	position: absolute;
	top: 0;
	right: 0;
	width: 15rem;
	height: 1.5rem;
	z-index: 10;
}

.hide-right-panel [data-togglebody="hide-right-panel"] {
	width: 5rem;
}

html,
body {
	font-size: clamp(11px, 0.7vw + 9px, 14px);
	line-height: 1.5;
	/* Full-screen app: the page itself must never scroll or rubber-band.
	   On iOS a two-finger gesture with one finger outside the workarea
	   (topbar/panels have no touch-action lockdown) scrolled the page and
	   left absolutely-positioned containers displaced over flow content. */
	overflow: hidden;
	height: 100%;
	overscroll-behavior: none;
}

body {
	/* iOS scrolls the body during multi-touch gestures even with
	   overflow:hidden; position:fixed is the lockdown it respects.
	   Telemetry showed window.scrollY=289 mid-pinch shoving the whole
	   layout under the absolutely-positioned canvas. */
	position: fixed;
	inset: 0;
	width: 100%;
}

p,
ul,
ol,
h1,
pre {
	margin: 0;
	margin-bottom: 1.5rem;
	font-size: 1rem;
	font-family: inherit;
	line-height: 1.5rem;
}

.widget label {
	display: block;
}

pre {
	margin: 0 1.5rem;
	margin-bottom: 1.5rem;
	font-style: italic;
}

textarea {
	width: 100%;
}

ul {
	list-style-type: disc;
}

h1 {
	font-size: 2rem;
	line-height: 3rem;
	font-family: serif;
}

h2 {
	font-size: 2.25rem;
	line-height: 3rem;
	font-family: serif;
	color: #000;
}

h3 {
	font-size: 1.5rem;
	line-height: 3rem;
	font-weight: normal;
	color: inherit;
}

h4 {
	font-size: 1.5rem;
	font-weight: bold;
	text-align: center;
	margin-top: 1.5rem;
	font-family: inherit;
	line-height: 1.5rem;
}

h5 {
	color: inherit;
	font-size: 1rem;
	font-weight: bold;
	text-align: center;
	margin-top: 1.5rem;
	font-family: inherit;
	line-height: 1.5rem;
}

h6 {
	font-size: 1rem;
	line-height: 1.5rem;
	font-family: serif;
}

#board {
	display: none;
}

.price {
	font-size: 1rem;
	pointer-events: none;
}

img {
	max-width: 100%;
	width: auto;
	height: auto;
	border-radius: 3px;
}

.alignleft,
.alignright {
	max-height: 9rem;
}

.alignleft {
	float: left;
	margin: 0 1.5rem 1.5rem 0;
}

.alignright {
	float: right;
	margin: 0 0 1.5rem 1.5rem;
}

table {
	width: 100%;
}

td {
	vertical-align: top;
}

a {
	color: inherit;
	text-decoration: none;
	font-style: italic;
}

footer a {
	padding: 0.375rem;
}

input {
	font-size: 1rem;
	border-radius: 3px;
	height: 1.5rem;
	max-width: 100%;
}

p {
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
	user-select: text;
}

.resize_canvas_anchore {
	display: none;
	pointer-events: all;
}

[data-tool="select"][data-select_count="0"] .resize_canvas_anchore {
	display: block;
}

[data-tool="select"][data-select_count="0"] .tool_topath {
	display: none;
}

.zoom:hover .view_advanced {
	display: inline-block;
}

.loggedIn #loginForm,
.logout,
.loggedIn .login-note {
	display: none;
}

.loggedIn .logout {
	display: inline-block;
}

.loggedInVisable,
.loggedIn .loggedOutVisable {
	display: none;
}

.loggedIn .loggedInVisable {
	display: block;
}

.widget h3 {
	text-align: center;
	font-size: var(--font-xs);
	color: #707070;
	margin: 4px 0;
}

.rendering-message {
	z-index: 1;
	position: absolute;
	display: none;
	top: 10%;
	left: 0;
	padding: 1.5rem;
}

.right_canvas,
.bottom_canvas,
.rightlow_canvas {
	text-align: center;
	display: none;
}

/*
[data-tool="select"][data-select_count="0"] .right_canvas,
[data-tool="select"][data-select_count="0"] .bottom_canvas{
}*/

.changeCanvasSizeWidth,
.changeCanvasSizeHeight {
	width: 60px;
	border: none;
	background: #dfdfdf;
	height: 30px;
}

/* ── Canvas-size panel in the right panel (no-selection state) ──────────── */
.canvas-size-panel {
	display: none;
	padding: 8px 6px;
	border-bottom: 1px solid #ddd;
}

[data-tool="select"][data-select_count="0"] .canvas-size-panel {
	display: block;
}

.canvas-size-panel-title {
	font-size: 0.75rem;
	font-weight: 600;
	color: #666;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.canvas-size-fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
}

.canvas-size-label {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 0.8rem;
	color: #444;
}

/* Fixed-width letter cell so the W and H inputs share the same left edge. */
.canvas-size-letter {
	flex: 0 0 1.2em;
	text-align: center;
}

.canvas-size-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	padding: 3px 4px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #fff;
	font-size: 0.85rem;
	height: 24px;
	box-sizing: border-box;
}

.canvas-size-fit {
	padding: 3px 8px;
	font-size: 0.8rem;
	cursor: pointer;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #f0f0f0;
	white-space: nowrap;
}

.canvas-size-fit:hover {
	background: #e0e0e0;
}

.menu {
	position: absolute;
	left: 0;
	bottom: 13px;
	z-index: 10;
	border-right: 1px solid #ececec;
	overflow: hidden;
}

a,
a:visited {
	text-transform: none;
	text-decoration: none;
	color: inherit;
	padding: 0;
}

a.action {
	color: #011ace;
	font-variant: small-caps;
}

a.action:hover {
	color: #0024eb;
}

.backgroundImage {
	display: none;
}

#color_picker .Grid {
	display: none;
}

#svgcanvas p {
	border: none;
	outline: none;
	font-size: inherit;
	line-height: 1em;
}

#color_picker .Button {
	vertical-align: top;
}

/*[data-tool="select"] #svgcontent > .currentLayer
{
    cursor:move;
}

[data-tool="select"] #svgcontent > .currentLayer *
{
    cursor:move;
}*/

#color_picker {
	position: absolute;
	top: 1.5rem;
	display: none;
	z-index: 81000;
	right: 15rem;
}

#main_icon img {
	position: relative;
	top: -3px;
	left: -1px;
}

hr {
	border: none;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#svgroot {
	position: absolute;
	top: 0;
	left: 0;
}

#svgcanvas {
	display: inline-block;
	vertical-align: middle;
	width: 640px;
	height: 480px;
	/* biome-ignore lint/correctness/noUnknownProperty: Apple Dashboard legacy property */
	/* biome-ignore lint/correctness/noUnknownFunction: Apple Dashboard legacy function */
	-apple-dashboard-region: dashboard-region(controlrectangle0px0px0px0px);
	/* for widget regions that shouldn't react to dragging */
	position: relative;
	/* : ;*/
	border: none;
	overflow: visible;
}

#svgcontent {
	overflow: visible;
}

body:not(.ruler) #rulers,
.lineoptions {
	display: none;
}

#rulers > div {
	position: absolute;
	z-index: 1;
	overflow: hidden;
	background: rgba(235, 235, 235, 0.61);
}

#ruler_corner {
	bottom: 12px;
	right: 173px;
	width: 15px;
	height: 15px;
}

#ruler_x {
	height: 15px;
	bottom: 12px;
	left: 15px;
	right: 16rem;
	border: none;
}

#ruler_y {
	width: 15px;
	top: 15px;
	right: 16rem;
	bottom: 27px;
	border: none;
}

#ruler_x canvas:first-child {
	margin-left: -16px;
}

#ruler_x canvas {
	float: left;
}

#ruler_y canvas {
	margin-top: -16px;
}

#ruler_x > div,
#ruler_y > div {
	overflow: hidden;
}

#stroke_bg,
#fill_bg {
	height: 16px;
	width: 16px;
	margin: 1px;
}

#workarea {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	overflow: auto;
	border-width: 0;
}

#zoom-corner {
	position: absolute;
	bottom: 20px;
	left: 20px;
	z-index: 150;
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	gap: 4px;
}

#zoomSlider2 {
	writing-mode: vertical-lr;
	direction: rtl;
	appearance: slider-vertical;
	-webkit-appearance: slider-vertical;
	width: 20px;
	height: 120px;
	cursor: pointer;
	flex-shrink: 0;
}

.zoom-popup {
	display: none;
	flex-direction: column;
	gap: 0;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #ccc;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	padding: 6px;
	align-items: stretch;
}

#zoom-corner:hover .zoom-popup,
#zoom-corner:focus-within .zoom-popup {
	display: flex;
}

.zoom-popup-controls {
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: 5rem;
}

.zoom-popup-controls button,
.zoom-popup-controls input[type="text"] {
	width: 100%;
	padding: 3px 6px;
	font-size: 0.8rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	background: #f5f5f5;
	background-image: none;
	cursor: pointer;
	text-align: left;
	box-sizing: border-box;
	color: #222;
}

.zoom-popup-controls button:hover {
	background: #e8e8e8;
}

/* icons.css sets background-image on these elements with specificity (0,1,0,0) for IDs
   and (0,0,1,1) for button.zoom — same as our .zoom-popup-controls button rule so
   icons.css (loaded later) wins. Scope under #zoom-corner to reach (0,2,0,0)/(0,1,1,1)
   and suppress toolbar SVG icons designed for dark backgrounds. */
#zoom-corner #zoomIn,
#zoom-corner #zoomOut,
#zoom-corner button.zoom {
	background-image: none;
	background-size: initial;
	text-align: center;
	background-position: initial;
}

.zoom-popup-controls input[type="text"] {
	background: #fff;
	cursor: text;
	text-align: center;
}

.workareaContainer {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 15rem;
	border-width: 0;
	text-align: center;
}

#layerlist {
	margin: 0;
	padding: 0;
	border-collapse: collapse;
	border-width: 1px;
	border-style: solid;
	width: 93%;
	margin-left: 3%;
	background: rgba(0, 0, 0, 0.03);
}

#layerlist tr.layer {
	margin: 0;
	padding: 0;
}

#layerlist td.layervis {
	width: 14px;
	cursor: pointer;
	background-size: auto 70%;
	background-repeat: no-repeat;
	background-position: center center;
}

#svg_editor #layerlist .layerinvis {
	cursor: pointer;
	opacity: 0.2;
}

#layerlist td.layervis * {
	display: block;
}

#layerlist td.layerinvis * {
	display: none;
}

#selLayerLabel {
	margin-top: 10px;
}

body button.palette_item {
	height: 2rem;
	width: 2rem;
	float: left;
	margin: 0;
	padding: 0;
	min-width: 2rem;
}

.fill_palette,
.stroke_palette {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 2px;
}

/* Every palette item: fixed size, circular, clipped */
div.palette_item,
input[type="color"].palette_item {
	height: 1.3rem;
	width: 1.3rem;
	min-width: 1.3rem;
	box-sizing: border-box;
	border-radius: 50%;
	overflow: hidden;
	cursor: pointer;
	padding: 0;
	border: none;
	background: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Force native color inputs to render as circles */
input[type="color"].palette_item {
	-webkit-appearance: none;
	appearance: none;
}

input[type="color"].palette_item::-webkit-color-swatch-wrapper {
	padding: 0;
	border-radius: 50%;
}

input[type="color"].palette_item::-webkit-color-swatch {
	border: none;
	border-radius: 50%;
}

/* Hover / pressed / selected — unified ring on all palette items */
.fill_palette .palette_item:hover,
.stroke_palette .palette_item:hover {
	/* box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2); */
}

.fill_palette .palette_item:active,
.stroke_palette .palette_item:active {
	/* box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); */
}

.palette_item.palette_item_selected {
	/* box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.75) !important; */
	-webkit-transform: scale(1.3);
}

/* Stroke-width preset buttons — same size/shape as colour palette circles */
.sw-btn {
	width: 1.5rem;
	height: 1.5rem;
	min-width: 1.5rem;
	min-height: 1.5rem;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.04);
	cursor: pointer;
	padding: 2px;
	overflow: hidden;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sw-btn:hover {
	background: rgba(0, 0, 0, 0.1);
}

.sw-btn.push_button_pressed {
	background: rgba(0, 0, 0, 0.18);
	outline: 2px solid rgba(0, 0, 0, 0.3);
	outline-offset: -1px;
}

/* Stroke-width number input — matches palette row height */
.sw-num {
	width: 2.8rem;
	height: 1.5rem;
	font-size: 0.78rem;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 0 3px;
	box-sizing: border-box;
	text-align: center;
}

.top-panel {
	position: absolute;
	left: 50%;
	top: 0;
	border: none;
	overflow: auto;
	z-index: 2;
	height: 39px;
	text-align: center;
	margin-left: -121px;
}

.sideBar {
	border: none;
}

body:not(.wireframe) #wireframelabel,
body:not(.wireframe) #wireframe_exit {
	display: none;
}

body.wireframe #wireframe_exit {
	display: block;
}

body.wireframe #wireframelabel {
	position: absolute;
	bottom: 19px;
	left: 20px;
	font-weight: bold;
	background: hsla(0, 0%, 100%, 0.7);
	padding: 3px;
	z-index: 10;
	cursor: pointer;
	display: none;
}

body.wireframe #svgcontent * {
	fill: none;
	stroke: #000;
	stroke-width: 2px;
	stroke-opacity: 1;
	stroke-dasharray: 0;
	opacity: 1;
	pointer-events: stroke;
	vector-effect: non-scaling-stroke;
	filter: none;
}

.flyout_arrow_horiz {
	position: absolute;
	bottom: -1px;
	right: 0;
	z-index: 10;
}

span.zoom_tool {
	line-height: 16px;
	padding: 0;
}

.dropdown {
	position: relative;
}

.dropdown button {
	width: 15px;
	height: 21px;
	margin: 6px 0 0 1px;
	padding: 0;
}

.dropdown .down {
	border-left: 1px solid #808080;
	border-top: 1px solid #808080;
	border-right: 1px solid #ffffff;
	border-bottom: 1px solid #ffffff;
}

.dropdown ul {
	list-style: none;
	position: absolute;
	margin: 0;
	padding: 0;
	left: -80px;
	top: 26px;
	z-index: 4;
	display: none;
}

.dropup ul {
	top: auto;
	bottom: 26px;
}

.dropdown li {
	display: block;
	padding: 4px;
	margin: 0 0 -1px;
	line-height: 16px;
}

.dropdown li.special {
	padding: 10px 4px;
}

.dropdown li.special:hover {
	background: #ffc;
}

input,
button,
select,
img {
	vertical-align: middle;
}

#tool_open input,
#tool_import input {
	position: absolute;
	opacity: 0;
	font-size: 10em;
	margin: 0;
	cursor: pointer;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

.tools_flyout {
	position: absolute;
	display: none;
	cursor: pointer;
	z-index: 16;
	bottom: 9%;
	padding: 0;
}

.tools_flyout_v {
	position: absolute;
	display: none;
	cursor: pointer;
	width: 30px;
}

.tools_flyout .tool_button {
	float: left;
	/* height: 1.5rem; */
	width: 1.5rem;
}

ul li.current {
	background-color: #f4e284;
}

.toolbar_button button .svg_icon {
	margin: 0 3px -3px 0;
	padding: 0;
	border: none;
	width: 16px;
	height: 16px;
}

button,
.button {
	min-width: 4.5rem;
	font-style: normal;
}

button,
.button,
input,
select {
	margin: 0;
	border-style: none;
	height: var(--btn-h);
	font-size: var(--font-base);
	line-height: var(--btn-h);
}

input,
select {
	padding: 0;
}

.alignment button,
.color button {
	min-width: 31%;
}

.rightPanel label {
	/* color: inherit; */
	/* font-size: 1rem; */
	/* font-weight: bold; */
}

.fullWidth {
	width: 100%;
}

[data-elementcontext] {
	display: none;
}

.widget.file {
	margin-top: 0;
}

.layers,
.alignment {
	position: fixed;
	display: none;
	width: 12rem;
	padding: 0.5rem;
}

body,
button,
label,
select,
input {
	font-family: sans-serif;
}

@media all and (max-width: 1100px) {
	html,
	body {
		/* font-size: 10px; */
	}
}

/* font-size scaling handled by clamp() on html/body — no px override needed */

.clearfix:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
}

.clearfix {
	display: inline-block;
}

/* start commented backslash hack \*/
* html .clearfix {
	height: 1%;
}

.clearfix {
	display: block;
}

#popup_title {
	display: none;
}

#popup_container {
	padding: 3rem;
	font-size: var(--font-md);
	max-width: 73%;
	overflow: auto;
	word-break: break-word;
	max-height: 95%;
	border: 1px solid hsla(0, 0%, 81%, 0.8);
}

#popup_container input {
	height: var(--btn-h);
}

.rightPanel .advanced {
	display: none;
}

.rightPanel {
	width: 15rem;
	z-index: 5;
	padding: 0;
	margin: 0;
	/* padding: 0 1.5rem; */
	text-align: center;
}

.right-panel-wrap {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	overflow: auto;
	padding: 0;
	z-index: 5;
	width: 15rem;
}

.hide-right-panel .right-panel-wrap {
	display: none;
}

.hide-right-panel .workareaContainer,
.hide-right-panel #ruler_y,
.hide-right-panel #ruler_x {
	right: 0;
}

.hide-right-panel .topbar {
	margin-right: 5rem;
}

.leftPanel {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 5px;
	z-index: 3;
	width: 155px;
	overflow: auto;
	border-right: 1px solid #ececec;
}

input[type="file"]::-webkit-file-upload-button {
	visibility: hidden;
}

input[type="file"]:before {
	content: "Choose image";
	display: inline-block;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 5px 8px;
	outline: none;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
	user-select: none;
	cursor: pointer;
	text-shadow: 1px 1px #fff;
	font-weight: 700;
	font-size: 10pt;
	color: #333;
}

.collapsed > *:not(h4) {
	display: none;
}

.collapsed > h4 {
	cursor: pointer;
	text-decoration: underline;
}

.advancedZoom,
.widget.canvasColor {
	background: hsla(31, 15%, 95%, 0.7);
	width: 10rem;

	margin: 0;
}

.widget.canvasColor {
	margin: 0 -3px;
	outline: none;
	display: inline-block;
	border: none;
	height: 3.1rem;
}

h4.hideNextSibling + * {
	display: none;
	position: absolute;
	top: 0;
}

.leftPanel h4.hideNextSibling + * {
	left: 200px;
}

#shape_buttons {
	width: 25rem;
	vertical-align: top;
	max-height: 80vh;
	overflow: auto;
	float: left;
}

.top-panel:hover .view_advanced {
	display: inline-block;
}

.zoom > input {
	width: 42px;
}

#shape_cats {
	outline: 1px solid rgba(0, 0, 0, 0.3);
	overflow: visible;
}

/* One row per category — shows 3 shape thumbnails + arrow, hover reveals popup */
.shape_cat_row {
	position: relative;
	display: flex;
	align-items: center;
	padding: 1px 2px;
	outline: 1px solid #ebebeb;
	cursor: pointer;
	gap: 2px;
	white-space: nowrap;
}

.shape_cat_row:hover {
	background: rgba(0, 0, 0, 0.05);
}

.shape_cat_row.current {
	background: rgba(0, 0, 0, 0.06);
}

/* Strip: always-visible first 3 shape icons — sized to content, no fixed width */
.shape_cat_strip {
	display: flex;
	gap: 2px;
	align-items: center;
	flex-shrink: 0;
}

/* Override tool_button defaults inside strip to keep icons small */
.shape_cat_strip .tool_button {
	/* width: 20px; */
	/* height: 20px; */
	/* min-width: 20px; */
	/* min-height: 20px; */
	margin: 0;
	padding: 1px;
	box-shadow: none;
	flex-shrink: 0;
	overflow: hidden;
}

.shape_cat_strip .tool_button svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Loading placeholder dots */
.shape_cat_loading::after {
	content: "···";
	font-size: 0.7rem;
	color: #bbb;
	letter-spacing: 1px;
}

/* Right-pointing arrow — sits flush after the 3 previews */
.shape_cat_arrow {
	font-size: 0.5rem;
	color: #999;
	line-height: 1;
	flex-shrink: 0;
	margin-left: 1px;
}

/* Popup: grid of shapes extending to the right of the arrow */
.shape_cat_popup {
	display: none;
	position: fixed;
	z-index: 9000;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.2);
	box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.18);
	grid-template-columns: repeat(6, 36px);
	gap: 3px;
	padding: 6px;
	max-height: 80vh;
	overflow-y: auto;
	overflow-x: hidden;
}

/* Popup visibility is JS-controlled (mouseenter/mouseleave with delay) */

/* Popup shape buttons — uniform square cells, large enough to see shapes */
.shape_cat_popup .tool_button {
	/* width: 34px; */
	/* height: 34px; */
	/* min-width: 34px; */
	/* min-height: 34px; */
	margin: 0;
	padding: 3px;
	box-shadow: none;
	overflow: hidden;
}

.shape_cat_popup .tool_button svg {
	display: block;
	width: 100%;
	height: 100%;
}

.leftsidepanel {
	display: -webkit-box;
	-webkit-box-align: center;
	-webkit-box-pack: center;
	position: absolute;
	top: 50%;
	left: 0;
	width: 4.5rem;
	overflow: hidden;
	z-index: 2;
	margin-top: -14.5rem;
	border-bottom-right-radius: 3px;
	border-top-right-radius: 3px;
}

.tools button {
	padding: 0;
	width: 4.5rem;
}

.dialog #dialogContainer {
	display: block;
}

#dialogContainer {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: none;
	z-index: 100000000;
	background: white;
	width: 160px;
}

.file,
.menu_links,
.advancedZoom {
	display: none;
	position: absolute;
}

.file,
.file button {
	text-align: left;
}

.hoverShow {
	display: block;
	z-index: 14000;
}

#popup_container {
	background: #fff;
}

.menu_links {
	padding: 1% 2%;
}

.widget.file {
	width: 12rem;
	padding: 0;
}

.plugins,
.popup_container,
.plugins .close,
.rendering-message,
.help-popup {
	background: #fff;
}

article {
	position: absolute;
	top: 6rem;
	left: 6rem;
	right: 6rem;
	bottom: 6rem;
	z-index: 20;
	background: #fff;
	overflow: scroll;
	border: 1px solid #000;
	padding: 3rem;
	display: none;
}

.topbar {
	z-index: 175;
	display: inline-block;
	position: relative;
	border-bottom-left-radius: 3px;
	border-bottom-right-radius: 3px;
	margin-top: -1px;
}

h3 {
	margin: 0;
	padding: 0;
}

.model-overlay {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	overflow: auto;
	z-index: 2000;
}

br {
	margin-top: 1.5rem;
}

.debug-only {
	display: none;
}

.debug .debug-only {
	display: block;
}

#tool_barcode,
#set-barcode {
	display: none;
}

.barcode-plugin #tool_barcode,
.barcode-plugin #set-barcode {
	display: block;
}

.mask-group {
	display: none;
}

.mask-plugin .mask-group {
	display: block;
}

[data-toggle="layers"] {
	display: none;
}

.layers-plugin [data-toggle="layers"] {
	display: inline-block;
}

.svgBackground,
.open-url {
	display: none;
}

.css-background-plugin .svgBackground,
.css-background-plugin .open-url {
	display: block;
}

.pattern-control {
	display: none;
}

.pattern-plugin .pattern-control {
	display: block;
}

[data-pick-attr] {
	display: none;
}

.picker-plugin [data-pick-attr] {
	display: inline-block;
}

.rightPanel .advanced-text,
.advanced-text-plugin .basic-fonts {
	display: none;
}

.advanced-text-plugin .advanced-text {
	display: block;
}

[data-togglebody="advanced-text-plugin"].purchased,
.advanced-text-plugin-purchased [data-purchase="advanced-text-plugin"] {
	display: none;
}

.advanced-text-plugin-purchased [data-togglebody="advanced-text-plugin"].purchased {
	display: block;
}

.advanced-align {
	display: none;
}

.align-plugin .advanced-align {
	display: block;
}

label.marker-controls {
	display: none;
}

.markers-plugin .marker-controls {
	display: block;
}

[data-toggle="alignment"]:not(.align-more-btn) {
	width: 13rem;
}

/* Inline alignment toolbar in the tool-area */
.align-toolbar {
	display: inline-flex;
	align-items: center;
	gap: 1px;
}

#tool_alignleft2 {
	background-image: url(../images/icons/align_left.svg);
}

#tool_aligncenter2 {
	background-image: url(../images/icons/center_hor.svg);
}

#tool_alignright2 {
	background-image: url(../images/icons/align_right.svg);
}

.align-more-btn {
	font-size: 0.7rem;
	padding: 0 4px;
	min-width: auto;
	line-height: 1;
	opacity: 0.7;
	cursor: pointer;
}

[data-visableif-attr] {
	display: none;
}

[data-pick-attr],
.clear-attr {
	/* padding: 0; */
	height: 1.5rem;
	max-width: 1.5rem;
	min-width: 1.5rem;
}

input[type="range"] {
	/* width: 100%; */
	height: 1.5rem;
}

input[type="range"]::-webkit-slider-thumb {
	width: 0.5rem;
	height: 1.5rem;
}

/* ── Exact angle bar (shows in right panel when rotate grip is used) ── */

#exact-angle-bar {
	display: none;
	/* shown by JS on rotate grip click or drag-end */
	border-top: 1px solid var(--border-color, #555);
}

/* ── Exact dimensions bar (shows in right panel when resize grip is clicked) ── */

#exact-dims-bar {
	display: none;
	/* shown by JS when a resize grip is clicked */
	border-top: 1px solid var(--border-color, #555);
}

#exact-dims-bar[data-delta="true"] .label-name-area span::before {
	content: "Δ ";
	font-size: 10px;
	opacity: 0.7;
}

#exact-dims-mode[aria-pressed="true"] {
	background: var(--accent, #4a9eff);
	color: #fff;
	border-color: transparent;
}
