/*
=====================================================
  STYLE-MAIN.CSS (VERSI RAPI)
  Diorganisir berdasarkan Komponen (Component-Based)
=====================================================
*/

/* =====================================================
  1. GLOBAL & ROOT
     - Variabel Warna (:root)
     - Reset Dasar (*, html, body)
     - Kelas Utilitas (utility classes)
=====================================================
*/

:root {
	--ink: #1e2b3b;
	--muted: #64748b;
	--card: #ffffff;
	--bg: #f5f7fb;
	--blue-itb: #0079c2;
	--stripe: #eaf3fb;
	--ring: rgba(0, 121, 194, 0.25);
	--danger: #dc2626;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
		"Apple Color Emoji", "Segoe UI Emoji";
}

body.dragging {
	user-select: none;
}

.nowrap {
	white-space: nowrap;
}

cite {
	font-style: italic; /* Changed to italic for better visual distinction */
	font-size: 0.85em; /* Slightly smaller than surrounding text */
	color: #D81B60; /* Light pink color as requested */
	margin-left: 0.2em;
	font-weight: 500; /* Added font-weight for consistency */
}

/* Removed .corpus-citation as its styling is now covered by the base cite rule */

/* =====================================================
  2. LAYOUT UTAMA
     - .wrap (Kontainer utama)
     - .split (Layout 2 kolom)
=====================================================
*/

.wrap {
	max-width: 1280px;
	margin: 32px auto;
	padding-left: max(16px, env(safe-area-inset-left));
	padding-right: max(16px, env(safe-area-inset-right));
}

body.full .wrap {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0 auto;
}

body.full .banner,
body.full main.split {
	padding-left: max(20px, env(safe-area-inset-left));
	padding-right: max(20px, env(safe-area-inset-right));
}

body.full main.split {
	margin-top: 18px;
}

main.split {
	display: grid;
	grid-template-columns: 2fr 3fr;
	gap: 18px;
}

.left,
.right {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}

.right {
	position: sticky;
	top: 12px;
	align-self: start;
}

/* =====================================================
  3. KOMPONEN UI UMUM
     - Banner, Judul, Brand
     - Menu Navigasi (Dropdown)
     - Card
     - Tabel
     - Form (Input, Select, Label)
     - Tombol (btn, btn-delete, btn-home-3d)
     - Notifikasi
     - Tombol "To Top"
=====================================================
*/

/* --- 3.1. Banner & Judul --- */
.banner {
	position: relative;
	color: #fff;
	background-image: url("/img/banner-itb1.webp");
	background-size: cover;
	background-position: center;
	padding: clamp(16px, 2.2vw, 24px) clamp(16px, 2.4vw, 28px);
	min-height: clamp(120px, 20vw, 240px);
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(2, 41, 77, 0.12);
	margin-bottom: 18px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
}

body.full .banner {
	border-radius: 0;
	padding-top: clamp(16px, 2.2vw, 24px);
	padding-bottom: clamp(16px, 2.2vw, 24px);
	margin-bottom: 18px;
}

.title {
	display: grid;
	gap: 6px;
}

.title h1 {
	margin: 0;
	font-size: clamp(24px, 3.2vw, 44px);
	line-height: 1.25;
	font-family: Georgia, "Times New Roman", serif;
	color: #fff;
	padding: 6px 10px;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	max-width: clamp(560px, 70vw, 62ch);
}

@supports (text-wrap: balance) {
	.title h1 {
		text-wrap: balance;
	}
}

.title h2 {
	margin: 0;
	font-size: clamp(12px, 1.2vw, 16px);
	font-weight: 600;
	color: #fff;
}

.title h1,
.title h2 {
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.brandbar {
	display: flex;
	align-items: center;
	gap: 16px;
}

.brand-logo {
	height: clamp(56px, 6.5vw, 96px);
	width: auto;
}

.brand-text {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.brand-text .authors {
	font-size: clamp(11px, 1.1vw, 14px);
	font-weight: 400;
	color: hsl(0, 0%, 100%);
	margin: 4px 0 0 0;
	font-style: italic;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.banner .brand-text h3:not(.authors) {
	font-size: clamp(12px, 1.3vw, 17px);
	font-weight: 500;
	margin: 0;
}

#language-switcher {
	position: absolute;
	bottom: 12px;
	right: clamp(16px, 2.4vw, 28px);
	display: flex;
	gap: 8px;
	z-index: 10;
}

.lang-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.7);
	background-color: rgba(255, 255, 255, 0.1);
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0.7;
}

