/* Kahvi Styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background-color: #f8f8f8;
	color: #333;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	padding: 10px;
	transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
	background-color: #121212;
	color: #eee;
}

body.dark-mode::-webkit-scrollbar {
	width: 8px;
}

body.dark-mode::-webkit-scrollbar-track {
	background: #333;
}

body.dark-mode::-webkit-scrollbar-thumb {
	background: #555;
	border-radius: 4px;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
	background: #777;
}

body.dark-mode .control-box input[type="number"],
body.dark-mode .control-box input[type="text"] {
	color: #eee;
	border-bottom: 1px solid #555;
}

body.dark-mode #timer {
	color: #eee;
}

body.dark-mode #chart-container {
	background-color: #212121;
	box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

body.dark-mode #controls .control-box {
	background: #333;
	color: #eee;
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

body.dark-mode #controls .control-box:hover {
	background-color: #444;
	box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.15);
}

body.dark-mode .control-box.timer-box:hover {
	background-color: #333;
	box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
	transition: none;
}

body.dark-mode canvas#pricesChart {
	background-color: #212121;
	border: 1px solid #333;
	box-shadow: 0 2px 7px rgba(255, 255, 255, 0.06);
}

body.dark-mode #toggle-controls .toggle-checkbox input[type="checkbox"] {
	background-color: #333;
	border-color: #555;
}

body.dark-mode #toggle-controls .toggle-checkbox input[type="checkbox"]:hover {
	border-color: #777;
}

body.dark-mode #toggle-controls .toggle-checkbox input[type="checkbox"]:checked {
	border-color: #36a2eb;
	background-color: #333;
}

body.dark-mode .toggle-checkbox input[type="checkbox"]:checked::before {
	color: #36a2eb;
}

body.dark-mode #toggle-controls .toggle-checkbox label {
	color: #ccc;
}

body.dark-mode #average-prices {
	box-shadow: 0 5px 15px rgba(255, 255, 255, 0.15);
}

body.dark-mode #average-prices > div {
	border-right: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode #average-prices > div:nth-child(1) {
	background-color: #444;
}

body.dark-mode #average-prices > div:nth-child(2) {
	background-color: #336699;
}

body.dark-mode #average-prices > div:nth-child(3) {
	background-color: #336666;
}

body.dark-mode #average-prices > div .price-value {
	color: inherit;
}

body.dark-mode #average-prices #yesterday-ckwh {
	color: #bbb;
}
body.dark-mode #average-prices > div:nth-child(1) {
	color: #bbb;
}

body.dark-mode #average-prices #today-ckwh {
	color: #99ccff;
}
body.dark-mode #average-prices > div:nth-child(2) {
	color: #99ccff;
}

body.dark-mode #average-prices #tomorrow-ckwh {
	color: #99e6e6;
}
body.dark-mode #average-prices > div:nth-child(3) {
	color: #99e6e6;
}

body.dark-mode #price-table-container {
	background-color: #212121;
	box-shadow: 0 3px 9px rgba(255, 255, 255, 0.08);
}

body.dark-mode #price-table th {
	background-color: #333;
	color: #eee;
}

body.dark-mode #price-table td {
	border-bottom: 1px solid #555;
	color: #ddd;
}

body.dark-mode #price-table tr.yesterday-row th,
body.dark-mode #price-table tr.yesterday-row td {
	background-color: #444 !important;
	color: #eee;
}

body.dark-mode #price-table tr.today-row th,
body.dark-mode #price-table tr.today-row td {
	background-color: #336699 !important;
	color: #eee;
}

body.dark-mode #price-table tr.tomorrow-row th,
body.dark-mode #price-table tr.tomorrow-row td {
	background-color: #336666 !important;
	color: #eee;
}

body.dark-mode #price-table tbody tr:hover td {
	background-color: transparent;
}

body.dark-mode .day-table tbody tr:not(.price-bar-row):hover td {
	background-color: #2a2a2a;
}

body.dark-mode .price-unit {
	color: #ccc;
}

body.dark-mode .introduction {
	color: #bbb;
}

body.dark-mode #current-price-display {
	background-color: #2a2a2a;
	border: 1px solid #444;
	box-shadow: 0 2px 5px rgba(255, 255, 255, 0.05);
}

body.dark-mode .price-label-minimal {
	color: #ccc;
}

body.dark-mode .price-value-minimal {
	color: #eee;
}

body.dark-mode .price-unit-minimal {
	color: #aaa;
}

.introduction {
	text-align: center;
	color: #666;
	line-height: 1.6;
	padding: 0 20px;
	font-size: 1em;
	margin-top: 20px;
}

#chart-container {
	width: 100%;
	max-width: 1200px;
	background-color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px 20px 0px 20px;
	overflow: hidden;
	margin-bottom: 0px;
}

#chart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin-bottom: 20px;
}

#toggle-controls {
	display: flex;
	justify-content: center;
	gap: 25px;
	margin-top: 15px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.toggle-checkbox {
	display: flex;
	align-items: center;
	margin-bottom: 0;
}

.toggle-checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 20px;
	height: 20px;
	background-color: #fff;
	border: 2px solid #ccc;
	border-radius: 5px;
	cursor: pointer;
	outline: none;
	position: relative;
	transition: border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.toggle-checkbox input[type="checkbox"]:hover {
	border-color: #bbb;
}

.toggle-checkbox input[type="checkbox"]:focus {
	box-shadow: 0 0 0 2px rgba(54, 162, 235, 0.3);
}

.toggle-checkbox input[type="checkbox"]:checked {
	border-color: #36a2eb;
	background-color: #fff;
}

.toggle-checkbox input[type="checkbox"]:checked::before {
	content: '\2713';
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 16px;
	color: #36a2eb;
}

.toggle-checkbox label {
	margin-left: 10px;
	font-weight: 500;
	color: #555;
	cursor: pointer;
	user-select: none;
}

#logo {
	max-width: 440px;
	height: auto;
	display: block;
	margin-bottom: 0px;
	transition: max-width 0.3s ease;
}

.toggle-switches {
	display: flex;
	gap: 15px;
	align-items: center;
}

#theme-toggle,
#minimal-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
}

#theme-toggle input[type="checkbox"],
#minimal-toggle input[type="checkbox"] {
	height: 0;
	width: 0;
	visibility: hidden;
	position: absolute;
}

#theme-toggle label,
#minimal-toggle label {
	cursor: pointer;
	text-indent: -9999px;
	width: 42px;
	height: 22px;
	background: grey;
	display: block;
	border-radius: 100px;
	position: relative;
	transition: background-color 0.3s;
}

#theme-toggle label:after,
#minimal-toggle label:after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 90px;
	transition: 0.3s;
}

#theme-toggle input:checked + label,
#minimal-toggle input:checked + label {
	background: #36a2eb;
}

#theme-toggle input:checked + label:after,
#minimal-toggle input:checked + label:after {
	left: calc(100% - 2px);
	transform: translateX(-100%);
}

#theme-toggle label:active:after,
#minimal-toggle label:active:after {
	width: 24px;
}

.toggle-label {
	font-size: 0.9em;
	color: #555;
	user-select: none;
}

#hourly-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
}

#hourly-toggle input[type="checkbox"] {
	height: 0;
	width: 0;
	visibility: hidden;
	position: absolute;
}

#hourly-toggle label {
	cursor: pointer;
	text-indent: -9999px;
	width: 42px;
	height: 22px;
	background: grey;
	display: block;
	border-radius: 100px;
	position: relative;
	transition: background-color 0.3s;
}

#hourly-toggle label:after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 90px;
	transition: 0.3s;
}

#hourly-toggle input:checked + label {
	background: #36a2eb;
}

#hourly-toggle input:checked + label:after {
	left: calc(100% - 2px);
	transform: translateX(-100%);
}

#hourly-toggle label:active:after {
	width: 24px;
}

#hourly-toggle .toggle-label {
	font-size: 0.9em;
	color: #555;
	user-select: none;
}

body.dark-mode #hourly-toggle .toggle-label {
	color: #ccc;
}

h1 {
	display: none;
	font-weight: 600;
	color: #111;
	text-align: center;
	padding-bottom: 15px;
	margin-bottom: 25px;
}

#controls {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	justify-content: center;
}

.control-box {
	display: flex;
	align-items: center;
	font-size: 16px;
	color: #555;
	padding: 10px 15px;
	background: #f0f1f5;
	border-radius: 8px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
	font-weight: 500;
	transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.control-box.timer-box:hover {
	background-color: #f0f1f5;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: none;
}

.control-box:not(.timer-box):hover {
	background-color: #e8e9ed;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.control-box label {
	margin-right: 8px;
	white-space: nowrap;
	line-height: 1;
	font-size: 0.95em;
}

.control-box input[type="number"],
.control-box input[type="text"] {
	width: 65px;
	text-align: center;
	border: none;
	font-size: 16px;
	font-weight: 500;
	background: transparent;
	outline: none;
	color: #333;
	margin-left: 5px;
	line-height: 1;
	border-bottom: 1px solid #ccc;
	padding-bottom: 2px;
}

.control-box input[type="number"]::-webkit-inner-spin-button {
	opacity: 1
}

#timer {
	width: 65px;
	background: none;
	text-align: center;
	border: none;
	font-size: 16px;
	font-weight: 500;
	border-bottom: 1px solid #ccc;
	padding-bottom: 2px;
	color: #333;
}

#current-price-display {
	width: 100%;
	padding: 20px 10px;
	margin-bottom: 20px;
	background-color: #f0f1f5;
	border-radius: 10px;
	border: 1px solid #eee;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
	min-height: 150px;
	align-items: center;
}

.price-column {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 10px 5px;
}

.price-column.current {
	transform: scale(1.05);
}

.price-label-minimal {
	font-size: 0.9em;
	color: #666;
	margin-bottom: 8px;
	font-weight: 500;
}

.price-value-minimal {
	font-size: 2.8em;
	font-weight: bold;
	color: #111;
	line-height: 1.1;
	display: block;
}

.price-unit-minimal {
	font-size: 0.8em;
	color: #777;
	margin-left: 3px;
	display: inline;
}

canvas#pricesChart {
	width: 100%;
	background-color: #ffffff;
	border-radius: 10px;
	padding: 15px 20px 10px 20px;
	box-shadow: 0 2px 7px rgba(0, 0, 0, 0.06);
	border: 1px solid #eee;
	margin-bottom: 20px;
}

canvas {
	height: auto;
	max-height: 60vh;
	min-height: 200px;
}

body.minimal-mode canvas#pricesChart,
body.minimal-mode #toggle-controls,
body.minimal-mode #price-table-container {
	display: none !important;
}

body.minimal-mode #current-price-display {
	display: grid !important;
}

body.minimal-mode #controls {
	display: none !important;
}

body.minimal-mode #average-prices {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	width: 100%;
}

body.minimal-mode .price-value {
	font-size: 4em !important;
}

body.minimal-mode .introduction {
	display: none !important;
}

.chartjs-canvas {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
}

.chartjs-scales .chartjs-axis {
	font-size: 0.9em;
	color: #aaa;
}

.chartjs-scales .chartjs-axis-x .chartjs-axis-title,
.chartjs-scales .chartjs-axis-y .chartjs-axis-title {
	font-size: 1em;
	font-weight: 400;
	color: #888;
	margin-bottom: 6px;
	margin-left: 6px;
}

.chartjs-scales .chartjs-grid-lines {
	border-color: rgba(0, 0, 0, 0.03);
	border-width: 1px;
}

.chartjs-legend {
	padding-top: 15px;
}

.chartjs-legend-labels li {
	margin-bottom: 4px;
}

.chartjs-legend-labels span {
	font-size: 0.9em;
	color: #999;
}

.chartjs-tooltip {
	opacity: 1;
	pointer-events: none;
	transition: opacity 0.1s ease-out;
	position: absolute;
	left: 0px;
	top: 0px;
	z-index: 1000;
}

.chartjs-tooltip-body {
	font-size: 0.85em;
	color: #555;
	background-color: rgba(255, 255, 255, 0.95);
	padding: 6px 10px;
	border-radius: 5px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	border: 1px solid #eee;
}

.chartjs-tooltip-title {
	font-size: 0.95em;
	font-weight: 500;
	color: #444;
	padding-bottom: 3px;
	margin-bottom: 3px;
	border-bottom: 1px solid #eee;
}

body.dark-mode .chartjs-tooltip-body {
	background-color: rgba(40, 40, 40, 0.95);
	color: #eee;
	border-color: #555;
	box-shadow: 0 1px 3px rgba(255, 255, 255, 0.1);
}

body.dark-mode .chartjs-tooltip-title {
	color: #fff;
	border-bottom-color: #555;
}

#average-prices {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	width: 100%;
	margin-top: 0px;
	margin-bottom: 5px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
	text-align: center;
	font-weight: normal;
	color: #111;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

#average-prices > div {
	padding: 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	min-height: 120px;
	border-right: 1px solid rgba(0, 0, 0, 0.05);
	white-space: normal;
}

#average-prices > div:last-child {
	border-right: none;
}

#average-prices > div:nth-child(1) {
	background-color: #e0e0e0;
	color: #a6a6a6;
}

#average-prices > div:nth-child(2) {
	background-color: #cce0ff;
	color: #80b3ff;
}

#average-prices > div:nth-child(3) {
	background-color: #c2f0f0;
	color: #80d9d9;
}

#price-prev {
	color: #e0e0e0;
	font-size: 3em;
}

#price-current {
	color: #80b3ff;
	font-size: 4em;
}

#price-next {
	color: #e0e0e0;
	font-size: 3em;
}

.price-value {
	display: block;
	font-size: 6em !important;
	font-weight: bold;
	margin-top: 5px;
	margin-bottom: 0;
	line-height: 1;
	letter-spacing: -0.02em;
	color: inherit;
}

#average-prices > div > *:first-child {
	display: block;
	margin-top: 0;
	margin-bottom: 5px;
	font-size: 1em;
	font-weight: normal;
	color: #555;
}

body.dark-mode #average-prices > div > *:first-child {
	color: #ccc;
}

#average-prices [id$="-ckwh"] {
	display: block;
	font-size: 1em;
	font-weight: normal;
	margin-top: 5px;
	margin-bottom: 0;
	color: inherit;
}

@media (max-width: 768px) {
	#chart-header {
		flex-direction: column;
		align-items: center;
		gap: 15px;
	}

	.toggle-switches {
		justify-content: center;
		width: 100%;
	}

	#average-prices {
		grid-template-columns: 1fr;
		border-radius: 10px;
	}

	#average-prices > div {
		border-right: none;
		border-bottom: 1px solid rgba(0, 0, 0, 0.05);
		min-height: 100px;
		padding: 15px;
	}

	#average-prices > div:last-child {
		border-bottom: none;
	}

	body.dark-mode #average-prices > div {
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	}

	body.dark-mode #average-prices > div:last-child {
		border-bottom: none;
	}

	.price-value {
		font-size: 4em !important;
	}

	#logo {
		max-width: 250px;
	}

	#current-price-display {
		grid-template-columns: 1fr;
		gap: 15px;
		padding: 15px;
		min-height: auto;
	}

	.price-column {
		padding: 5px;
		border-right: none;
		border-bottom: 1px solid #eee;
	}

	.price-column:last-child {
		border-bottom: none;
	}

	.price-column.current {
		transform: scale(1);
		order: 0;
	}

	.price-value-minimal {
		font-size: 2.5em;
	}

	.price-label-minimal {
		font-size: 0.8em;
	}

	.price-unit-minimal {
		font-size: 0.7em;
	}

	body.dark-mode .price-column {
		border-bottom: 1px solid #444;
	}

	body.dark-mode .price-column:last-child {
		border-bottom: none;
	}

	body.minimal-mode #average-prices {
		grid-template-columns: 1fr;
	}
}

#price-table-container {
	width: 100%;
	overflow-x: auto;
	margin-top: 20px;
	background-color: #fff;
	border-radius: 12px;
	box-shadow: 0 3px 9px rgba(0, 0, 0, 0.08);
	padding: 15px;
}

#price-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
	color: #333;
}

#price-table th,
#price-table td {
	padding: 12px 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
}

#price-table thead th {
	background-color: #f7f7f7;
	font-weight: bold;
	color: #555;
	text-transform: capitalize;
	position: sticky;
	top: 0;
	z-index: 10;
}

#price-table tbody tr:last-child td {
	border-bottom: none;
}

#price-table td:first-child {
	font-weight: 500;
	color: #444;
	white-space: nowrap;
}

#price-table tr.yesterday-row th,
#price-table tr.yesterday-row td {
	background-color: #e0e0e0 !important;
	color: #111;
}

#price-table tr.today-row th,
#price-table tr.today-row td {
	background-color: #cce0ff !important;
	color: #111;
}

#price-table tr.tomorrow-row th,
#price-table tr.tomorrow-row td {
	background-color: #c2f0f0 !important;
	color: #111;
}

#price-table-container .price-table-container {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	justify-content: space-between;
	align-items: stretch;
	width: 100%;
}

#price-table-container .price-table-container .day-table {
	flex: 1 1 30%;
	min-width: 280px;
	margin: 0;
}

@media (max-width: 768px) {
	#price-table-container {
		padding: 10px;
	}

	#price-table-container .price-table-container {
		flex-direction: column;
		flex-wrap: nowrap;
		gap: 20px;
		align-items: stretch;
	}

	#price-table-container .price-table-container .day-table {
		flex: 1 1 auto;
		width: 100% !important;
		max-width: none !important;
		font-size: 0.9em;
		margin: 0;
	}

	.day-table th,
	.day-table td {
		padding: 8px 10px;
	}

	.day-table caption {
		font-size: 1rem;
		padding: 10px;
		border-radius: 8px 8px 0 0;
	}
}

#price-table tr.yesterday-row th[colspan="2"],
#price-table tr.today-row th[colspan="2"],
#price-table tr.tomorrow-row th[colspan="2"],
#price-table tr.yesterday-row td[colspan="2"],
#price-table tr.today-row td[colspan="2"],
#price-table tr.tomorrow-row td[colspan="2"] {
	font-weight: bold;
	text-align: center;
	color: #333;
}

body.dark-mode #price-table tr.yesterday-row th[colspan="2"],
body.dark-mode #price-table tr.today-row th[colspan="2"],
body.dark-mode #price-table tr.tomorrow-row th[colspan="2"],
body.dark-mode #price-table tr.yesterday-row td[colspan="2"],
body.dark-mode #price-table tr.today-row td[colspan="2"],
body.dark-mode #price-table tr.tomorrow-row td[colspan="2"] {
	color: #eee;
}

#price-table tbody tr:not(.yesterday-row):not(.today-row):not(.tomorrow-row):hover td {
	box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.04);
}

body.dark-mode #price-table tbody tr:not(.yesterday-row):not(.today-row):not(.tomorrow-row):hover td {
	box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
	#price-table-container {
		border-radius: 8px;
		padding: 10px;
		box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	}

	#price-table {
		font-size: 0.9em;
	}

	#price-table th,
	#price-table td {
		padding: 8px 10px;
	}
}

.hidden-data {
	display: none;
}

.na-price {
	color: #bbb;
}

body.dark-mode .na-price {
	color: #666;
}

#price-table .price-unit {
	color: #777;
	font-size: 0.85em;
	font-weight: normal;
	margin-left: 3px;
	display: inline;
}

body.dark-mode #price-table .price-unit {
	color: #aaa;
}

#price-table-container .price-table-container {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	justify-content: space-between;
	align-items: stretch;
	width: 100%;
}

#price-table-container .price-table-container .day-table {
	flex: 1 1 0;
	width: 0;
	min-width: 0;
	margin: 0;
}

.day-table {
	border-collapse: collapse;
	width: 100%;
	max-width: none;
	background: var(--panel, rgba(255, 255, 255, 0.05));
	border-radius: 10px;
	overflow: hidden;
	font-size: 0.9rem;
}

.day-table caption {
	font-weight: 600;
	text-align: center;
	padding: 10px;
	background: var(--accent, #36a2eb);
	color: #fff;
}

.day-table th,
.day-table td {
	padding: 6px 10px;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.day-table tr:last-child td {
	border-bottom: none;
}

.yesterday-row caption {
	background-color: #e0e0e0;
	color: #111;
	padding: 12px 10px;
	font-weight: 700;
	font-size: 1rem;
}

.today-row caption {
	background-color: #cce0ff;
	color: #111;
	padding: 12px 10px;
	font-weight: 700;
	font-size: 1rem;
}

.tomorrow-row caption {
	background-color: #c2f0f0;
	color: #111;
	padding: 12px 10px;
	font-weight: 700;
	font-size: 1rem;
}

.day-table caption {
	text-align: center;
	display: table-caption;
	caption-side: top;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
}

.day-table caption,
.day-table thead th {
	box-shadow: none;
}

body.dark-mode .yesterday-row caption {
	background-color: #444;
	color: #eee;
}

body.dark-mode .today-row caption {
	background-color: #336699;
	color: #eee;
}

body.dark-mode .tomorrow-row caption {
	background-color: #336666;
	color: #eee;
}

@media (max-width: 640px) {
	.day-table caption {
		font-size: 0.95rem;
		padding: 10px 8px;
	}
}

.copy {
	text-align: center;
	color: #666;
	line-height: 1.6;
	padding-top: 5px;
	font-size: 0.8em;
}

.current-time-row td {
	border-top: 2px solid #36a2eb !important;
	border-bottom: 2px solid #36a2eb !important;
	background-color: rgba(54, 162, 235, 0.15) !important;
	font-weight: 700 !important;
	color: #111 !important;
}

.current-time-row td:first-child {
	border-left: 2px solid #36a2eb !important;
}

.current-time-row td:last-child {
	border-right: 2px solid #36a2eb !important;
}

body.dark-mode .current-time-row td {
	background-color: rgba(54, 162, 235, 0.25) !important;
	color: #fff !important;
}

/* --- Price table row-chart styling --- */

