/* Modern Glassy Map Interface Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#map {
  width: 100%;
  height: 100vh;
  position: relative;
}

#map-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
}

/* Month Slider Container - Side by side with zoom */
.month-slider-container {
  position: absolute;
  bottom: 30px;
  right: 100px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.3s ease;
}

.month-slider-container:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.slider-label {
  font-weight: 500;
  color: #1a472a;
  font-size: 13px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

#monthSlider {
  width: 140px;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
}

#monthSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2d5f3f;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(45, 95, 63, 0.4);
  transition: all 0.2s ease;
  border: 2px solid white;
}

#monthSlider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(45, 95, 63, 0.6);
}

#monthSlider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2d5f3f;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 3px 8px rgba(45, 95, 63, 0.4);
  transition: all 0.2s ease;
}

#monthSlider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(45, 95, 63, 0.6);
}

.month-label {
  font-weight: 600;
  color: #d97706;
  font-size: 13px;
  min-width: 75px;
  text-align: right;
}

/* Zoom Controls - Side by side with slider */
.zoom-controls {
  position: absolute;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zoom-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 500;
  color: #1a472a;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  color: #2d5f3f;
}

.zoom-btn:active {
  transform: translateY(0);
}

/* Info Panels - Dual panel layout with glassy effect */
.info-panel {
  position: absolute;
  max-height: 70vh;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 999;
  width: 300px;
  transition: all 0.3s ease;
}

.info-panel:hover {
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.14);
}

/* Animation for content updates */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 12px 48px rgba(45, 95, 63, 0.25), 0 0 0 2px rgba(45, 95, 63, 0.1);
  }
}

.info-panel.updating {
  animation: pulseGlow 0.6s ease;
}

/* Fixed positioning for left panel */
.info-panel-left {
  left: 20px;
  top: 20px;
}

/* Fixed positioning for right panel - aligned with left panel */
.info-panel-right {
  right: 20px;
  top: 20px;
}

/* Bottom panel positioned at bottom left */
.info-panel-bottom {
  left: 20px;
  bottom: 20px;
  max-height: 28vh;
}

.info-panel h3 {
  background: rgba(45, 95, 63, 0.08);
  color: #1a472a;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(45, 95, 63, 0.1);
}

#info-content-left,
#info-content-right {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-size: 13px;
}

/* Summary Section */
.info-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(45, 95, 63, 0.08);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-item.updating {
  animation: fadeInUp 0.5s ease;
}

.info-label {
  color: #718096;
  font-weight: 500;
  font-size: 12px;
}

.info-value {
  color: #d97706;
  font-weight: 600;
  font-size: 13px;
}

/* Category List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(45, 95, 63, 0.08);
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(45, 95, 63, 0.04);
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid rgba(45, 95, 63, 0.06);
  transition: all 0.2s ease;
}

.category-item:hover {
  background: rgba(45, 95, 63, 0.08);
  border-color: rgba(45, 95, 63, 0.12);
}

.category-item.updating {
  animation: fadeInUp 0.5s ease;
}

.category-item span:first-child {
  color: #4a5568;
  font-weight: 500;
}

.category-item strong {
  color: #e53e3e;
  font-weight: 600;
}

/* Damage Details Section */
.rumah-detail-section {
  margin-top: 2px;
}

.rumah-detail-title {
  font-size: 12px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.rumah-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.rumah-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(229, 62, 62, 0.04);
  border-left: 2px solid #e53e3e;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.rumah-detail-item:hover {
  background: rgba(229, 62, 62, 0.08);
}

.rumah-detail-item.updating {
  animation: fadeInUp 0.5s ease;
}

.detail-label {
  color: #4a5568;
  font-weight: 500;
}

.detail-value {
  color: #e53e3e;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.7);
  padding: 3px 10px;
  border-radius: 6px;
}

/* Placeholder Text */
.placeholder-text {
  color: #a0aec0;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
  font-size: 12px;
}

/* Data Updated Text */
.data-updated {
  display: block;
  text-align: center;
  color: #cbd5e0;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 500;
}

/* Scrollbar Styling */
#info-content-left::-webkit-scrollbar,
#info-content-right::-webkit-scrollbar {
  width: 5px;
}

#info-content-left::-webkit-scrollbar-track,
#info-content-right::-webkit-scrollbar-track {
  background: transparent;
}

#info-content-left::-webkit-scrollbar-thumb,
#info-content-right::-webkit-scrollbar-thumb {
  background: rgba(45, 95, 63, 0.2);
  border-radius: 10px;
}

#info-content-left::-webkit-scrollbar-thumb:hover,
#info-content-right::-webkit-scrollbar-thumb:hover {
  background: rgba(45, 95, 63, 0.35);
}

/* GeoJSON border styling - thin and modern */
.leaflet-interactive {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Kecamatan Label */
.kecamatan-label {
  font-size: 11px;
  font-weight: 600;
  color: #2d3748;
  text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.9);
  pointer-events: none;
  user-select: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .info-panel {
    width: calc(100% - 40px);
    max-height: 38vh;
  }

  .info-panel-left {
    left: 20px;
    top: 20px;
  }

  .info-panel-right {
    right: 20px;
    left: auto;
    top: calc(38vh + 40px);
  }

  .info-panel-bottom {
    left: 20px;
    right: 20px;
    bottom: auto;
    top: calc(76vh + 60px);
    width: auto;
  }

  .month-slider-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
    left: 30px;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
  }

  .zoom-controls {
    position: absolute;
    bottom: 110px;
    right: 30px;
  }

  #monthSlider {
    width: 100%;
    min-width: 200px;
  }
}