.lang-btn:hover {
	transform: scale(1.1);
	opacity: 1;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.lang-btn.active {
	border-color: #fff;
	opacity: 1;
	transform: scale(1.05);
	box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.lang-btn img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

/* --- 3.2. Menu Navigasi (Dropdown) --- */
.dropdown-menu {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 1002; /* z-index tinggi untuk desktop */
}

.dropdown-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	background-color: rgba(255, 255, 255, 0.9);
	color: var(--ink);
	padding: 8px 16px;
	font-size: 16px;
	font-weight: 600;
	border: 1px solid #d6e3ef;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dropdown-toggle:hover {
	background-color: #ffffff;
	border-color: var(--blue-itb);
}

.dropdown-toggle .hamburger-icon {
	font-size: 20px;
	line-height: 1;
}

.dropdown-content {
	display: none;
	opacity: 0;
	visibility: hidden;
	position: absolute;
	right: 0;
	top: 110%;
	background-color: #ffffff;
	min-width: 220px;
	box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	overflow: hidden;
	transform: translateY(-10px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.dropdown-menu.is-active .dropdown-content {
	display: block;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	z-index: 2000; /* z-index tertinggi saat aktif */
}

.dropdown-content a {
	color: var(--ink);
	padding: 12px 16px;
	text-decoration: none;
	display: block;
	transition: background-color 0.2s ease, color 0.2s ease;
	font-weight: 500;
	white-space: nowrap;
}

.dropdown-content a:hover {
	background-color: var(--stripe);
	color: var(--blue-itb);
}

/* --- 3.3. Card --- */
.card {
	background: var(--card);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(10, 34, 64, 0.08);
	margin-bottom: 18px;
}

.card-header {
	background: var(--blue-itb);
	color: #e9f5ff;
	font-weight: 700;
	padding: 10px 14px;
	font-family: Georgia, "Times New Roman", serif;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
}

/* --- 3.4. Tabel --- */
.table-wrapper {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 8px 10px;
	vertical-align: middle;
	text-align: left;
	font-size: 14px;
}

thead th {
	background: var(--stripe);
	font-weight: 700;
	color: #294050;
	border-bottom: 1px solid #dbe7f2;
}

tbody tr:nth-child(even) {
	background: #fbfdff;
}

tbody tr {
	border-bottom: 1px solid #eef4fa;
}

/* --- 3.5. Form (Input, Select, Label) --- */
.label {
	font-weight: 600;
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
}

.ref {
	color: var(--blue-itb);
	font-size: 12px;
}

input[type="number"],
input[readonly],
input[type="text"],
input[type="text"][readonly],
select {
	width: 100%;
	border: 1px solid #d6e3ef;
	background: #fff;
	color: var(--ink);
	border-radius: 10px;
	padding: 10px 12px;
	min-height: 40px;
	outline: none;
	transition: 0.2s box-shadow, 0.2s border-color;
	font-size: 16px;
}

input[readonly],
input[type="text"][readonly] {
	background: #f6f9fd;
	color: #475569;
}

input:focus,
select:focus {
	border-color: var(--blue-itb);
	box-shadow: 0 0 0 4px var(--ring);
}

input.input-error {
	border-color: var(--danger) !important;
	box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.25) !important;
}

.status {
	padding: 8px 12px;
	border-left: 4px solid #0ea5e9;
	background: #ebf8ff;
	color: #075985;
	border-radius: 10px;
	display: none;
	margin-top: 8px;
}

.status.bad {
	border-left-color: var(--danger);
	background: #fff1f2;
	color: #be123c;
}

.footnote {
	font-size: 12px;
	color: var(--muted);
	margin-top: 8px;
}

/* --- 3.6. Tombol (Umum, Hapus, 3D) --- */
.card-header .btn {
	padding: 6px 10px;
	font-size: 12px;
	background: #fff;
	color: var(--blue-itb);
	border: none;
	cursor: pointer;
	border-radius: 6px;
	transition: background-color 0.2s;
}

.card-header .btn:disabled {
	background-color: #e0e0e0;
	color: #9e9e9e;
	cursor: not-allowed;
}

.btn-delete {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	transition: background-color 0.2s;
}

.btn-delete:hover {
	background-color: #fee2e2;
}

.btn-delete svg {
	width: 14px;
	height: 14px;
	stroke: #ef4444;
}

.btn-home-3d {
	--button-bg-top: #cc00cc;
	--button-bg-bottom: #990099;
	--button-shadow: #660066;
	--button-active-shadow: #440044;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 1px 20px;
	font-size: 12px;
	font-weight: normal;
	color: #ffffff;
	background: linear-gradient(
		to bottom,
		var(--button-bg-top) 0%,
		var(--button-bg-bottom) 100%
	);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	position: relative;
	outline: none;
	transform: translateY(0);
	transition: all 0.2s ease;
	box-shadow: 0 4px 0 var(--button-shadow);
	text-decoration: none;
}

.btn-home-3d:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 0 var(--button-shadow);
}

.btn-home-3d:active {
	transform: translateY(2px);
	box-shadow: 0 2px 0 var(--button-active-shadow);
}

.footer-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

/* --- 3.7. Notifikasi --- */
.notification {
	position: absolute;
	z-index: 1003;
	top: 75px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(40, 40, 40, 0.9);
	color: #fff;
	padding: 10px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
	text-align: center;
	max-width: 90%;
}

.notification.show {
	opacity: 1;
	visibility: visible;
}

.notification.error {
	background: rgba(217, 48, 37, 0.9);
}

/* --- 3.8. Tombol "To Top" --- */
#toTop {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 1000;
	cursor: pointer;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--blue-itb);
	color: white;
	border: none;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	font-size: 24px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