.day-table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background-color: #f7f7f7;
}

body.dark-mode .day-table thead th {
	background-color: #2b2b2b;
	color: #eee;
}

.day-table tbody tr.price-bar-row {
	--fill-percent: 0%;
	--bar-color: rgba(54, 162, 235, 0.22);
	--hover-tint: transparent;
	background-image:
		linear-gradient(
			to right,
			var(--hover-tint) 0%,
			var(--hover-tint) 100%
		),
		linear-gradient(
			to right,
			var(--bar-color) 0%,
			var(--bar-color) var(--fill-percent),
			transparent var(--fill-percent),
			transparent 100%
		);
	background-repeat: no-repeat;
	background-size: 100% 100%, 100% 100%;
	transition: background-image 0.15s ease, transform 0.1s ease;
}

.day-table.yesterday-row tbody tr.price-bar-row {
	--bar-color: rgba(160, 160, 160, 0.28);
}

.day-table.today-row tbody tr.price-bar-row {
	--bar-color: rgba(54, 162, 235, 0.22);
}

.day-table.tomorrow-row tbody tr.price-bar-row {
	--bar-color: rgba(75, 192, 192, 0.24);
}

.day-table tbody tr.price-bar-row:hover {
	--hover-tint: rgba(0, 0, 0, 0.04);
}

