/* =================================================================
   FLEXBOX LAYOUT SYSTEM FOR WV LIDAR TOOL
   ================================================================= */

/* Override box-sizing for flexbox compatibility */
*,
*:before,
*:after {
    -webkit-box-sizing: border-box !important;
    -moz-box-sizing: border-box !important;
    box-sizing: border-box !important;
}

/* Reset html/body for full viewport */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    background-color: #FFFFFF;
    color: #333333;
    font-family: 'Pragati Narrow', sans-serif;
    font-size: 16px;
    overflow: hidden;
}

/* Main container using flexbox */
#mainContainer {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* Content area - flexible layout */
#contentArea {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* Header */
.header{
  position: relative;
  display:flex;
  align-items:center;
  gap:16px;                 /* space between title and logos */
  padding:0 20px;
  height:80px;
  background:#033566;
  border:1px solid #222;
  border-top-left-radius:5px;
  border-top-right-radius:5px;
}

/* Title */
.headerText{
  color:#fff;
  font-family:'Pragati Narrow', sans-serif;
  font-size:35px;
  font-weight:700;
  letter-spacing:2.5px;
  line-height:1;
  white-space:nowrap;
}

/* Logos sit in the middle; push right area with margin-left:auto */
.headerLogos{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
}
.headerLogos img{
  display:block;
  height:56px;   /* tweak as needed */
  width:auto;
}

/* About button on the far right */
.headerAboutBtn{
  margin-left:12px;     /* space from logos */
}

/* Map container - takes 75% width */
#mapDiv {
    flex: 3;
    position: relative;
    min-height: 0;
    margin: 1px 0.5px 1px 0px;
    padding: 0;
    border: 1px solid #222;
    border-radius: 0;
    overflow: hidden;
}

/* Right panel - takes 25% width */
#rightPane {
    flex: 1;
    min-width: 350px;
    max-width: 450px;
    padding: 0;
    margin: 1px 0px 1px 0.5px;
    background-color: #f8f8fc;
    border: 1px solid #222;
    border-radius: 0;
    width: 26%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Footer flexbox */
#footerPane {
    flex: 0 0 60px;
    background-color: #033566;
    opacity: 0.8;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    border: 1px solid #222;
    padding: 0;
    margin: 0;
    height: 60px;
    color: white;
    text-align: center;
    font-size: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#footer a { 
    color: white; 
    text-decoration: underline;
}

#footer a:hover { 
    text-decoration: none;
}

/* Home button and scale bar positioning */
#HomeButton {
    position: absolute;
    top: 95px;
    left: 20px;
    z-index: 50;
}

#scaleBar {
    left: 20px;
    bottom: 35px;
    width: 120px;
    z-index: 50;
    position: absolute;
}

/* Map widget positioning */
.map-widget {
    position: absolute;
    z-index: 999;
    opacity: 0.9;
}

.legend-widget {
    right: 20px;
    top: 20px;
}

.basemap-widget {
    right: 20px;
    bottom: 20px;
    font-size: 14px;
}

/* Dropdown menu positioning */
.dropdown-menu {
    position: absolute;
    right: 0px;
}

/* Panel styling (match main.css exactly) */
.panel-group .panel-heading {
    background-color: #033566;
    font-size: 18px;
    font-family: 'Pragati Narrow', sans-serif;
}

.panel-group .panel-heading .panel-title, 
.panel-group .panel-heading a {
    color: white;
}

.panel-group .panel-heading:hover {
    background-color: #efefef;
    font-size: 18px;
    font-family: 'Pragati Narrow', sans-serif;
}

.panel-group .panel-heading:hover .panel-title, 
.panel-group .panel-heading:hover a {
    color: navy;
}

.list-group-item-selected.active, 
.list-group-item-selected.active:focus, 
.list-group-item-selected.active:hover, 
.list-group-item:hover {
    z-index: 2;
    color: navy;
    background-color: #efefef;
    border-color: white;
}

/* Tab styles (match main.css exactly) */
.nav-tabs > li {
    width: 50%;
    text-align: center;
}

.nav-tabs > li > a {
    font-size: 18px;
    text-align: center;
}

.nav-tabs > li > a:hover,
.nav-tabs > li.active > a:hover {
    background-color: #efefef;
    color: navy;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Pragati Narrow', sans-serif;
    text-align: center;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus {
    background-color: #033566;
    color: white;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Pragati Narrow', sans-serif;
    text-align: center;
}

/* Button styles (match main.css exactly) */
.button {
    -webkit-transition-duration: 0.2s;
    transition-duration: 0.2s;
    background-color: #033566;
    color: white;
    border-radius: 5px;
    font-size: 18px;
    font-family: 'Pragati Narrow', sans-serif;
}

.button:hover {
    background-color: #efefef !important;
    color: navy !important;
}

/* State icon positioning */
.state-icon {
    left: -5px;
}

/* Form control styles */
.selectWidth {
    min-width: 0;
    height: auto;
    width: auto;
    margin: 5px;
    display: inline;
    font-family: 'Pragati Narrow', sans-serif;
}

#downloadAreas, #dataTypes {
    font-family: 'Pragati Narrow', sans-serif;
}

/* Center align button groups and download section */
#btnGroup {
    text-align: center;
    margin-bottom: 10px;
}

#downloadAll {
    text-align: center;
    margin-top: 10px;
}

#downloadAllButton {
    margin-top: 10px;
}

/* Table styles */
table, tr, td, th {
    border: none;
    text-align: center;
}

tr.tableHead {
    cursor: pointer;
}

/* ESRI Legend overrides */
.esriLegendLayerLabel {
    display: none !important;
}

#dijit_TitlePane_0_pane {
    padding: 8px;
}



/* Messages styling to match original */
#messages1 {
    text-align: left;
    margin: 10px;
}

#messages2 {
    text-align: left;
    margin: 10px;   
    display: none;
    overflow-y: auto;
    max-height: 300px;
}

/* Right panel scrolling */
#rightPane .panel-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

#rightPane .tab-content {
    height: 100%;
}

#rightPane .tab-pane {
    height: 100%;
    overflow-y: auto;
}

#help {
    text-align: left;
    margin: 10px;
    font-size: 15px;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 1200px) {
    #rightPane {
        min-width: 280px;
    }
    
    .headerText {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    #contentArea {
        flex-direction: column;
    }
    
    #mapDiv {
        flex: 2;
        min-height: 400px;
    }
    
    #rightPane {
        flex: 1;
        min-width: unset;
        max-width: unset;
        min-height: 300px;
    }
    
    .headerText {
        font-size: 24px;
    }
}