/* =====================================================
   Ported from deprecated/assets/css/styles.css
   Image paths updated: ../img/ → ../images/
   ===================================================== */

/* This file is being deprecated as we migrate to Tailwind CSS */
/* Do not add new styles here */
/* Refactor existing styles to Tailwind CSS, when possible, remove old styles from here */
   
/* Removed dead CSS (April 2026 — Tier 1):
   - Tippy.js styles (was lines 29–52, 1894–1896): Tippy.js not loaded
   - Slider/histogram styles (was lines 827–940): slider_controller is a stub
   - #filter-list-container styles (was lines 1716–1751): element always display:none
   - Choropleth legend styles (was lines 1840–1895): feature not built

   Removed DataTables CSS (April 2026 — Tier 2):
   - #results-table and DataTables column-class styles: DataTables removed, replaced by Turbo Frame table
   - #data-table, .first-col, .dt-scroll-body: replaced by Tailwind in _table.html.erb

   Removed dataset card inner CSS (May 2026 — Tier 3, T3-C):
   - .grid-item .dataset-inner, .ds-content, a.expand, .expanded, h2, .ds-source a,
     .ds-callout, .ds-callout p, ul (was lines 1373–1431): migrated to UI::DatasetCardComponent (Tailwind)

   Removed report section CSS (May 2026 — Tier 3, T3-B):
   - .detail-section, .detail-table, .detail-na, .detail-flag, .detail-footnote were orphaned
     (no CSS defined) and are now replaced by UI::DetailSectionComponent (Tailwind)

   Removed legacy-only CSS (May 2026 — Tier 4, chore-remove-more-dead-css):
   - Map hover popup (.map-hover-*), green-bar, bwn-content-wrapper, filters-desktop-display,
     legacy filter menu footer / .btn-*-filters, category/column shells (.container-category-header,
     .container-filter, .btn-filter-options), water/sewer bill grid (.wsb-*, .container-water-sewer-bill-filter-grid),
     orphaned PWS report header rules, .slider-subhead, .hide-this, unused mobile hooks
     (.container-region-nav-mobile, #mobile-btn-*, .btn-close-map-info, .filter-menu-mobile, …).

   Removed dead layout hooks (May 2026 — Tier 5):
   - #wrapper-ui, #wrapper-map-ui (no matching elements in Rails app).
   - #container-zoom-to-loc and nested rules (element not in DOM; display:none shell).
   - Redundant first .mapboxgl-ctrl-geolocate block (superseded by later Mapbox overrides).
   - .mobile-header img.logo / img.nav (markup uses icon() SVGs, no matching elements).
*/

/*
Blue - 1054A8
Green - 4EA324
Light grey border - bfbfbf
*/

body{
  margin:0px;
  padding:0px;
  font-family: "Public Sans", Arial, Helvetica, sans-serif;
  font-style: normal;
}

.hide-for-desktop{
  display:none;
}


#container-mobile-menu{
  display:none;
}

#container-mobile-menu ul{
  list-style: none;
  margin: 0px;
  margin-top: 0px;
  padding: 0px;
}



/* MAP UI */

/* map info tooltip */

.mapboxgl-popup-close-button{
  right: 15px;
  top: 10px;
  font-size: 2em;
}

.mapboxgl-popup-close-button:hover{
  background-color:#ececec;
}

.mapboxgl-popup-content{
  padding:0px;
  border-radius:20px;
}

.mapboxgl-popup-content .map-detail-header{
  padding:15px 55px 15px 30px;
  border-radius: 20px 20px 0px 0px;
  background-color:#ececec;
}

.mapboxgl-popup-content .map-detail-body{
  padding:10px 30px;
}

.mapboxgl-popup-content .map-detail-body p,
.mapboxgl-popup-content .map-detail-header p{
  font-size:1.2em;
  line-height:1.4;
  font-weight:400;
  margin: 0px 0px 2px 0px;
  padding: 0px;
}

.mapboxgl-popup-content .map-detail-body p strong,
.mapboxgl-popup-content .map-detail-header p strong{
  font-weight:500;
}

.mapboxgl-popup-content .map-detail-body p a{
  color:#333;
}

.infoBub {
  min-width: 280px;
}

/* TABLE VIEW */

/* MAP MENUS — filter dropdown shell lives in Tailwind (`UI::FilterMenuComponent` / `.filter-dropdown`);
   content rules migrated to application.css. */