#toTop.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#toTop:hover {
	background-color: #005a8c;
}

/* =====================================================
  4. AREA SPESIFIK APLIKASI
     - Grid Material & Kimia
     - Grid Estimasi Kerusakan
     - Kontainer Chart
     - Tabel Log & Aksi
     - Peta Kontur (Leaflet)
     - Kontrol Peta (Lat/Lon)
     - Panel Kontrol Melayang
     - Slider Gambar
=====================================================
*/

/* --- 4.1. Grid Material & Kimia --- */
.chem-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 14px;
	align-items: start;
}

.mini {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.mini > * {
	flex: 1;
}

.matcol {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.eq-panel {
	border: 1px solid #dbe7f2;
	background: var(--card);
	color: var(--ink);
	border-radius: 12px;
	padding: 12px;
}

.eq-title {
	font-weight: 700;
	color: var(--blue-itb);
	margin-bottom: 8px;
}

.rxn {
	padding: 10px 12px;
	border: 1px dashed #c9d8e6;
	border-radius: 10px;
	margin-top: 8px;
	background: var(--stripe);
}

.rxn small {
	display: block;
	color: #334155;
	margin-bottom: 4px;
}

.rxn-eq {
	font-family: "Times New Roman", Georgia, serif;
	font-size: 16px;
	color: var(--ink);
}

.rxn-eq .arrow {
	padding: 0 6px;
	font-weight: 700;
}

/* --- 4.2. Grid Estimasi Kerusakan --- */
.method-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
	padding: 12px;
}

.method-card {
	position: relative;
	min-height: 220px;
	border: 1px solid #dbe7f2;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
}

.method-card .vlabel {
	background: var(--stripe);
	color: var(--blue-itb);
	padding: 8px 12px;
	font-weight: 700;
	text-align: center;
	border-bottom: 1px solid #e6eef6;
}

.method-card .pad {
	padding: 10px 10px 40px 10px;
	height: 100%;
	color: var(--ink);
	font-size: 14px;
}

.sevfoot {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.damage-category {
	margin-top: 10px;
}

.damage-category strong {
	color: var(--blue-itb);
}

.damage-category ul {
	padding-left: 20px;
	margin-top: 5px;
	list-style-type: disc;
}

/* --- 4.3. Kontainer Chart --- */
.chart-container {
	padding: 12px;
	background-color: var(--card);
	border-radius: 14px;
	position: relative;
}

#chart,
#overpressureChart {
	width: 100%;
	height: 500px;
}

.chart-note {
	margin-top: 4px;
	text-align: center;
	font-style: italic;
	color: var(--muted);
	font-size: 11px;
}

#overpressureChartMsg {
	color: var(--muted);
	font-style: italic;
	padding: 20px;
	font-size: 14px;
	text-align: center;
}

