/* General Styles */
/* Header style goes here */
/* mobile menu style*/
/* menu toggler style */
/* Navbar Styles */
/* Mobile-first responsive design */
@-webkit-keyframes spincube {
	from, to {
		-webkit-transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
	}
	16% {
		-webkit-transform: rotateY(-90deg);
	}
	33% {
		-webkit-transform: rotateY(-90deg) rotateZ(90deg);
	}
	50% {
		-webkit-transform: rotateY(-180deg) rotateZ(90deg);
	}
	66% {
		-webkit-transform: rotateY(-270deg) rotateX(90deg);
	}
	83% {
		-webkit-transform: rotateX(90deg);
	}
}
@keyframes spincube {
	from, to {
		-moz-transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
		-ms-transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
		transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
	}
	16% {
		-moz-transform: rotateY(-90deg);
		-ms-transform: rotateY(-90deg);
		transform: rotateY(-90deg);
	}
	33% {
		-moz-transform: rotateY(-90deg) rotateZ(90deg);
		-ms-transform: rotateY(-90deg) rotateZ(90deg);
		transform: rotateY(-90deg) rotateZ(90deg);
	}
	50% {
		-moz-transform: rotateY(-180deg) rotateZ(90deg);
		-ms-transform: rotateY(-180deg) rotateZ(90deg);
		transform: rotateY(-180deg) rotateZ(90deg);
	}
	66% {
		-moz-transform: rotateY(-270deg) rotateX(90deg);
		-ms-transform: rotateY(-270deg) rotateX(90deg);
		transform: rotateY(-270deg) rotateX(90deg);
	}
	83% {
		-moz-transform: rotateX(90deg);
		-ms-transform: rotateX(90deg);
		transform: rotateX(90deg);
	}
}
:root {
	--primary-color: #0c6980;
	--secondary-color: #2596be;
	--text-color: #333;
	--background-color: #fff;
	--border-color: #eee;
}
body {
	font-family: Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #f4f4f9;
	color: #333;
}
#Header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	transition: all 0.3s ease-in-out;
	z-index: 9;
}
#Header .site-logo-wrap {
	width: 10%;
	float: left;
	padding: 20px 0;
	transition: all 0.3s ease-in-out;
}
#Header .site-logo-wrap .logo {
	color: #fff;
	font-size: 24px;
	font-style: italic;
	display: inline-block;
}
#Header .site-logo-wrap .logo img {
	display: inline-block;
	vertical-align: middle;
	width: 60px;
}
#Header .main-menu {
	width: 70%;
	text-align: right;
	float: right;
	padding: 30px 0;
	transition: all 0.3s ease-in-out;
}
#Header .main-menu li {
	display: inline-block;
	vertical-align: middle;
	margin-left: 10px;
}
#Header .main-menu li a {
	position: relative;
	font-size: 16px;
	color: #fff;
	padding: 15px 10px;
}
#Header .main-menu li a::before {
	content: "";
	position: absolute;
	width: 100%;
	height: 2px;
	bottom: 0;
	left: 0;
	background-color: #0098aa;
	visibility: hidden;
	-webkit-transform: scaleX(0);
	transform: scaleX(0);
	-webkit-transition: all 0.3s ease-in-out 0s;
	transition: all 0.3s ease-in-out 0s;
}
#Header .main-menu li a:hover::before {
	visibility: visible;
	-webkit-transform: scaleX(1);
	transform: scaleX(1);
}
#Header .mobile-menu {
	width: 180px;
	left: -180px;
	background-color: rgba(0, 0, 0, 1);
	position: absolute;
	top: 0;
	z-index: -1;
	height: 100vh;
	-webkit-transition: left 0.5s 0.5s;
	-moz-transition: left 0.5s 0.5s;
	transition: left 0.5s 0.5s;
}
#Header .mobile-menu ul {
	margin-top: 85px;
}
#Header .mobile-menu ul li {
	list-style: none;
	padding: 0 0 20px 40px;
}
#Header .mobile-menu ul li a {
	font-size: 16px;
	color: #fff;
	padding: 0;
}
#Header .mobile-menu.visible {
	left: 0;
	-webkit-transition: left 0.5s;
	-moz-transition: left 0.5s;
	transition: left 0.5s;
}
#Header a.menu-trigger {
	cursor: pointer;
	position: relative;
	top: 35px;
	width: 40px;
	height: 40px;
	float: right;
	transition: all 0.3s ease-in-out;
}
#Header a.menu-trigger span {
	-moz-transition: all 0.4s;
	-o-transition: all 0.4s;
	-webkit-transition: all 0.4s;
	transition: all 0.4s;
	background-color: white;
	display: block;
	position: absolute;
	width: 30px;
	height: 3px;
	left: 0;
	top: 10px;
}
#Header a.menu-trigger span:before {
	-moz-transition: all 0.4s;
	-o-transition: all 0.4s;
	-webkit-transition: all 0.4s;
	transition: all 0.4s;
	background-color: white;
	display: block;
	position: absolute;
	width: 30px;
	height: 3px;
	left: 0;
	content: "";
	-moz-transform-origin: 33% 100%;
	-ms-transform-origin: 33% 100%;
	-webkit-transform-origin: 33% 100%;
	transform-origin: 33% 100%;
	top: -10px;
	z-index: 10;
}
#Header a.menu-trigger span:after {
	-moz-transition: all 0.4s;
	-o-transition: all 0.4s;
	-webkit-transition: all 0.4s;
	transition: all 0.4s;
	background-color: white;
	display: block;
	position: absolute;
	width: 30px;
	height: 3px;
	left: 0;
	content: "";
	-moz-transform-origin: 33% 0;
	-ms-transform-origin: 33% 0;
	-webkit-transform-origin: 33% 0;
	transform-origin: 33% 0;
	top: 10px;
}
#Header a.menu-trigger.active span {
	background-color: transparent;
}
#Header a.menu-trigger.active span:before {
	background-color: transparent;
	-moz-transform: translateY(4px) translateX(1px) rotate(45deg);
	-ms-transform: translateY(4px) translateX(1px) rotate(45deg);
	-webkit-transform: translateY(4px) translateX(1px) rotate(45deg);
	transform: translateY(4px) translateX(1px) rotate(45deg);
}
#Header a.menu-trigger.active span:after {
	background-color: transparent;
	-moz-transform: translateY(-8px) translateX(1px) rotate(-45deg);
	-ms-transform: translateY(-8px) translateX(1px) rotate(-45deg);
	-webkit-transform: translateY(-8px) translateX(1px) rotate(-45deg);
	transform: translateY(-8px) translateX(1px) rotate(-45deg);
}
#Header.header-fixed {
	background: rgba(0, 0, 0, 0.8);
	transition: all 0.3s ease-in-out;
}
#Header.header-fixed .site-logo-wrap {
	padding: 10px 0;
	transition: all 0.3s ease-in-out;
}
#Header.header-fixed .site-logo-wrap .logo img {
	width: 60px;
	transition: all 0.3s ease-in-out;
}
#Header.header-fixed .main-menu {
	padding: 27px 0;
	transition: all 0.3s ease-in-out;
}
#Header.header-fixed .main-menu li a {
	padding: 5px 10px;
	transition: all 0.3s ease-in-out;
}
#Header.header-fixed a.menu-trigger {
	top: 22px;
	transition: all 0.3s ease-in-out;
}
.cubespinner {
	-webkit-animation-name: spincube;
	-webkit-animation-timing-function: ease-in-out;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-duration: 12s;
	animation-name: spincube;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
	animation-duration: 12s;
	-webkit-transform-style: preserve-3d;
	-moz-transform-style: preserve-3d;
	-ms-transform-style: preserve-3d;
	transform-style: preserve-3d;
	-webkit-transform-origin: 30px 30px 0;
	-moz-transform-origin: 30px 30px 0;
	-ms-transform-origin: 30px 30px 0;
	transform-origin: 30px 30px 0;
}
.cubespinner div {
	position: absolute;
	width: 60px;
	height: 60px;
	border: 1px solid #ccc;
	background: rgba(255, 255, 255, 0.8);
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
	text-align: center;
	font-size: 35px;
	left: 25px;
	top: 8px;
}
.cubespinner .face1 {
	-webkit-transform: translateZ(30px);
	-moz-transform: translateZ(30px);
	-ms-transform: translateZ(30px);
	transform: translateZ(30px);
}
.cubespinner .face2 {
	-webkit-transform: rotateY(90deg) translateZ(30px);
	-moz-transform: rotateY(90deg) translateZ(30px);
	-ms-transform: rotateY(90deg) translateZ(30px);
	transform: rotateY(90deg) translateZ(30px);
}
.cubespinner .face3 {
	-webkit-transform: rotateY(90deg) rotateX(90deg) translateZ(30px);
	-moz-transform: rotateY(90deg) rotateX(90deg) translateZ(30px);
	-ms-transform: rotateY(90deg) rotateX(90deg) translateZ(30px);
	transform: rotateY(90deg) rotateX(90deg) translateZ(30px);
}
.cubespinner .face4 {
	-webkit-transform: rotateY(180deg) rotateZ(90deg) translateZ(30px);
	-moz-transform: rotateY(180deg) rotateZ(90deg) translateZ(30px);
	-ms-transform: rotateY(180deg) rotateZ(90deg) translateZ(30px);
	transform: rotateY(180deg) rotateZ(90deg) translateZ(30px);
}
.cubespinner .face5 {
	-webkit-transform: rotateY(-90deg) rotateZ(90deg) translateZ(30px);
	-moz-transform: rotateY(-90deg) rotateZ(90deg) translateZ(30px);
	-ms-transform: rotateY(-90deg) rotateZ(90deg) translateZ(30px);
	transform: rotateY(-90deg) rotateZ(90deg) translateZ(30px);
}
.cubespinner .face6 {
	-webkit-transform: rotateX(-90deg) translateZ(30px);
	-moz-transform: rotateX(-90deg) translateZ(30px);
	-ms-transform: rotateX(-90deg) translateZ(30px);
	transform: rotateX(-90deg) translateZ(30px);
}
.site-logo-wrap {
	padding: 10px 0;
}
.site-logo-wrap .logo {
	color: #fff;
	font-size: 24px;
	font-style: italic;
	display: inline-block;
}
.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #3eb2c8;
	padding: 10px 20px;
	color: white;
}
.navbar ul {
	list-style: none;
	display: flex;
	margin: 0;
	padding: 0;
}
.navbar ul li {
	margin: 0 10px;
}
.navbar ul li a {
	text-decoration: none;
	color: white;
	font-weight: bold;
	transition: color 0.3s;
}
.navbar ul li a:hover {
	color: #ddd;
}
.menu-toggle {
	display: none;
	background: none;
	border: none;
	color: white;
	font-size: 1.5em;
	cursor: pointer;
}
.dashboard-content {
	text-align: center;
	padding: 1px;
}
.dashboard-content h2 {
	color: #3eb2c8;
}
.dashboard-content p {
	font-size: 1.2em;
}
.navigation-controls {
	display: contents;
	align-items: center;
	gap: 10px;
	margin-top: 10px;
	margin-left: auto;
}
.nav-btn {
	padding: 5px 10px;
	background: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	color: #0c6980;
	min-width: 60px;
}
.nav-btn:hover {
	background: #e0e0e0;
}
.mode-btn {
	background: #f0f0f0;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	padding: 8px 15px;
	color: #0c6980;
	min-width: 60px;
}
.mode-btn.active {
	background: #0c6980;
	color: white;
}
.info-panel {
	padding: 5px;
	margin: 5px 15px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px solid #eee;
	max-height: 14%;
	overflow-y: auto;
	text-align: start;
}
.info-panel h4 {
	margin: 0 0 10px 0;
	color: #0c6980;
}
.info-panel p {
	margin: 0;
	padding: 0;
	font-size: 11px;
	line-height: 1.2;
}
#currentDateDisplay {
	font-weight: bold;
	padding: 5px 10px;
	background: #fff;
	border-radius: 4px;
	border: 1px solid #ddd;
	min-width: 100px;
	text-align: center;
}
.card-radius {
	border-radius: 15px !important;
}
.card-title-sm {
	font-size: 0.7rem !important;
	margin: 8px 0;
}
.card.header {
	background-color: #0c6980;
	color: white;
	border-bottom-right-radius: 0px;
	border-bottom-left-radius: 0px;
	border-top-right-radius: 12px;
	border-top-left-radius: 12px;
}
.card.header button {
	padding: 8px 16px;
	margin: 5px;
	background: #0a5468;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s;
}
.card.header button:hover {
	background: #3eb2c8;
}
html {
	font-family: Arial;
	display: inline-block;
	text-align: center;
}
p {
	font-size: 1.2rem;
}
h4 {
	font-size: 0.8rem;
}
.container {
	position: relative;
	width: 100%;
	max-width: 1200px;
	padding: 0 15px;
}
.content {
	padding: 5px;
}
.card {
	background-color: white;
	box-shadow: 0px 0px 10px 1px rgba(140, 140, 140, .5);
	border: 1px solid #0c6980;
	border-radius: 15px;
}
.cards {
	max-width: 700px;
	margin: 0 auto;
	display: grid;
	grid-gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.reading {
	font-size: 1.3rem;
}
.packet {
	color: #bebebe;
}
.temperatureColor {
	color: #fd7e14;
}
.humidityColor {
	color: #1b78e2;
}
.statusreadColor {
	color: #702963;
	font-size: 12px;
}
.LEDColor {
	color: #183153;
}
.switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 24px;
}
.switch input {
	display: none;
}
.sliderTS {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #d3d3d3;
	-webkit-transition: 0.4s;
	transition: 0.4s;
	border-radius: 34px;
}
.sliderTS:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 4px;
	bottom: 4px;
	background-color: #f7f7f7;
	-webkit-transition: 0.4s;
	transition: 0.4s;
	border-radius: 50%;
}
.sliderTS:after {
	content: 'OFF';
	color: white;
	display: block;
	position: absolute;
	transform: translate(-50%, -50%);
	top: 50%;
	left: 70%;
	font-size: 10px;
	font-family: Verdana, sans-serif;
}
input:checked + .sliderTS {
	background-color: #00878f;
}
input:checked + .sliderTS:before {
	-webkit-transform: translateX(26px);
	-ms-transform: translateX(26px);
	transform: translateX(26px);
}
input:checked + .sliderTS:after {
	left: 25%;
	content: 'ON';
}
input:focus + .sliderTS {
	box-shadow: 0 0 1px #2196f3;
}
input:disabled + .sliderTS {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}
.Graph-content {
	text-align: center;
	padding: 1px;
}
.Footer {
	padding-top: 300px;
}
.Footer .credits {
	text-align: center;
	color: #666;
}
.Footer .link {
	color: #7bf F;
	text-decoration: none;
}
.sidebar {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	right: -100%;
	width: 80%;
	height: 80vh;
	max-height: 800px;
	max-width: 900px;
	background-color: #fff;
	box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 8px;
	margin: 5px;
	touch-action: none !important; /* <-- ADD THIS LINE */
}
.sidebar.open {
	right: 0;
}
.sidebar-header {
	padding: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #eee;
}
.sidebar-header h3 {
	margin: 0;
	color: #0c6980;
	font-size: 1.2rem;
}
.close-btn {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	padding: 0 8px;
}
.graph-controls {
	padding: 5px;
	display: flex;
	gap: 10px;
	border-bottom: 1px solid #eee;
	flex-wrap: wrap;
}
#sidebarChart {
	flex: 1;
	min-height: 300px;
	padding: 15px;
	width: 100%;
	touch-action: none !important; /* Use !important to be certain */
}
.detailText-css {
	background-color: #f8f9fa;
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 8px;
	font-size: 11px;
	line-height: 1.2;
	margin: 5px 15px;
}
.detailText-row {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	padding: 2px 0;
	border-bottom: 1px solid #eee;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.detailText-row:last-child {
	border-bottom: none;
}
.detailText-col {
	display: flex;
	align-items: center;
	gap: 4px;
	flex: 1;
	min-width: 0;
}
.detailText-label {
	color: #0c6980;
	font-weight: 600;
	min-width: 70px;
	font-size: 11px;
}
.detailText-value {
	color: #333;
	font-size: 11px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.logout-btn {
	margin: 5px;
	font-size: 15px;
	color: #fff;
	width: 85px;
	background: #0a5460;
	border: none;
	padding: 8px 16px;
	font-weight: 600;
	border-radius: 4px;
	cursor: pointer;
	transition: 0.3s ease;
}
.logout-btn:hover {
	background: #f80909;
}
.tk {
	position: relative;
	width: 40%;
	height: 100px;
	padding-top: 45px;
	margin: 0 auto;
	background: rgba(56, 56, 56, 0.8);
	border-radius: 100%/40px;
	border-bottom: 3px solid #000;
	text-align: center;
	z-index: 1;
	overflow: hidden;
}
.lq {
	position: absolute;
	background: rgba(0, 170, 170, 1.0);
	width: 100%;
	height: 0;
	bottom: 0;
	border-radius: 100%/40px;
	border-bottom: 3px solid #000;
}
.ring {
	position: absolute;
	border-radius: 100%;
	top: 0;
	width: 100%;
	height: 40%;
	content: '';
	border: 1px solid #000;
}
.text {
	display: block;
	position: absolute;
	top: 35%;
	left: 33%;
	z-index: 1;
}
.tkDn {
	position: relative;
	width: 40%;
	height: 100px;
	padding-top: 45px;
	margin: 0 auto;
	background: rgba(56, 56, 56, 0.8);
	border-radius: 100%/40px;
	border-bottom: 3px solid #000;
	text-align: center;
	z-index: 1;
	overflow: hidden;
}
.lqDn {
	position: absolute;
	background: rgba(0, 170, 170, 1.0);
	width: 100%;
	height: 0;
	bottom: 0;
	border-radius: 100%/40px;
	border-bottom: 3px solid #000;
}
.ringDn {
	position: absolute;
	border-radius: 100%;
	top: 0;
	width: 100%;
	height: 40%;
	content: '';
	border: 1px solid #000;
}
.textDn {
	display: block;
	position: absolute;
	top: 35%;
	left: 33%;
	z-index: 1;
}
#installBtn {
	position: fixed;
	bottom: 10px;
	right: 10px;
	padding: 5px 7px;
	background-color: #0c6980;
	color: white;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	gap: 10px;
}
#installBtn:hover #installText {
	display: inline;
}
#installText {
	display: none;
}
.mobile-nav-bar {
 /* Matches your theme */
	display: none;
}
@media (forced-colors: active) {
	.button {
		forced-color-adjust: none;
	}
	.switch {
		forced-color-adjust: none;
	}
	.sliderTS {
		forced-color-adjust: none;
	}
	.view-btn {
		forced-color-adjust: none;
	}
}
@media (max-width: 600px) {
	.sidebar {
		width: 100%;
		min-width: 100%;
		height: 85%;
        right: -110%; 
		margin: 0;
        border-radius: 0; 
	}
	#sidebarChart {
		min-height: 250px;
	}
    .sidebar.open {
        right: 0; /* This will now correctly override the -110% */
    }
	/* .info-panel {
		display: none;
	} */
	.graph-controls {
		flex-direction: row;
		padding: 8px;
		gap: 4px;
		flex-wrap: wrap;
	}
	.graph-controls .mode-btn {
		font-size: 12px;
		padding: 6px 8px;
		min-width: unset;
		width: calc(50% - 2px);
		margin: 0;
	}
	.graph-controls .navigation-controls {
		width: 100%;
		justify-content: space-between;
		margin: 5px 0 0 0;
		gap: 4px;
	}
	.graph-controls .nav-btn {
		padding: 6px 8px;
		font-size: 12px;
		min-width: unset;
	}
	.graph-controls #currentDateDisplay {
		padding: 6px 8px;
		font-size: 12px;
		min-width: 80px;
	}
}
@media (max-width: 768px) {
    /* Hide the original button containers on mobile */
    .cards .button-group,
    .content > div:has(> .logout-btn) {
      display: none;
    }

    /* Add padding to the bottom of the body to prevent the new floating bar from overlapping the last content */
    body {
      padding-bottom: 80px; /* Adjust this value based on the height of your chosen nav bar */
        font-size: 14px;
    }
	.card.header button {
		width: auto;
		margin: 5px 0;
	}
	.nav-menu {
		flex-direction: column;
		text-align: center;
	}
	.btn {
		width: 100%;
		padding: 15px;
	}
	.menu-toggle {
		display: block;
	}
	.menu {
		display: none;
		flex-direction: column;
		background-color: #3eb2c8;
		position: absolute;
		top: 60px;
		right: 0;
		width: 100%;
		text-align: center;
	}
	.menu li {
		margin: 10px 0;
	}
	.menu.active {
		display: flex;
	}
	.sidebar.open {
        right: 0; /* This will now correctly override the -110% */
    }
}
@media screen and (min-width: 1024px) {
	.sidebar {
		width: 70%;
		height: 75vh;
		max-height: 700px;
	}
	#sidebarChart {
		min-height: 330px;
	}
}
@media screen and (max-width: 1023px) {
	.sidebar {
		width: 85%;
	}
}
/* ================================================= */
/* ===== OPTION 1: MOBILE FLOATING TAB BAR STYLES ==== */
/* ================================================= */
@media (max-width: 768px) {
    .mobile-nav-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background-color: #0c6980; /* Matches your theme */
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: white;
        flex-grow: 1;
        height: 100%;
        transition: background-color 0.2s ease-in-out;
    }

    .mobile-nav-item:hover, .mobile-nav-item:active {
        background-color: #2596be; /* A lighter hover color */
    }

    .mobile-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-nav-item span {
        font-size: 11px;
        font-weight: 500;
    }

    /* Hide the original desktop install button on mobile */
    #installBtn {
        display: none;
    }
}