:root {
	--panel-bg: #FFFFFF;
	--text-color: #333333;
	--border-color: #E0E0E0;
	--shadow-color: rgba(0, 0, 0, 0.1);
	--button-bg: #007BFF;
	--button-hover-bg: #0056B3;
	--loader-bg: rgba(255, 255, 255, 0.9);
	--sidebar-width-desktop: 25%;
	--sidebar-width-tablet: 45%;
	--sidebar-height-mobile: 60%;
	--error-bg: #DC3545;
	--error-text: white;
}

html,
body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	overflow: hidden;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: #F0F2F5;
}

#map {
	width: 100%;
	height: 100%;
	background-color: #F0F0F0;
}

.loader {
	font-size: 1.3em;
	font-weight: 600;
	position: absolute;
	z-index: 1000;
	top: 50%;
	left: 50%;
	padding: 25px 40px;
	transform: translate(-50%, -50%);
	text-align: center;
	color: var(--text-color);
	border-radius: 12px;
	background-color: var(--loader-bg);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.error-message-container {
	position: fixed;
	z-index: 1001;
	bottom: 20px;
	left: 50%;
	display: flex;
	flex-direction: column;
	transform: translateX(-50%);
	gap: 10px;
}

.error-message {
	font-size: 1em;
	padding: 12px 25px;
	animation: fadeInOut 5s forwards;
	opacity: 0;
	color: var(--error-text);
	border-radius: 8px;
	background-color: var(--error-bg);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInOut {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}
	10% {
		opacity: 1;
		transform: translateY(0);
	}
	90% {
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		opacity: 0;
		transform: translateY(20px);
	}
}

.sidebar {
	position: fixed;
	z-index: 100;
	top: 0;
	right: 0;
	display: flex;
	overflow-y: auto;
	flex-direction: column;
	width: var(--sidebar-width-desktop);
	height: 100%;
	padding-bottom: 20px;
	transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
	transform: translateX(100%);
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(8px);
}

.sidebar.active {
	transform: translateX(0);
}

.sidebar-content {
	padding: 15px;
}

.card {
	margin-bottom: 20px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background-color: var(--panel-bg);
	box-shadow: 0 4px 15px var(--shadow-color);
}

.card-body {
	padding: 20px 25px;
}

.card-title {
	font-size: 1.4em;
	font-weight: 700;
	margin-bottom: 15px;
	padding-bottom: 10px;
	color: #2C3E50;
	border-bottom: 1px solid var(--border-color);
	margin-block-start: 0;
}

.f-local,
.f-start,
.f-nature,
.f-location,
.f-status,
.f-meteo,
.f-extra,
.f-danger {
	font-size: 1.05em;
	line-height: 1.6;
	margin-right: 1rem;
	margin-bottom: 10px;
	margin-left: 1rem;
	color: var(--text-color);
	margin-block-start: 0;
}

.assets {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: space-around;
	margin-top: 15px;
	padding: 12px 0;
	border-top: 1px dashed var(--border-color);
	border-bottom: 1px dashed var(--border-color);
}

.assets-icon {
	width: 30px;
	height: 30px;
	margin: 0 10px;
}

.assets-nr {
	font-size: 1.3em;
	font-weight: 600;
	margin-right: 20px;
	color: #495057;
}

canvas#fireChart {
	width: 100% !important;
	height: auto !important;
	max-height: 300px;
	margin-top: 20px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
}

.fire-marker {
	cursor: pointer;
}

