@import url("https://fonts.googleapis.com/css?family=Raleway:300");
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

@font-face {
	font-family: "digital-font";
	src: url("../assets/digital-7/digital-7.ttf");
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: Poppins, sans-serif;
}

body {
	font-family: Poppins, sans-serif;
}

h2 {
	font-size: 2.5rem;
	text-align: center;
	color: #e97451;
}

.container {
	border: 2px solid black;
	margin-top: 1rem;
	margin-left: 1vw;
	width: 94rem;
	height: 44rem;
	padding-top: 1rem;
	background-color: #e3dac9;
	position: relative;
}

.topic {
	height: 3%;
	font-size: 1.3rem;
	text-decoration-color: brown;
	text-underline-offset: 1em;
	/* text-decoration: underline; */
	text-align: center;
	font-weight: 700;
	/* margin-bottom: 4px; */
}

.topic span {
	color: #ff0000;
}

.main {
	height: 83%;
	padding-left: 1%;
	padding-right: 1%;
	padding-top: 2%;
	display: flex;
	gap: 1%;
}

.left {
	position: relative;
	width: 65%;
	border: 2px solid;
	height: 100%;
	border-radius: 5%;
	box-shadow: 5px 5px 20px 5px #888888;
	background-color: whitesmoke;
	background: url("../images/bg-image.jpg") no-repeat center/cover;
}

.right {
	/* border: 2px solid black; */
	position: relative;
	width: 35%;
	height: 100%;
	border-radius: 5%;
	/* box-shadow: 5px 5px 20px 5px #888888; */
	/* background-color: whitesmoke; */
	/* overflow: hidden; */
}

.table {
	display: flex !important;
	flex-direction: column;
}
table {
	/* border: 2px solid black; */
	width: 100%;
	height: 100%;
	/* border-radius: 5%; */
	overflow: hidden;
	border-collapse: collapse;
	background-color: whitesmoke;
	/* box-shadow: 1px 1px 20px 0px black; */

	th {
		border: 2px solid black;
		text-align: center;
	}
	td {
		text-align: center;
		border: 1px solid black;
	}
}
tr {
	height: 0.2rem !important;
	width: 3rem;
}

.table {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 50%;
	border: 0px solid black;
	/* border-bottom: 2px solid black; */
	box-shadow: 1px 1px 20px 0px black;
}
table {
	width: 100%;
	border-collapse: collapse;
}

tbody {
	display: block;
	max-height: 600px; /* Set a fixed max height */
	overflow-y: auto; /* Enable scrolling when needed */
}

tbody tr {
	display: table;
	width: 100%;
	table-layout: fixed; /* Prevent row expansion */
	height: 32px !important; /* Fixed row height */
}

.table-head {
	font-size: 1rem;
	background-color: white;
	width: 100%;
	height: 2rem;
	text-align: center;
	border: 2px solid black;
	color: blue;
}

tbody tr:nth-child(n) {
	transition: height 0.3s ease-in-out; /* Smooth shrinking effect */
}

.chart {
	width: 100%;
	margin: 0 auto;
	height: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	h1 {
		color: green;
		position: absolute;
		font-weight: 700;
		font-size: 4rem;
		top: 22rem;
		left: 9.5rem;
		text-shadow: 0px 0px 5px black;
	}

	img {
		height: 100%;
		width: 100%;
	}
}

.chart-off {
	background-color: whitesmoke;
	height: 95%;
	width: 100%;
	/* border-radius: 5%; */
	box-shadow: 1px 1px 20px 0px black;
}

.buttons {
	height: 10%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10%;
}

.buttons button {
	padding: 0.5rem 1rem;
	border-radius: 62rem;
	box-shadow: 2px 2px 5px 2px #888888;
	border: none;
}

.footer {
	border: 2px solid black;
	height: 5%;
	text-align: center;
	background-color: #555555;
	color: white;
}

.start {
	background-color: #022ebe;
	color: white;
	transition: all 0.3s ease-in-out;
}

.start:hover {
	background-color: #222b8b;
	transform: scale(1.1);
	cursor: pointer;
}