/* --- 4.4. Tabel Log & Aksi --- */
#logTable {
	font-size: 12px;
}

#logTable th,
#logTable td {
	padding: 6px 8px;
	white-space: nowrap;
}

#logTable .col-action {
	width: 40px;
	text-align: center;
}

#logTable .log-placeholder td {
	text-align: center;
	color: var(--muted);
	padding: 20px;
	font-style: italic;
}

#logTable .unit-row th {
	font-weight: normal;
	font-size: 10px;
	color: var(--muted);
	padding-top: 0;
	padding-bottom: 4px;
}

#logTable tbody tr.selected-row {
	background-color: #dbeafe !important;
	font-weight: 600;
}

#logTable tbody tr:not(.log-placeholder) {
	cursor: pointer;
}

@keyframes fadeIn {
	from {
		background-color: #ebf8ff;
	}
	to {
		background-color: transparent;
	}
}

.new-row-animation {
	animation: fadeIn 1.5s ease-out;
}

.log-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

#simulationSelector {
	-webkit-appearance: none;
	appearance: none;
	width: 200px;
	font-size: 12px;
	font-weight: normal;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
		"Apple Color Emoji", "Segoe UI Emoji";
	cursor: pointer;
	outline: none;
	border: none;
	border-radius: 6px;
	margin-right: 4px;
	padding: 6px 30px 6px 10px;
	background-color: #fff;
	color: var(--blue-itb);
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%230079c2' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 0.5rem center;
	background-repeat: no-repeat;
	background-size: 1.5em 1.5em;
}

#simulationSelector:hover {
	background-color: #f0f7ff;
}

/* --- 4.5. Peta Kontur (Leaflet) --- */
#contourMapContainer {
	height: 75vh;
	display: flex;
}

#mapCard {
	flex-grow: 1;
	position: relative;
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(2, 8, 20, 0.08);
	overflow: hidden; /* Memastikan sudut peta bulat */
}

#map {
	height: 100%;
	width: 100%;
}

.leaflet-control-attribution span[title="Author"] {
	font-weight: 600;
}

/* --- 4.6. Kontrol Peta (Fullscreen, Judul, Legenda) --- */
.legend {
	display: none; /* Digantikan oleh #map-color-legend-container */
	position: absolute;
	z-index: 1001;
	bottom: 12px;
	left: 12px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(2, 8, 20, 0.15);
	padding: 10px 12px;
	font: 13px/1.3 system-ui, Segoe UI, Roboto, Arial;
}

/* Legenda Kustom Baru */
#map-color-legend-container {
	/* Style ditambahkan via JS, tapi styling mobile ada di bawah */
}

.fs-btn {
	position: absolute;
	z-index: 1002;
	top: 12px;
	right: 12px;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 8px 10px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(2, 8, 20, 0.12);
	color: var(--ink, #0f172a);
}

.fs-btn:active {
	transform: translateY(1px);
}

.fs-host.fullscreen,
#mapCard.fullscreen {
	/* #mapCard.fullscreen ditambahkan dari CSS asli */
	position: fixed;
	inset: 0;
	z-index: 9999;
	margin: 0;
	border-radius: 0;
	padding: 0;
	background: #000;
}

.fs-host.fullscreen #map,
#mapCard.fullscreen #map {
	height: 100dvh;
	height: 100vh;
	border-radius: 0;
}

body.fs-lock {
	overflow: hidden;
}

.fs-btn-mobile {
	display: none;
	bottom: 40px;
	left: 12px;
	right: auto;
	top: auto;
}

.map-title {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1002;
	background: rgba(255, 255, 255, 0.92);
	padding: 8px 12px;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(2, 8, 20, 0.12);
	font-weight: 700;
	font-size: 16px;
	pointer-events: none;
	max-width: calc(100% - 150px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Perbaikan Judul 'Explosion Contour...' (ID: mapTitle) dari CSS asli */
#mapTitle {
	white-space: normal !important;
	text-overflow: clip !important;
	overflow: visible !important;

	padding: 8px 12px !important;
	position: absolute;
	left: 12px;
	width: auto;
	max-width: none !important;
	box-sizing: border-box;
	display: block;
	text-align: left;
}

.placelabel {
	background: rgba(255, 255, 255, 0.95);
	color: #0f172a;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(2, 8, 20, 0.12);
	padding: 4px 6px;
	font-weight: 600;
}

.placelabel .leaflet-tooltip-content-wrapper {
	padding: 0;
}

.placelabel .leaflet-tooltip-content {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 4px 2px 4px 8px;
	line-height: 1.2;
}

.placelabel-content {
	margin-right: 4px;
}

.placelabel-close {
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 0 4px;
	color: #64748b;
}

.placelabel-close:hover {
	color: #0f172a;
}

/* --- 4.7. Kontrol Peta (Input Lat/Lon) --- */
#mapControls {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding-top: 12px;
	margin-top: 12px;
	border-top: 1px solid var(--stripe);
}

