html {
	overflow: hidden;
}

body {
	background: #444444;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	font-family: 'Share Tech Mono', monospace;
	overflow: hidden;
}

dialog:-internal-dialog-in-top-layer::backdrop {
    position: fixed;
    inset: 0px;
    background: rgb(68 68 68 / 90%);
}

.grid {
	display: grid;
	grid-template-columns: 70px 1fr;
	grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
	width: 400px;
	height: 800px;
	margin-bottom: 2px;
}

.cell {
	white-space: nowrap;
	position: relative;
	font-size: 20px;
	text-transform: uppercase;
	border-radius: 10px;
	margin: 2px;
	background: #556e5f;
	color: white;
	box-shadow: 2px 2px 5px #00000040;
}

.cell.temp {
	font-size: 30px;
	grid-column-start: 2;
	grid-column-end: 2;
	overflow: hidden;
}

.cell .celsius {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.cell.temp::before {
	content: "";
	width: 30px;
	height: 30px;
	background-position: center;
	background-size: 30px;
	background-repeat: no-repeat;
	margin-right: 6px;
	overflow: visible;
	position: absolute;
	left: 10px;
	bottom: 10px;
	opacity: 0.3;
	z-index: 1;
}

.cell.temp[data-room="Office"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/computer-pc-2.svg/ffffff);
}

.cell.temp[data-room="Living Room"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/television.svg/ffffff);
}

.cell.temp[data-room="Downstairs"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/tools-driller.svg/ffffff);
}

.cell.temp[data-room="Bedroom"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/bed-double.svg/ffffff);
}

.cell.temp[data-room="Cookies"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/baby-bed.svg/ffffff);
}

.cell.temp[data-room="Outdoors"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/tree-big-2.svg/ffffff);
}

.cell.temp[data-room="Shed"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/box-1.svg/ffffff);
}

.cell.temp[data-room="Attic"]::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/box-storehouse.svg/ffffff);
}

.cell.temp[data-room="Outdoors"] {
	grid-column-start: 1;
	grid-column-end: 3;
}

.cell.temp[data-room="Shed"] {
	grid-column-start: 1;
	grid-column-end: 3;
}

.cell.temp[data-room="Attic"] {
	grid-column-start: 1;
	grid-column-end: 3;
}

#costOfEnergy,
#currentEnergy {
	background: #727272;
	border: 5px solid #727272;
}

#currentEnergy path {
	fill: #4a4a4a;
}

.cell .name {
	font-size: 10px;
	position: absolute;
	top: 5px;
	left: 10px;
}

.cell .lastUpdated,
.maxUsage,
.topRight {
	font-size: 10px;
	position: absolute;
	top: 5px;
	right: 10px;
}

.cell .lastUpdated {
	opacity: 0.3;
}

.cell .humidity,
.peakUsage,
.minUsage,
.medianUsage,
.bottomRight {
	font-size: 10px;
	position: absolute;
	bottom: 5px;
	right: 10px;
}

.humidity::before,
.maxUsage::before,
.minUsage::before,
.peakUsage::before,
.medianUsage::before {
	content: "";
	background-image: url(https://mediacore.nextcanvas.com/icon/blood-drop.svg/ffffff);
	height: 10px;
	width: 10px;
	display: inline-block;
	background-size: 8px;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
	right: 2px;
	top: 7px;
	transform: translateY(-50%);
}

.maxUsage::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/arrow-up-10.svg/ffffff);
}

.minUsage::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/arrow-down-10.svg/ffffff);
}

.peakUsage::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/shower.svg/ffffff);
}

