body{position:relative}
.container-ptcl{
    display: flex;
    flex-wrap: wrap;
    max-height: calc(100vh - 20px);
}
.sidebar-ptcl {
    width: 320px;
    background: #fff;
    padding: 20px;
    border-right: 1px solid #ddd;
	max-height: calc(100vh - 20px);
}

.main-ptcl {
	flex: 1;
	padding: 5px 20px;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: auto;
	max-height: calc(100vh - 30px);
	background-color: #f5f5f5;
}

canvas {
	width: auto;
	height: auto;
	max-height: calc(100vh - 40px);
}

.form-ptcl label{font-size:0.9rem;color:#555}

.tabs {
	display: flex;
	overflow: hidden;
	margin-bottom: 12px;
	margin-top:12px;
	gap: 5px;
	border-bottom: 1px solid #c2c2c2;
}

.tab {
	flex: 1;
	padding: 5px 16px;
	text-align: center;
	cursor: pointer;
	background: #f7f7f7;
	color: #333;
	font-size: 1rem;
	transition: background 0.2s ease;
	border-radius: 8px 8px 0 0;
}

.tab:hover {
	background: #f0f0f0;
}

.tab.active {
	background: #01b0eb;
	color: #fff;
}

.color-grid {
	display: grid;
	grid-template-columns: repeat(6, 38px);
	gap: 10px;
	margin-bottom: 10px;
}

.color-swatch {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
}

.color-swatch.selected::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	background: white;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.controls {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-top: 20px;
}

.controls button {
	background: white;
	border: none;
	font-size: 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #555;
	cursor: pointer;
	transition: all 0.2s ease;
}

.controls button .divimg {padding:5px;border:1px solid #eee;border-radius:50%;width:40px;height:40px;display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;}
.controls button .divimg img{width:30px;height:30px}
.controls button span {
	font-size:0.8rem;
	margin-top: 4px;
	color: #555;
	font-weight:600;
}

.controls button:hover .divimg {
	border-color: #01b0eb;
}

.controls button:hover span{color:#01b0eb}
.tool-button.active .divimg {
	border-color: #01b0eb;
}
.tool-button.active span{color:#01b0eb}

@media (max-width: 768px) {
	.container-ptcl {
		max-height: unset;
	}
	#popupOverlay{overflow: auto;}

	.sidebar-ptcl {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid #ccc;
		position: relative;
		padding: 5px 10px;
	}
	.form-ptcl label{display:none}
	.tabs{
		position: absolute;
		top: 0;
		left: calc(50% - 80px);
		margin-top: 5px;
	}

	.colorsSelect{width:100%;height:50px;overflow-x:auto;overflow-y:hidden;margin-top:5px}
	.toolsSelect{width:100%;height:65px;overflow-x:auto;overflow-y:hidden;margin-top:5px}
	.controls{width: fit-content;height: 65px;margin-top:0;flex-wrap: nowrap;
	}
	.color-grid {
		display: flex;
		margin-bottom: 10px;
		overflow-x: auto;
		flex-direction: row;
		flex-wrap: nowrap;
		width: fit-content;
		height: 50px;
	}
	.color-swatch {
		width: 34px;
		height: 34px;
	}
	#popupOverlay > div,.main, .container{max-height:unset !important}

	.main-ptcl {
		padding: 10px;
	}
	canvas {
		width: auto;
		height: auto;
		max-height: unset;
		max-width: calc(100% - 20px);
	}
}