/* ==========================================================
   Sistem Informasi Geografis (SIG)
   Kredit: lautandigital.id
   ========================================================== */

:root {
  --color-primary: #0b6e4f;
  --color-primary-dark: #084c37;
  --color-bg: #f4f6f5;
  --color-panel: #ffffff;
  --color-border: #dfe4e2;
  --color-text: #1e2a26;
  --color-muted: #6b7a75;

  --color-pemerintahan: #2563eb;
  --color-pendidikan: #f59e0b;
  --color-kesehatan: #dc2626;
  --color-wisata: #16a34a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

body {
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 20;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-icon {
  font-size: 1.4rem;
}

.app-header h1 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sidebar-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  display: none;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Body layout */
.app-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
  background: var(--color-panel);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 1rem;
}

.panel {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.panel:last-child {
  border-bottom: none;
}

.panel h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary-dark);
  margin: 0 0 0.6rem 0;
}

.search-box {
  display: flex;
  gap: 0.4rem;
}

.search-box input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.search-box button {
  padding: 0.4rem 0.8rem;
  border: none;
  background: var(--color-primary);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.search-box button:hover {
  background: var(--color-primary-dark);
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  cursor: pointer;
}

.legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}

.legend-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-pemerintahan { background: var(--color-pemerintahan); }
.dot-pendidikan  { background: var(--color-pendidikan); }
.dot-kesehatan   { background: var(--color-kesehatan); }
.dot-wisata      { background: var(--color-wisata); }

.info-placeholder {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0;
}

#infoPanel h3 {
  margin: 0 0 0.3rem 0;
  font-size: 0.95rem;
  color: var(--color-primary-dark);
}

#infoPanel p {
  font-size: 0.85rem;
  margin: 0.2rem 0;
}

#infoPanel .info-tag {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #fff;
}

/* Map */
.map-wrapper {
  flex: 1;
  position: relative;
}

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

/* Footer */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  background: var(--color-primary-dark);
  color: #dfe9e5;
  font-size: 0.75rem;
}

.app-footer .credit a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.app-footer .credit a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar-toggle {
    display: inline-block;
  }

  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 15;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.15);
  }

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

  .app-footer {
    flex-direction: column;
    gap: 0.2rem;
    text-align: center;
  }
}

/* ==========================================================
   Kredit: lautandigital.id
   ========================================================== */