.dot {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	border-radius: 50%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 60%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.dot.dot-active {
	width: 48px;
	height: 48px;
	border: 3px solid var(--button-bg);
	box-shadow: 0 4px 10px rgba(0, 123, 255, 0.5);
}

.dot.status-99,
.dot.status-important,
.dot.status-99-r,
.dot.status-5,
.dot.status-7,
.dot.status-8 {
	background-image: url("../img/ico_fire.svg");
}

.dot.status-3,
.dot.status-4 {
	background-image: url("../img/ico_alarm.svg");
}

.dot.status-6,
.dot.status-10 {
	background-image: url("../img/ico_pointer.svg");
}

.dot.status-9 {
	background-image: url("../img/ico_watch.svg");
}

.dot.status-11,
.dot.status-12 {
	background-image: url("../img/ico_fake.svg");
}

.dot.status-99,
.dot.status-important {
	background-color: #FF410C;
}

.dot.status-99-r {
	background-color: #0C5DFF;
}

.dot.status-3,
.dot.status-5,
.dot.status-6 {
	background-color: #B81E1F;
}

.dot.status-4 {
	background-color: #FF6E02;
}

.dot.status-7,
.dot.status-9 {
	background-color: #65C4ED;
}

.dot.status-8 {
	background-color: #8E7E7D;
}

.dot.status-10 {
	background-color: #6ABF59;
}

.dot.status-11,
.dot.status-12 {
	background-color: #BDBDBD;
}

.dot.dotInfo,
.dot.timelineDot {
	display: flex;
	float: left;
	overflow: visible;
	align-items: center;
	justify-content: center;
	width: 24px;
	max-width: 100%;
	height: 24px;
	max-height: 100%;
	margin-left: -13px;
	border-radius: 50%;
}

.extra,
.danger {
	display: none;
}

.extra.active,
.danger.active {
	display: block;
}

.f-location a {
	font-weight: 500;
	text-decoration: none;
	color: var(--button-bg);
}

.f-location a:hover {
	text-decoration: underline;
	color: var(--button-hover-bg);
}

.mapboxgl-ctrl-group.custom-controls {
	display: flex;
	overflow: hidden;
	flex-direction: column;
	max-width: 320px;
	max-height: 90vh;
	margin: 15px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background-color: var(--panel-bg);
	box-shadow: 0 6px 20px var(--shadow-color);
}

.custom-controls-categories-wrapper {
	overflow-y: auto;
	padding: 10px;
}

.custom-controls .layer-category-title {
	font-size: 1.1em;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 5px;
	padding: 10px 8px;
	cursor: pointer;
	color: #2C3E50;
	border-bottom: 1px solid var(--border-color);
}

.layer-category-container.collapsed .overlay-buttons-container {
	display: none !important;
}

.layer-category-container.collapsed .layer-category-title {
	margin-bottom: 0;
}

.custom-controls .overlay-buttons-container {
	display: flex;
	flex-direction: column;
	padding: 5px 0;
}

.custom-controls button {
	font-size: 1em;
	display: flex;
	align-items: center;
	width: auto;
	margin-bottom: 2px;
	padding: 10px 8px;
	cursor: pointer;
	text-align: left;
	color: var(--text-color);
	border: none;
	border-radius: 6px;
	background: none;
}

.custom-controls button:last-child {
	margin-bottom: 0;
	border-bottom: none;
}

.custom-controls button:hover:not(.active) {
	background-color: #F5F5F5;
}

.custom-controls button.active {
	font-weight: 600;
	color: var(--button-bg);
	background-color: #E6F2FF;
}

.custom-controls button img {
	width: 22px;
	height: 22px;
	margin-right: 10px;
}

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
	display: none !important;
}

.mapbox-legend {
	font-size: 0.95em;
	position: absolute;
	z-index: 1;
	bottom: 0;
	left: 0;
	margin: 15px;
	padding: 15px;
	color: var(--text-color);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background-color: var(--panel-bg);
	box-shadow: 0 4px 15px var(--shadow-color);
}

.mapbox-risk-legend {
	max-width: 160px;
}

.mapbox-weather-legend {
	left: 190px;
	max-width: 200px;
}

.mapbox-weather-legend-alone {
	left: 15px;
	max-width: 200px;
}

.mapbox-legend h4 {
	font-size: 1.15em;
	margin: 0 0 10px 0;
	padding-bottom: 5px;
	color: #2C3E50;
	border-bottom: 1px solid var(--border-color);
}

.mapbox-legend i {
	float: left;
	width: 20px;
	height: 20px;
	margin-right: 10px;
	border-radius: 4px;
}

.mapbox-legend .Reduzido {
	background: #509E2F;
}

.mapbox-legend .Moderado {
	background: #FFE900;
}

.mapbox-legend .Elevado {
	background: #E87722;
}

.mapbox-legend .Muito-Elevado {
	background: #CB333B;
}

.mapbox-legend .Máximo {
	background: #6F263D;
}

@media (max-width: 767px) {
	.sidebar {
		top: auto;
		bottom: 0;
		width: 100%;
		height: var(--sidebar-height-mobile);
		transform: translateY(100%);
	}

	.sidebar.active {
		transform: translateY(0);
	}
}

@media (min-width: 768px) {
	.sidebar-open .mapboxgl-ctrl-top-right,
	.sidebar-open .mapboxgl-ctrl-bottom-right {
		right: calc(10px + var(--sidebar-width-desktop));
	}
}

.status-hour {
	margin-left: 1em;
	margin-block-start: 0%;
	margin-block-end: 0%;
}

.status-label {
	margin-left: 1em;
	margin-block-start: 0%;
	margin-block-end: 1em;
}

#status {
	border-left: 2px solid #BDBDBD;
}

.fire-status {
	margin: 0 0 1rem;
	text-transform: uppercase;
	color: #FFFFFF;
	padding-inline-start: 0px;
	margin-block-start: 0%;
	margin-block-end: 0%;
}

.fire-status li {
	padding: 10px 6px;
	transition: width 0.3s;
	border-radius: 3px;
}

.fire-status li:not(:first-child) {
	margin-left: 2px;
}

.fire-status li.status-max {
	background-color: #711313;
}

.fire-status li.status-vhigh {
	background-color: #B81E1F;
}

.fire-status li.status-high {
	background-color: #FF6E02;
}

.fire-status li.status-mod {
	background-color: #FFB202;
}

.fire-status li.status-min {
	background-color: #6ABF59;
}

.fire-status li.active {
	width: 100%;
}

.fire-status li.active:before {
	content: attr(data-status);
}

.f-danger li {
	display: inline;
	white-space: nowrap;
}

.f-danger {
	justify-items: center;
}