html,
body,
#viewDiv {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;

  /* UPDATED: Base font and text color */
  font-family: "DM Sans" !important;
  color: #00294C;
}

/* ---------------------------------------------------------
   HEADER STYLES 
   --------------------------------------------------------- */
#header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  height: 50px;
  width: auto;
  display: block;
}

.header-titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.2;

  /* UPDATED: Color and Font */
  color: #00294C;
  font-family: "DM Sans" !important;
}

.app-subtitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;

  /* UPDATED: Color and Font */
  color: #00294C;
  font-family: "DM Sans" !important;
}

/* ---------------------------------------------------------
   APP LAYOUT 
   --------------------------------------------------------- */
#app-container {
  display: flex;
  height: 100%;
  width: 100%;
}

/* Sidebar Layout */
#filterPanel {
  width: 360px;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ddd;

  /* Ensure Calcite components inherit the font */
  --calcite-ui-text-1: #00294C;
  --calcite-ui-text-2: #00294C;
  --calcite-ui-text-3: #00294C;
  font-family: "DM Sans" !important;
}

/* Force headings inside Calcite Panel to use Serif */
calcite-panel {
  font-family: "DM Sans" !important;
  /* Body of panel */
  --calcite-heading-font-size: 1.5rem;
}

/* This targets the shadow DOM heading in Calcite if supported, 
   otherwise rely on standard inheritance */
calcite-panel::part(heading) {
  font-family: "DM Sans" !important;
  color: #00294C;
}

.filter-content {
  flex: 1;
  overflow-y: auto;
}

calcite-block {
  margin-bottom: 2px;
  --calcite-block-padding: 0.5rem;
  color: #00294C;
}

.tag-search {
  margin: 0 10px 10px 10px;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px 10px 10px;
}

.filter-tag {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid #ccc;
  background-color: #fff;
  transition: all 0.1s ease;
  user-select: none;
  display: flex;
  align-items: center;

  /* UPDATED: Text Color */
  color: #00294C;
  font-family: "DM Sans" !important;
}

.filter-tag:hover {
  background-color: #f0f0f0;
  border-color: #bbb;
}

.filter-tag.selected {
  /* Keep background blue for selection state? 
     Or change this if you want EVERYTHING #00294C background?
     I will keep standard "selected" blue background with White text for readability,
     or use your new Dark Blue as background. Let's use your new color as BG. */
  background-color: #00294C;
  color: white;
  /* Text must be white to be readable on dark blue */
  border-color: #001a33;
  font-weight: 500;
}

.filter-tag.selected:hover {
  background-color: #001f3a;
}

.loading-overlay {
  padding: 2rem;
  text-align: center;
}

.loading-text {
  /* UPDATED */
  color: #00294C;
  margin-top: 1rem;
}

.hidden-block {
  display: none;
}

/* Add this to your style.css */

.logo-link {
  display: block;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo-link:hover {
  /* You missed the specific color in your request.
     I added opacity here, but if you want a specific color 
     for text links, set it below: */
  opacity: 0.8;
  /* color: YOUR_MISSING_COLOR_HERE; */
}

.esri-widget--button {
  background-color: #00294C;
  color: white;
}

/* ---------------------------------------------------------
   MODAL / CREDITS STYLES 
   --------------------------------------------------------- */

/* Spacing for the credits sections */
.credits-container {
  margin-bottom: 1.5rem;
}

/* Small label text (e.g. "Created by:") */
.credits-label {
  margin: 0 0 0.25rem 0;
  font-size: 0.85rem;
  color: #666;
}

/* The Link Style */
.credits-link {
  color: #00294C;
  text-decoration: none;
  font-size: 1rem;
  display: inline-block;
  line-height: 1.3;
  transition: opacity 0.2s ease;
}

.credits-link:hover {
  opacity: 0.7;
}

/* Sponsor Placeholder Box */
.sponsor-placeholder {
  background-color: #f0f0f0;
  border: 1px dashed #ccc;
  color: #888;
  padding: 1.5rem;
  text-align: center;
  border-radius: 4px;
  font-size: 0.9rem;
  font-style: italic;
}

/* ---------------------------------------------------------
   Force DM Sans Font on widgets
   --------------------------------------------------------- */
/* ESRI Components - Font styling */
.esri-basemap-gallery *:not(.esri-icon-loading-indicator),
.esri-popup *:not(.esri-icon-loading-indicator),
.esri-scale-bar *:not(.esri-icon-loading-indicator),
.esri-legend *:not(.esri-icon-loading-indicator) {
  font-family: "DM Sans" !important;
}

/* ---------------------------------------------------------
   RESPONSIVE DESIGN 
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  #filterPanel {
    width: 320px;
  }
}

@media (max-width: 768px) {
  #header {
    padding: 0.5rem 1rem;
  }

  .header-logo {
    height: 40px;
  }

  .app-title {
    font-size: 0.95rem;
  }

  .app-subtitle {
    font-size: 0.8rem;
  }

  #app-container {
    flex-direction: column;
  }

  #filterPanel {
    width: 100%;
    height: auto;
    max-height: 40vh;
    border-right: none;
    border-top: 1px solid #ddd;
    overflow-y: auto;
    order: 1;
  }

  #viewDiv {
    flex: 1;
    height: 60vh;
    order: 0;
  }
}

@media (max-width: 480px) {
  .header-content {
    gap: 0.75rem;
  }

  .app-title {
    font-size: 0.9rem;
  }

  .app-subtitle {
    display: none;
  }

  #filterPanel {
    max-height: 35vh;
  }

  #viewDiv {
    height: 65vh;
  }
}