/* =====================================================================
   Table-mode: #container-table lives inside #container-map so the
   filter bar stays visible. Toggled via the .table-mode class on
   #container-map.
   ===================================================================== */

/* Table panel — hidden by default, floats as a card above the map */
#container-map #container-table {
  display: none;
  position: absolute;
  background-color: #fff;
  z-index: 3; /* above map canvas, below filter bar (z-index: 5) */
}

/* table-mode: map canvas stays visible as background — only hide interactive overlays */
#container-map.table-mode .hide-for-table { display: none; }

/* table-mode: show the table panel as a flex column so sticky headers and pinned footer work */
#container-map.table-mode #container-table {
  display: flex;
  flex-direction: column;
}

/* table-mode: stats bar and intro tooltip hidden — rules moved to application.css */



/****************/
/*** Datasets ***/
/****************/

/* Datasets section migrated to Tailwind (May 2026):
   _datasets.html.erb, dataset_card_component.html.erb */


/* Loading mask */
#loading-mask {
  position: absolute;
  top: 0px;
  left: 0px;
  width:100%;
  height:100%;
  z-index: 1002;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
}
#loading-mask p{
  padding-top: 200px;
  font-size:1.4em;
  color:#fff;
}


/* Mapbox control overrides */
.mapboxgl-ctrl-geolocate {
  position: absolute;
  left: 250px;
  z-index: 1;
  top: -40px;
  border: 1px solid #ccc;
  border-radius: 20px;
}

.mapboxgl-ctrl-group button:only-child {
  border-radius: 20px;
  border: 1px solid #bfbfbf;
  background-color:#fff;
}


.mapboxgl-ctrl-top-left .mapboxgl-ctrl{
  background-color: transparent;
  box-shadow: none;
}

.mapboxgl-ctrl-group button:first-child,
.mapboxgl-ctrl-group button:last-child{
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background-color: #fff;
  width:32px;
  height:32px;
}

.mapboxgl-ctrl-group button:first-child:hover{
  background-color:#f5f5f5;
}

.mapboxgl-ctrl-group button + button{
  border-top:none;
  margin-top:5px;
}

/* Place autocomplete dropdown */
.place-autocomplete-results {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.place-autocomplete-results li a {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: #333;
  font-size: 0.95em;
}
.place-autocomplete-results li a:hover {
  background-color: #f0f0f0;
}


/* =====================================================
   Mobile styles (max-width: 640px), historically ported from legacy mobile.css.
   The deprecated/ snapshot may still contain that file for PHP; Rails uses this block only.
   ===================================================== */

@media all and (max-width: 640px) {


  .hide-for-mobile{
    display:none;
  }

  .hide-for-desktop{
    display:inherit;
  }

  .mobile-header{
    padding: 12px 12px 12px 12px;
    background-color: #fff;
    z-index: 9999;
    text-align: center;
    position: fixed;
    top: 0px;
    width: 100%;
    box-sizing: border-box;
  }

  .mobile-header h1{
    display: inline-block;
    font-size: 1.2em;
    margin: 0px;
    font-weight: 500;
    padding: 4px 0px 0px 0px;
    color:#25325b;
  }

  .mobile-header .m-header-left{
    float:left;
  }

  .mobile-header .m-header-right{
    float:right;
  }
  .mobile-header .m-header-right a{
    display: inline-block;
    padding: 6px 8px 6px 6px;
  }

  .mobile-footer{
    position:fixed;
    bottom:0px;
    width:100%;
    padding:0px 10px 10px 10px;
    background-color:#1054A8;
    z-index:99999;
    text-align:center;
  }

  .mobile-footer img{
    margin-top: -20px;
  }

  .mobile-footer p{
    color:#fff;
    margin:0px;
    font-size:.9em;
  }

  .container-main-content {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 50px;
    overflow-y: auto;
  }



  #container-map-ui-bottom {
    display: none;
  }

  /* Mobile hamburger icon states */
  .mm-icon-bars { display: inline; }
  .mm-icon-x { display: none; }

  #container-mobile-menu{
    position: fixed;
    left: 0px;
    background-color: #fff;
    width: 100%;
    height: 100%;
    z-index: 999;
    overflow: scroll;
  }

  .container-mobile-menu-inner{
    padding: 60px 20px 60px 20px;
  }



}