.graph {
	background-color: #ed9e28;
	color: white;
	transition: all 0.3s ease-in-out;
}

.graph:hover {
	background-color: #d68b1f;
	transform: scale(1.1);
	cursor: pointer;
}

.print {
	background-color: #1f75fe;
	color: white;
	transition: all 0.3s ease-in-out;
}

.print:hover {
	background-color: #3457d5;
	transform: scale(1.1);
	cursor: pointer;
}

.reset {
	background-color: #79443b;
	color: white;
	transition: all 0.3s ease-in-out;
}

.reset:hover {
	background-color: #3d2b1f;
	transform: scale(1.1);
	cursor: pointer;
}

.info {
	position: absolute;
}

.motor-speed-controller {
	left: 24rem;
	top: -0.5rem;
	position: absolute;
	width: 15rem;
	z-index: 1;
	#motor-speed-box {
		width: 100%;
	}
	#motor-speed-needle {
		position: absolute;

		height: 12%;
		top: 29%;
		left: 27%;
		transform: rotate(-90deg);
		transition: transform 0.5s ease-in-out;
		z-index: 1;
		transform-origin: bottom;
	}
	#motor-speed-button {
		position: absolute;
		top: 57%;
		left: 22%;

		width: 12%;

		background-color: #ff0000;

		cursor: pointer;
	}
}

.motor-speed-controller-screen {
	position: absolute;
	top: 27%;
	left: 52%;
	height: 22%;
	width: 31%;
	border: 2px solid black;
	background-color: rgb(67, 63, 63);
	border-radius: 10%;
	padding: 2px;
	box-shadow: inset 0px 0px 20px 20px black;
}
.motor-speed-controller-screen-on {
	width: 100%;
	height: 100%;
	font-weight: bold;
	font-size: 0.8em;
	background-color: lightskyblue;
	box-shadow: inset 0px 0px 20px 0px black;
	color: white;
	text-align: center;
	display: none;
	align-content: center;
	text-shadow: 0px 0px 5px black;
}

.pmsm-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.motor-container {
	position: absolute;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	/* background-color: #a8a4a4; */
	/* background-image: url(../images/front-motor.png); */

	background-repeat: no-repeat;
	background-position: center;
	background-size: 350px;
	/* box-shadow: 0 0 15px rgba(0,0,0,0.2); */
	/* overflow: hidden; */
	top: 14.2rem;
	left: 4.2rem;
	img {
		height: 120%;
		position: absolute;
		left: -0.2rem;
		top: -0.2rem;
		filter: drop-shadow(5px 5px 7px black);
	}
}

.stator {
	position: absolute;
	width: 70.6%;
	height: 70.6%;
	top: 81px;
	left: 56px;
	border-radius: 50%;
	background-color: rgb(44, 34, 34);
}

.coil {
	position: absolute;

	/* border-radius: 10px; */
	/* background-image: url(../images/coil_outer.png); */
	background-color: brown;

	background-size: 110px;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
	transition: background-color 0.3s;
}

.coil.active-n {
	background-color: red;
}

.coil.active-s {
	background-color: red;
}

.coil::after {
	content: "";
	position: absolute;
	width: 30px;
	height: 30px;
	/* background-color: #42270b; */
	border-radius: 5px;
}

.coil-1 {
	top: 31%;
	left: 47.5%;
	width: 50px;
	height: 40px;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
}

.coil-2 {
	top: 57%;
	left: 76.5%;
	width: 40px;
	height: 50px;
	border-bottom-right-radius: 10px;
	border-top-right-radius: 10px;
}

.coil-3 {
	top: 86%;
	left: 47.5%;
	width: 50px;
	height: 40px;
	border-bottom-left-radius: 10px;
	border-bottom-right-radius: 10px;
}

.coil-4 {
	top: 57%;
	left: 21.5%;
	width: 40px;
	height: 50px;
	border-bottom-left-radius: 10px;
	border-top-left-radius: 10px;
}

