/* ==========================================================================
   Residual Mix Visualization – Main Stylesheet
   ========================================================================== */

/* --- Base / Reset --- */
body {
  margin: 0;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  color: #034EA2;
}

/* --- Topbar --- */
#topbar {
  padding: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  height: 60px;
}

/* --- Site logo --- */
#site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
#site-logo img {
  display: block;
  width: 134px;
  height: auto;
}

/* --- Filters --- */
#filters {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#filters > div {
  width: 155px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#filters label {
  font-size: 11px;
  font-weight: 600;
  color: #034EA2;
  margin: 0;
  padding: 0;
  line-height: 12px;
}

#filters select {
  width: 155px;
  height: 30px;
  padding: 0 4px;
  box-sizing: border-box;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  color: #034EA2;
  border: 1px solid #CDE4FE;
  border-radius: 6px;
}

/* --- Export button --- */
#button_export {
  width: 155px;
  height: 45px;
  min-height: 45px;
  max-height: 45px;
  padding: 0 5px;
  box-sizing: border-box;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #034EA2;
  background: #fff;
  border: 1px solid #CDE4FE;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

#button_export:hover {
  background: #034EA2;
  color: #fff;
  border-color: #034EA2;
}

#button_export:focus {
  outline: none;
  border-color: #0579FA;
  box-shadow: 0 0 0 2px rgba(5, 121, 250, 0.12);
}

/* --- MultiSelect overrides --- */
.multi-select-container {
  width: 155px !important;
  height: 30px !important;
  min-height: 30px !important;
  box-sizing: border-box;
}

.multi-select-header {
  width: 155px !important;
  height: 30px !important;
  line-height: 30px !important;
  padding: 0 6px !important;
  box-sizing: border-box;
}

.multi-select-options {
  width: 155px !important;
}

/* --- Map view --- */
#view-map {
  display: block;
  padding: 20px;
}

#map-container {
  width: 100%;
  height: 650px;
  border: none;
  border-radius: 160px;
  overflow: hidden;
  position: relative;
}

/* --- Map popups --- */
.maplibregl-popup {
  max-width: none !important;
}

.maplibregl-popup-content {
  max-width: none !important;
  width: auto !important;
  min-width: 440px !important;
  padding: 0 !important;
}

.maplibregl-ctrl-top-right {
  top: 50% !important;
  right: 12px;
  transform: translateY(-50%);
}

/* Re-center button: centre the inline SVG the same way MapLibre centres its sprite icons */
.maplibregl-ctrl-recenter {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

/* --- KPI overlay --- */
#kpi-overlay {
  position: absolute;
  left: 50%;
  bottom: 14px;
  top: auto;
  transform: translateX(-50%);
  z-index: 50;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
  font-family: "IBM Plex Sans", Arial, sans-serif;
}

#kpi-overlay label {
  display: block;
  font-size: 11px;
  color: #034EA2;
  font-weight: 600;
  margin-bottom: 4px;
}

#kpi-overlay select {
  width: 180px;
  height: 30px;
  border-radius: 20px;
  border: 1px solid #CDE4FE;
  background: #fff;
  padding: 0 8px;
  font-size: 12px;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  color: #034EA2;
}

/* --- Export lead modal --- */
.export-modal {
  width: min(460px, calc(100vw - 32px));
}

.export-modal-intro {
  margin: 0 0 18px;
  font-size: 13px;
  color: #034EA2;
}

.export-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.export-form-field label {
  font-size: 12px;
  font-weight: 600;
  color: #011832;
}

.export-form-field input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #CDE4FE;
  border-radius: 8px;
  font-size: 13px;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  outline: none;
  box-sizing: border-box;
  color: #034EA2;
}

.export-form-field input:focus {
  border-color: #3793FB;
  box-shadow: 0 0 0 2px rgba(5, 121, 250, 0.12);
}

.export-form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.export-form-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  cursor: pointer;
}

.export-form-check label {
  font-size: 12px;
  color: #034EA2;
  line-height: 1.5;
  cursor: pointer;
}

.export-required {
  color: #cc0033;
}

.export-field-error {
  font-size: 11px;
  color: #cc0033;
  margin-top: 2px;
}

.export-form-actions {
  display: flex;
  justify-content: flex-end;
}

.export-btn-submit {
  height: 34px;
  padding: 0 20px;
  background: #034EA2;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: "IBM Plex Sans", Arial, sans-serif;
  cursor: pointer;
  transition: background 150ms ease;
}

.export-btn-submit:hover {
  background: #0460C8;
}

/* ==========================================================================
   Mobile / Responsive
   TODO: Implement mobile layout
   ==========================================================================

@media (max-width: 768px) {
  #topbar        {}
  #filters       {}
  #filters > div {}
  #map-container {}
  .maplibregl-popup-content {}
  #kpi-overlay   {}
}

   ========================================================================== */