.coord-inputs,
.model-select {
	display: flex;
	align-items: center;
	gap: 8px;
}

#mapControls label {
	font-weight: 600;
	font-size: 14px;
	color: var(--muted);
}

#mapControls input,
#mapControls select {
	max-width: 120px;
	font-size: 14px;
	padding: 6px 10px;
	min-height: 36px;
}

/* --- 4.8. Panel Kontrol Melayang --- */
#floatingControlPanel {
	display: none;
	position: fixed;
	z-index: 1005;
	background-color: var(--card);
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	transition: all 0.4s ease-in-out;
	width: auto;
	max-width: 90%;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
}

#floatingControlPanel.visible {
	display: block;
}

.floating-panel-header {
	cursor: move;
	padding: 10px 14px;
	background-color: var(--blue-itb);
	color: white;
	border-top-left-radius: 14px;
	border-top-right-radius: 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.floating-panel-header h3 {
	margin: 0;
	font-size: 12px;
	font-family: Georgia, "Times New Roman", serif;
	transition: opacity 0.3s ease;
}

.floating-panel-action-btn {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: white;
	border: none;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.floating-panel-body {
	display: grid;
	grid-template-areas: "inputs outputs";
	grid-template-columns: auto auto;
	gap: 16px;
	padding: 14px;
	align-items: start;
	max-height: 500px;
	overflow: hidden;
	transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out,
		opacity 0.4s ease-in-out;
}

#floatingControlPanel.collapsed {
	width: 44px !important;
	height: 44px;
	border-radius: 50%;
	bottom: auto;
	left: auto;
	top: var(--target-top, 20px);
	right: var(--target-right, 20px);
	transform: none;
	overflow: hidden;
}

#floatingControlPanel.collapsed .floating-panel-header {
	padding: 10px;
	cursor: pointer;
}

#floatingControlPanel.collapsed h3,
#floatingControlPanel.collapsed .floating-panel-body {
	display: none;
}

#floatingControlPanel.collapsed #floatPanelCollapseBtn {
	transform: rotate(180deg);
}

#floatPanelInputs {
	grid-area: inputs;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#floatPanelOutputs {
	grid-area: outputs;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-left: 16px;
	border-left: 2px solid var(--stripe);
}

.floating-group {
	display: flex;
	flex-direction: column;
}

#floatPanelOutputs .label {
	color: var(--muted);
	font-weight: normal;
}

#floatPanelOutputs .output-values {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-direction: column;
}

.floating-output-col {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	font-size: 12px;
}

.floating-output-col span:first-child {
	font-weight: 600;
	color: var(--muted);
}

.floating-output-col span:last-child {
	font-family: monospace;
	color: var(--blue-itb);
	font-weight: bold;
	font-size: 16px;
}

#floatingControlPanel .label {
	font-size: 11px;
}

#floatingControlPanel input,
#floatingControlPanel select {
	font-size: 11px;
	padding: 8px 10px;
	min-height: 25px;
}

.floating-output-col span:last-child {
	font-size: 12px;
}

/* --- 4.9. Slider Gambar --- */
.slider-wrapper {
	position: relative;
	max-width: 48rem;
	margin: 0 auto;
}