.coil1-bg {
	background: url(../images/winding.png) no-repeat center/cover;
	transform: rotate(90deg) translateX(0.4rem) translateY(-0.2rem);
	background-size: 5.2rem;
	height: 170%;
	width: 100%;
}
.coil2-bg {
	background: url(../images/winding.png) no-repeat center/cover;
	transform: rotate(180deg) translateX(0.4rem) translateY(-0.2rem);
	background-size: 5.2rem;
	height: 130%;
	width: 170%;
}
.coil3-bg {
	background: url(../images/winding.png) no-repeat center/cover;
	transform: rotate(-90deg) translateX(0.4rem) translateY(-0.2rem);
	background-size: 5.2rem;
	height: 170%;
	width: 100%;
}
.coil4-bg {
	background: url(../images/winding.png) no-repeat center/cover;
	transform: translateX(0.4rem) translateY(-0.2rem);
	background-size: 5.2rem;
	height: 130%;
	width: 170%;
}

.pole-label {
	position: absolute;
	font-weight: bold;
	font-size: 18px;
	color: white;
	text-shadow: 1px 1px 2px black;
	z-index: 10;
	pointer-events: none;
	left: 2rem;
}

.rotor-container {
	position: absolute;
	width: 29%;
	height: 29%;
	top: 51%;
	left: 42%;
	border-radius: 50%;
	background-color: #00000062;
}

.magnet {
	position: absolute;
	width: 82%;
	height: 82%;
	top: 9%;
	left: 9%;
	border-radius: 50%;
	background: linear-gradient(
		90deg,
		#ff0000 0%,
		#ff0000 50%,
		#0000ff 50%,
		#0000ff 100%
	);
	transform-origin: center;
}
.magnet-center {
	position: absolute;
	background-color: grey;
	box-shadow: inset 2px 2px 2px solid;
	border-radius: 50%;
	height: 25%;
	width: 25%;
	top: 37%;
	left: 37%;
}

.magnet-label {
	position: absolute;
	font-weight: bold;
	font-size: 18px;
	color: white;
	text-shadow: 1px 1px 2px black;
	pointer-events: none;
}

.n-label {
	left: 20%;
	top: 34%;
	transform: translateX(-50%);
}

.s-label {
	right: 20%;
	top: 34%;
	transform: translateX(50%);
}

.controls {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: center;
}

.slider-container {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 300px;
}

label {
	width: 130px;
}

input[type="range"] {
	flex-grow: 1;
}

.value-display {
	width: 50px;
	text-align: right;
}

.pmsm-button {
	padding: 10px 20px;
	background-color: #4caf50;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	margin: 5px;
}

.pmsm-button:hover {
	background-color: #45a049;
}

.pmsm-button:active {
	background-color: #3e8e41;
}

.legend {
	display: flex;
	gap: 20px;
	margin-top: 10px;
}

.legend-item {
	display: flex;
	align-items: center;
	gap: 5px;
}

.legend-color {
	width: 20px;
	height: 20px;
	border-radius: 4px;
}

.legend-n {
	background-color: #ff5555;
}

.legend-s {
	background-color: #5555ff;
}

.pulley {
	position: absolute;
	top: 8.5rem;
	right: 0rem;
	width: 15rem;
	height: 22rem;
}

.pulley-holder {
	width: 5rem;
	position: absolute;
	left: 4rem;
	top: 2rem;
	z-index: 4;
}

.pulley-round {
	position: absolute;
	z-index: 3;
	width: 15%;
	left: 5.3rem;
	top: 4.2rem;
}

.weights {
	width: fit-content;
	position: absolute;
	right: 3.7rem;
	bottom: -1rem;

	img {
		height: 8rem;
	}
}

.weight-screen {
	position: absolute;
	top: 50%;
	left: 27%;
	height: 22%;
	width: 47%;
	border: 2px solid black;
	box-shadow: inset 0px 0px 20px 20px black;
	border-radius: 10%;
	padding: 2px;
	text-align: center;
	align-content: center;
	color: white;
}

.rope1 {
	position: absolute;
	top: 2rem;
	left: 4.2rem;
	width: 100px;
	height: 300px;
}

.rope2 {
	position: absolute;
	top: 3.1rem;
	left: -2.3rem;
	width: 150px;
	z-index: 2;
	height: 18rem;
	transform: rotate(36deg);
}

