/* CSS gerado pelo Apps Script do Google */

/* Estilos do Loader */
#loader-container {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.9);
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	align-items: center;
	padding-top: 100px;
	z-index: 9999;
}

.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #004d40;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin-bottom: 10px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Busca Global */
.search-section {
	background: white;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 15px;
	text-align: center;
}

#globalSearch {
	width: 100%;
	padding: 12px 20px;
	border: 1px solid #ccc;
	border-radius: 10px;
	font-size: 16px;
	outline: none;
	margin-bottom: 80px;
}

/* Áreas - 4 por linha */
.sec-section {
	margin-bottom: 25px;
}

.sec-section h3 {
	margin-top: 0;
	color: #004d40;
	text-align: center;
	text-transform: uppercase;
	font-size: 0.9em;
	letter-spacing: 1px;
	margin-bottom: 15px;
}

#secCardFilter {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 15px;
}

.sec-card {
	background: #007b35;
	border: none;
	border-radius: 6px;
	padding: 15px;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	align-items: center;
	text-align: left;
	color: white;
	min-height: 80px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	position: relative;
	overflow: hidden;
}

.sec-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
	filter: brightness(1.05);
}

.sec-card.active {
	outline: 3px solid #004d40;
	outline-offset: 2px;
}

.sec-icon {
	font-size: 40px;
	margin-right: 15px;
	opacity: 0.9;
	min-width: 50px;
	text-align: center;
}

.sec-info {
	flex: 1;
}

.sec-name {
	font-size: 13px;
	font-weight: bold;
	margin-bottom: 4px;
	line-height: 1.2;
	text-transform: uppercase;
}

.sec-count {
	font-size: 11px;
	opacity: 0.9;
}

/* ODS - 8 POR LINHA */
.ods-section {
	background: white;
	padding: 20px;
	border-radius: 8px;
	margin-top: 100px;
	margin-bottom: 100px;
}

.ods-section h3 {
	margin-top: 0;
	color: #004d40;
	text-align: center;
	text-transform: uppercase;
	font-size: 0.9em;
	margin-bottom: 15px;
}

#odsCardFilter {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 8px;
}

.ods-card {
	aspect-ratio: 1 / 1;
	border: 2px solid #eee;
	cursor: pointer;
	transition: all 0.2s;
	border-radius: 4px;
	background: white;
	overflow: hidden;
	display: flex;
	padding: 0;
}

.ods-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ods-card:hover {
	transform: scale(1.05);
	border-color: #4db6ac;
}

.ods-card.active {
	border-color: #004d40;
	box-shadow: 0 0 10px rgba(0, 77, 64, 0.4);
	z-index: 1;
	border-width: 3px;
}

.ods-card.all-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: bold;
	color: #004d40;
	text-align: center;
}

/* Conteúdo Principal */
.main-content {
	background: white;
	border: 1px solid #ddd;
	padding: 30px;
	border-radius: 8px;
	min-height: 500px;
}

#chart_div {
	height: 500px;
	width: 100%;
	margin-top: 20px;
}

/* Metadados e Link */
.metadata {
	margin-top: 25px;
	padding: 20px;
	background: #f9f9f9;
	border-left: solid var(--tom-2);
	font-size: 13px;
	line-height: 1.6;
}

.link-button {
	display: inline-block;
	margin-top: 10px;
	padding: 8px 15px;
	background-color: var(--principal);
	color: white !important;
	text-decoration: none;
	border-radius: 4px;
	transition: background 0.3s;
}

.link-button:hover {
	background-color: #00695c;
}

/* Modal */
.modal {
	display: none;
	position: absolute;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	justify-content: center;
	align-items: flex-start;
}

.modal-content {
	background: #fefefe;
	border-radius: 12px;
	width: 85%;
	max-width: 650px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	margin-top: 50px;
}

.modal-header {
	padding: 15px 20px;
	background: #004d40;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-body {
	padding: 20px;
	max-height: 450px;
	overflow-y: auto;
}

.close {
	color: white;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
}

#modalSearch {
	width: 100%;
	padding: 12px;
	margin-bottom: 15px;
	border: 1px solid #ddd;
	border-radius: 6px;
	box-sizing: border-box;
}

.indicator-item {
	padding: 12px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
}

.indicator-item:hover {
	background-color: #e0f2f1;
}

@media (max-width: 800px) {
	#secCardFilter {
		grid-template-columns: repeat(2, 1fr);
	}

	#odsCardFilter {
		grid-template-columns: repeat(4, 1fr);
	}
}