.medianUsage::before {
	background-image: url(https://mediacore.nextcanvas.com/icon/crosshair-2.svg/ab3d3c);
}

.medianUsage {
	left: 10px;
	right: unset;
}

.desc {
	text-align: center;
	writing-mode: vertical-lr;
	grid-column: 1;
	line-height: 66px;
	transform: scale(-1, -1);
}

.upperFloor {
	grid-row: 1;
	grid-row-end: 3;
	animation-delay: 1.2s;
}

.bottomFloor {
	grid-row: 3;
	grid-row-end: 6;
	animation-delay: 1.5s;
}

.energy {
	text-align: center;
	grid-column-start: 1;
	grid-column-end: 3;
	font-size: 30px;
	padding: 10px;
	background: #587A79;
	text-transform: unset;
	overflow: hidden;
	border: 5px solid #587a78;
}

.bigValue {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
}

.smallTitle {
	font-size: 10px;
	position: absolute;
	top: 5px;
	left: 10px;
}

#usageChart svg,
#accumulatedChart svg,
#weeklyGrid .cell svg {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
	opacity: 0.5;
	border-radius: 7px;
}

.cell path {
	fill: #3b4f4a;
}

#weeklyGrid .cell {
	grid-column-start: 1;
	grid-column-end: 1;
}

#weeklyGrid .cell.bars {
	grid-column-start: 2;
	grid-column-end: 2;
	box-shadow: none;
	margin: 5px;
	margin-left: -5px;
	margin-right: 0;
	position: relative;
	z-index: -1;
	background: #4e4e4e;
}

div#weekSummary {
	grid-column-end: 3 !important;
	font-size: 20px;
	text-transform: uppercase;
}

#weeklyGrid .bar {
	height: 25%;
	background: white;
	box-shadow: 2px 2px 2px #0000004a;
	min-width: 5px;
	border-radius: 0px 10px 10px 0;
}

#weeklyGrid .bar:nth-child(2) {
	background: #ab3d3c;
	position: absolute;
	top: 50%;
	margin-top: -11.25px;
}

#weeklyGrid .bar:nth-child(3) {
	position: absolute;
	bottom: 0;
	background: #4a6562;
}

#weeklyGrid .peakUsage {
	left: 50%;
	right: unset;
	transform: translateX(-50%);
}

div#weeklyGrid {
	grid-template-columns: 1fr 70px;
}

#weeklyGrid .cell div {
	z-index: 1;
}

#mainWrapper {
	display: none;
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

#mainContainer {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	padding: 5px;
	overflow-x: hidden;
}

#spinner>div {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.gauge {
	position: absolute;
	bottom: 5px;
	left: 60px;
	right: 60px;
	height: 10px;
	background: linear-gradient(90deg, #3d4268, transparent, #ab3d3c);
	z-index: 1;
}

.cell[data-room="Outdoors"] .gauge,
.cell[data-room="Shed"] .gauge,
.cell[data-room="Attic"] .gauge {
	background: linear-gradient(90deg, #444444, #444444, #3d4268, transparent, #ab3d3c);
}

.gauge div:first-child {
	position: absolute;
	width: 2px;
	height: 6px;
	top: 5px;
	margin-top: -3px;
	margin-left: -1px;
	background: white;
}

div.minMax {
	position: absolute;
	height: 2px;
	border: none;
	top: 5px;
	margin-top: -1px;
	background: white;
	margin-left: unset;
}

.gauge::after {
	content: ".";
	position: absolute;
	background: #88998f;
	width: 1px;
	height: 10px;
	left: 50%;
	bottom: 0;
}

.cell.temp div {
	z-index: 1;
}

.tempChart {
	height: 100%;
}


.tempChart svg {
	opacity: 0.5;
}

.title {
	top: 50%;
	position: absolute;
	left: 0;
	right: 0;
	transform: translateY(-50%);
}

.subtitle {
	font-size: 10px;
}

#tempShowcase {
	display: none;
	grid-row: 8;
	grid-row-end: 9;
	grid-column: 1;
	grid-column-end: 3;
}

#tempShowcase>div {
	width: 50%;
	height: 100%;
	float: left;
	position: relative;
}

#tempShowcase>div>div {
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 10px;
	right: 10px;
	border-radius: 10px;
	background-color: #465d53;
}

#tempShowcase>div:first-child>div {
	right: 5px;
}

#tempShowcase>div:last-child>div {
	left: 5px;
}

#tempShowcase .showcaseValue {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 27px;
}

.showcaseTitle {
	font-size: 10px;
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translate(-50%, 0);
}