.hook {
	position: absolute;
	height: 2rem;
	top: 11rem;
	left: 5.4rem;
	/* transform: rotate(180deg); */
}

.real-motor {
	position: absolute;
	top: 67%;
	left: 48.5%;
	width: 12rem;

	img {
		transform: scaleY(-1) rotate(180deg);
		/* border: 2px solid black; */
		width: 100%;
		/* box-shadow: 2px 2px 10px 5px black; */
		filter: drop-shadow(5px 5px 3px black);
	}
}

.switch {
	position: absolute;
	left: 55%;
	top: 45%;
	img {
		width: 30%;
	}
}
svg {
	display: block;
}
.tingu {
	padding: 10px 20px;
	font-size: 16px;
	cursor: pointer;
	/* position: absolute; */
	z-index: 10;
	background-color: red;
	color: white;
}

.tingu:hover {
	background-color: rgb(241, 59, 59);
	transform: scale(1.1);
	transition: all 0.3s ease-in-out;
	cursor: pointer;
}

/* .tingu1{
	top: 30rem;
}
.tingu2{
	top: 30rem;
	left: 20rem;
} */

.arrow {
	position: absolute;
	left: 35%;
	width: 9rem;
	top: 55%;
	transform: scaleY(-1) rotate(180deg);
	img {
		width: 100%;
	}
}

.box {
	position: relative;
}

.jtk-endpoint {
	z-index: 10;
}
.jtk-connector {
	z-index: 10;
}

.screen-graphs {
	display: none;
}

#hook {
	position: absolute;
	top: 7rem;
	left: -0.2rem;
	width: 100%;

	z-index: 1;
}

.real-motor-label {
	position: absolute;
	font-weight: bold;
	height: 2rem;
	width: 13rem;
	border-radius: 10px;
	text-align: center;
	align-content: center;
	text-shadow: 0px 0px 5px black;
	color: white;
	background: url(../images/plank.png) no-repeat center/cover;
}

#instructions {
	position: absolute;
	font-size: 1.5rem;
	text-align: center;
	/* border: 2px solid black; */
	border-radius: 5px;
	width: 14%;
	left: 1%;
	top: 1%;
	background-image: url(../images/plank.png);
	background-size: cover;
	font-weight: bold;
	letter-spacing: 1px;
}
#popup {
	h4 {
		text-align: center;
		text-decoration: underline;
		text-underline-offset: 0.5em;
		margin-bottom: 1rem;
	}
	text-align: justify;
	font-size: 0.1rem;
	font-weight: lighter;
	position: absolute;
	left: 0rem;
	background-color: #000;
	color: white;
	padding: 0.8rem 1.2rem;
	border-radius: 8px;
	box-shadow: inset 5px 5px 10px black, inset -5px -5px 10px black,
		0 0 10px black;
	opacity: 0;
	transform: translateY(-20px);
	transition: all 0.5s ease;
	pointer-events: none;
	z-index: 13;
	width: 30rem;
	h4 {
		color: white;
		font-size: 1rem;
		text-shadow: 0px 0px 5px black;
	}
	p,
	ul {
		font-size: 0.8rem;
	}
	b.step {
		color: #e74c3c;
		font-size: 18px;
	}
	b.connection {
		color: #2980b9;
	}
	ul {
		list-style-type: square;
		margin-left: 5rem;
	}
	.note {
		color: #8e44ad;
		font-style: italic;
	}
}
#instructions:hover {
	cursor: pointer;
	#popup {
		opacity: 1;
		transform: translateY(0);
	}
}

.motor-speed-endpoints {
	position: absolute;
	width: 2.5rem;
	height: 8rem;
	background-color: #191919;
	top: 3.5rem;
	left: -1.5rem;
	z-index: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	border-top-left-radius: 10px;
	border-bottom-left-radius: 10px;
	gap: 10px;
}

.real-motor-endpoints {
	position: absolute;
	width: 8rem;
	height: 2.7rem;
	background-color: #191919;

	top: -2.5rem;
	right: 3.5rem;
	z-index: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 10px;
	gap: 10px;
}