.slider {
	display: flex;
	aspect-ratio: 16 / 9;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	box-shadow: 0 1.5rem 3rem -0.75rem hsla(0, 0%, 0%, 0.25);
	border-radius: 0.5rem;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.slider::-webkit-scrollbar {
	display: none;
}

.slider img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.slide-item {
	position: relative;
	flex: 1 0 100%;
	scroll-snap-align: start;
}

.slide-caption {
	position: absolute;
	bottom: 15px;
	left: 50%;
	transform: translateX(-50%);
	width: 90%;
	color: pink; /* Ini dari CSS asli Anda */
	font-size: 20px; /* Ini dari CSS asli Anda */
	font-weight: 500;
	text-align: center;
	padding: 8px 12px;
	background-color: rgba(0, 0, 0, 0.5);
	border-radius: 6px;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
	box-sizing: border-box;
}

.slider-nav {
	display: none; /* Dinonaktifkan di CSS asli */
	column-gap: 1rem;
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1;
}

.slider-nav a {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background-color: #fff;
	opacity: 0.75;
	transition: opacity ease 250ms;
}

.slider-nav a:hover {
	opacity: 1;
}

.slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: rgba(30, 43, 59, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #fff;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
	transition: all 0.2s ease;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.slider-arrow:hover {
	background-color: rgba(30, 43, 59, 0.8);
	transform: translateY(-50%) scale(1.1);
}

.slider-arrow:active {
	transform: translateY(-50%) scale(1);
}

.slider-arrow.prev {
	left: 12px;
}

.slider-arrow.next {
	right: 12px;
}

/* =====================================================
  5. FOOTER
=====================================================
*/

.app-footer {
	margin-top: 20px;
	color: #fff;
	background-color: var(--blue-itb);
	width: 100vw;
	margin-left: calc(50% - 50vw);
	padding: 24px 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	text-align: center;
}

.app-footer .footer-content {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.app-footer .credit {
	font-weight: 700;
	color: #e9f5ff;
}

.app-footer .dedication {
	font-size: 13px;
	line-height: 1.6;
	max-width: 960px;
}

.app-footer .disclaimer {
	font-size: 12px;
	line-height: 1.6;
	max-width: 960px;
}

.app-footer a:not(.btn-home-3d) {
	color: #fff;
	text-decoration: none;
}

.custom-div-icon {
  border: none;
  background-color: transparent;
}
@keyframes slideIn {
    from {
        transform: translate(-20px, -20px);
        opacity: 0;
    }
    to {
        transform: translate(0, 0);
        opacity: 1;
    }
}

.leaflet-popup-content-wrapper {
    animation: slideIn 0.3s ease-out;
}

/* Styling for AI Report Generator */
#gemini-response.loading::after {
  content: '●';
  animation: dots 1.4s infinite;
  animation-timing-function: ease-in-out;
  text-align: center;
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

@keyframes dots {
  0%, 20% { color: rgba(0,0,0,0.2); text-shadow: .25em 0 0 rgba(0,0,0,0.2), .5em 0 0 rgba(0,0,0,0.2); }
  40% { color: #4285f4; text-shadow: .25em 0 0 #4285f4, .5em 0 0 rgba(0,0,0,0.2); }
  60% { text-shadow: .25em 0 0 #4285f4, .5em 0 0 rgba(0,0,0,0.2); }
  80%, 100% { text-shadow: .25em 0 0 #4285f4, .5em 0 0 #4285f4; }
}

/* Citation styling for AI-generated reports */
.corpus-citation {
  color: #D81B60; /* A shade of pink that is readable */
  font-size: 0.85em; /* Slightly smaller than surrounding text */
  font-style: italic;
  font-weight: 500;
}
/*
=====================================================
  7. PRINT STYLES
=====================================================
*/
@media print {
  /* Sembunyikan elemen interaktif & tidak relevan */
  .dropdown-menu, #toTop, #floatingControlPanel, .slider-wrapper, .log-actions, .card-header .btn, .btn-delete, #language-switcher {
    display: none !important;
  }

  /* Reset layout utama agar tidak ada kolom */
  main.split {
    display: block;
  }
  .left, .right {
    position: static;
    display: block;
  }

  /* Pastikan card tidak terpotong antar halaman */
  .card {
    page-break-inside: avoid;
  }

  /* Hapus background & box-shadow untuk menghemat tinta */
  .card, .banner {
    box-shadow: none;
    border: 1px solid #ccc;
    background-image: none;
    background-color: #fff;
  }
  .banner, .title h1, .title h2 {
     color: #000 !important;
     text-shadow: none;
  }

  /* Pastikan konten tidak memiliki tinggi viewport */
  #contourMapContainer, #mapCard, #map {
     height: auto !important;
     display: none; /* Peta tidak bisa dicetak, lebih baik disembunyikan */
  }
}