.showcaseHeader,
#histogramHeader {
	font-size: 10px;
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
}

#weekHistogram,
#dayHistogram {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}

#energyHistogram {
	padding: 0;
	grid-row: 5;
	grid-row-end: 9;
	grid-column: 1;
	grid-column-end: 3;
}

#energyHistogram svg {
	height: calc(80% - 5px);
	width: 80%;
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding-top: 5px;
	border-bottom: 2px solid white;
}

#weekHistogram svg rect {
	fill: #4a6562 !important;
}

.lightSwitch {
	position: absolute;
	width: 30px;
	height: 30px;
	background-position: center;
	background-size: 30px;
	background-repeat: no-repeat;
	margin: 10px;
	cursor: pointer;
}

#lightsOn {
	left: 0;
	background-image: url(https://mediacore.nextcanvas.com/icon/lightbulb-3.svg/ffffff);
}

#lightsOff {
	left: 0;
	top: 50px;
	background-image: url(https://mediacore.nextcanvas.com/icon/lightbulb-3.svg/00000);
}

#closeLight {
    float: right;
}

#lights {
	background: #727272;
	border-radius: 10px;
	color: white;
	box-shadow: 2px 2px 5px #00000040;
	border: none;
	outline: none;
	padding: 20px;
	width: 300px;
}

#lights button {
    background-color: #5e5e5e;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 2px 2px 5px #00000040;
    cursor: pointer;
    outline: none;
    border: none;
    box-sizing: unset;
    color: white;
    width: 50px;
	cursor: pointer;
}

#lights button:hover {
    background-color: #404040;
}

#lightsContent input {
    width: 100%;
	cursor: pointer;
	margin-bottom: 20px;
}

#lights input[type="range"]:focus {
	outline: none;
	border: none;
	box-shadow: none;
}

#colorPreview {
	height: 100px;
    background-color: rgb(0, 0, 0);
    border-radius: 10px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
}

#showChat {
	right: 0;
	top: 0;
	background-image: url(https://mediacore.nextcanvas.com/icon/chat-double-bubble-2.svg/ffffff);
}

#chat {
	height: 100%;
	width: 100%;
	background: #727272;
	border-radius: 10px;
	color: white;
	box-shadow: 2px 2px 5px #00000040;
	border: none;
	outline: none;
	padding: 0;
}

#chatContent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 65px;
	overflow-y: scroll;
	margin-bottom: 125px;
}

#chatContent::-webkit-scrollbar {
	display: none !important;
}

div#chatButton {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 10px;
	background-color: #5e5e5e;
	text-align: center;
	padding: 10px;
	border-radius: 10px;
	box-shadow: 2px 2px 5px #00000040;
	cursor: pointer;
	height: 30px;
	line-height: 30px;
}

#chatInput:not(.disabled) #chatButton:hover {
	background-color: #404040;
}

#chatInput.disabled {
	cursor: normal;
	opacity: 0.3;
	pointer-events: none;
}

#chatInput input {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 70px;
	border: none;
	outline: none;
	padding: 10px;
	border-radius: 10px;
	height: 30px;
	line-height: 30px;
}

.chatBubble {
	padding: 10px;
	background: #5e5e5e;
	margin: 5px 10px;
	border-radius: 10px;
}

.chatBubble b {
	color: rgb(255, 0, 0);
}

.chatBubble.user {
	background-color: #444444;
}

.chatBubble:empty::before {
	content: "Alfred is thinking...";
	color: #727272;
}

#news {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1;
	background: rgb(68 68 68 / 90%);
	cursor: pointer;
}

#newsContent {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 600px;
	transform: translate(-320px, -50%);
	text-align: center;
	color: white;
	padding: 20px;
	overflow: auto;
}

#newsRead {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 50px;
	height: 50px;
	background-image: url(https://mediacore.nextcanvas.com/icon/volume-max-1.svg/ffffff);
	background-position: center;
	background-size: 30px;
	background-repeat: no-repeat;
}

#spinner {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: #444444;
	z-index: 2;
}