body.dark-mode .day-table.yesterday-row tbody tr.price-bar-row {
	--bar-color: rgba(160, 160, 160, 0.22);
}

body.dark-mode .day-table.today-row tbody tr.price-bar-row {
	--bar-color: rgba(54, 162, 235, 0.28);
}

body.dark-mode .day-table.tomorrow-row tbody tr.price-bar-row {
	--bar-color: rgba(75, 192, 192, 0.30);
}

body.dark-mode .day-table tbody tr.price-bar-row:hover {
	--hover-tint: rgba(255, 255, 255, 0.05);
}

.day-table tbody tr.price-bar-row td {
	background: transparent;
	position: relative;
	z-index: 1;
}

.day-table tbody tr.price-bar-row td:first-child {
	font-weight: 600;
	white-space: nowrap;
}

.day-table tbody tr.price-bar-row td:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.day-table tbody tr.price-bar-row.na-row {
	background-image: none !important;
	opacity: 0.75;
}

body.dark-mode .day-table.yesterday-row tbody tr.price-bar-row {
	background-image: linear-gradient(
		to right,
		rgba(160, 160, 160, 0.22) 0%,
		rgba(160, 160, 160, 0.22) var(--fill-percent),
		transparent var(--fill-percent),
		transparent 100%
	);
}

body.dark-mode .day-table.today-row tbody tr.price-bar-row {
	background-image: linear-gradient(
		to right,
		rgba(54, 162, 235, 0.28) 0%,
		rgba(54, 162, 235, 0.28) var(--fill-percent),
		transparent var(--fill-percent),
		transparent 100%
	);
}

body.dark-mode .day-table.tomorrow-row tbody tr.price-bar-row {
	background-image: linear-gradient(
		to right,
		rgba(75, 192, 192, 0.30) 0%,
		rgba(75, 192, 192, 0.30) var(--fill-percent),
		transparent var(--fill-percent),
		transparent 100%
	);
}