/* ============================================================================
   Design System Variables
   ============================================================================ */
:root {
  --slate: #244C5A;
  --teal: #007377;
  --aqua: #009CA6;
  --kraft: #CFC493;
  --daffodil: #FFD100;
  --sandstone: #B0BDB0;
  --bg: #F6F8F8;
  --panel: #FFFFFF;
  --text: var(--slate);
  --hairline: rgba(36, 76, 90, 0.12);
  --shadow: 0 10px 30px rgba(36, 76, 90, 0.15);
  --radius: 18px;

  --color-wind: var(--teal);
  --color-solar: var(--daffodil);
  --color-hydro: var(--aqua);
}

/* ============================================================================
   Global Styles
   ============================================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  font-family: "Readex Pro", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ============================================================================
   Header
   ============================================================================ */
header {
  height: 12vh;
  background-color: var(--panel);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 44px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 1000;
}

header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--teal), var(--aqua), var(--daffodil));
}

.header-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.header-title {
  text-align: center;
}

.header-title h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.header-title .subtitle {
  font-size: 14px;
  color: rgba(36, 76, 90, 0.72);
  line-height: 1.4;
}

/* ============================================================================
   Map Container
   ============================================================================ */
main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#map-container {
  position: relative;
  flex-grow: 1;
  width: 100%;
}

#map {
  height: 100%;
  width: 100%;
  background-color: #eef2f3;
}

/* ============================================================================
   Summary Overlay
   ============================================================================ */
#summary-overlay {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 1100;
  width: 320px;
  background-color: var(--panel);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

#summary-overlay.hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.summary-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--slate);
  border-bottom: 2px solid var(--daffodil);
  padding-bottom: 8px;
}

#summary-content {
  margin-bottom: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 400;
}

#summary-total-all {
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-weight: 700;
  font-size: 18px;
  color: var(--teal);
}

.interact-prompt {
  font-size: 10px;
  color: var(--teal);
  margin-top: 10px;
  font-weight: 600;
  animation: pulse-fade 2s infinite ease-in-out;
}

/* ============================================================================
   Asset Card (Popup Content)
   ============================================================================ */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0;
  width: 320px !important;
}

.asset-card {
  width: 100%;
}

.asset-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background-color: var(--sandstone);
  display: block;
}

.asset-details {
  padding: 20px;
}

.asset-details h3 {
  font-size: 20px;
  margin-bottom: 2px;
  color: var(--slate);
  line-height: 1.2;
}

.asset-details .provider {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.asset-details p {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--slate);
}

.asset-stats {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--hairline);
  padding-top: 12px;
  flex-wrap: wrap;
}

.stat-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: var(--bg);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}

/* ============================================================================
   Footer
   ============================================================================ */
footer {
  height: 8vh;
  background-color: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 44px;
  border-top: 1px solid var(--hairline);
  z-index: 1000;
  gap: 16px;
}

.footer-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

footer p {
  font-size: 14px;
  color: var(--text);
  flex: 1 1 auto;
  text-align: center;
  line-height: 1.4;
}

/* ============================================================================
   Animations
   ============================================================================ */
@keyframes pulse-fade {
  0% {
	opacity: 0.3;
  }
  50% {
	opacity: 1;
  }
  100% {
	opacity: 0.3;
  }
}

/* ============================================================================
   Accessibility & Print
   ============================================================================ */
@media print {
  header,
  footer,
  #summary-overlay {
	display: none;
  }

  #map-container {
	flex-grow: 1;
  }
}
