/* CSS for Woods & Poole Interactive Data Map
/* HighCharts Version
/* KTG - 11/2021
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
/*                                                          Set up map style */

#pretext {
    text-align: center;
    height: 30px;
    width: 100%;
    background: #EEEEEE;
    margin-top: 15px;
}

#mapContainer { 
    background-color: #eeeeee;
    width: 100%; 
    height: 70vh;
    margin-left: 5px; 
    margin-right: 5px;
    }
    
/* ------------------------------------------------------------------------- */
/*                                                                   Buttons */
.buttonBar {
    position: relative;
    font-family: Arial, Helvetica, sans-serif;
    /*width: calc(100% -120px);
    margin-left: 120px;*/
    left: 0px;
    min-height:fit-content;
    background: #eeeeee; /* Very Light Grey background */
    opacity: 0.8; /* Set transparency (for mouse-over effects on hover) */  
}

.buttonBar2 {
    margin: auto;
    padding: 2px;
    height: fit-content;
    width: 80%;
}

.buttonBar3 {
  display: inline;
}

.button {
    display: inline-block;
    width: 16%;
    min-width: fit-content;
    padding: 2px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color:  white;
    background-color: gray;
    border: none;
    border-radius: 3px;
    box-shadow: 3px rgba(0,0,0,0.2);
  }
  
  .button:hover {background-color: #4d4d4d}
  
  .button:active {
    background-color: #6d6d6d;
    box-shadow: 0 1px dimgray;
    transform: translateY(2px);
  }

  .buttonSelected {
    display: inline-block;
    padding: 2px 2px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color: white;
    background-color: #373737;
    border: none;
    border-radius: 3px;
    box-shadow: 3px rgba(0,0,0,0.2);
  }
 
/* ========================================================================= */
/* Attribution Bar at Bottom ----------------------------------------------- */
/* ========================================================================= */

.attribution{
    position: relative;
    width: 100%;
    margin: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    bottom: 10px;
    top: 0px;
    font-family: Helvetica, sans-serif;
    font-size: 80%;
    color: #404040;
    z-index: 90;
    }

/* ========================================================================= */
/* Vertical Year Menu ------------------------------------------------------ */
/* ========================================================================= */

.yearMenu {
    position: absolute;
    width: 110px;
    height: fit-content;
    top: 50px;
    left: 8px;
    border-radius: 4px;
    padding: 5px;
    overflow-y: auto;
    color: black;
    background-color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    z-index: 420;
}

/* ------------------------------------------------------------------------- */
/*                                                              Year Buttons */

.yearButton {
    display: inline-block;
    width: 92px;
    padding: 2px 2px;
    margin: 2px 2px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    outline: none;
    color:  white;
    background-color: gray;
    border: none;
    border-radius: 3px;
   }
  
  .yearButton:hover {background-color: #4d4d4d}

  .yearButtonSelected {
    display: inline-block;
    width: 96px;
    padding: 2px 2px;
    margin: 2px 2px;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    text-decoration-style: bold;
    outline: none;
    color:white;
    background-color: #505050;
    border: 4px;
    border-color: black;
    border-radius: 4px;
    border-style: outset;
  }


/* ========================================================================= */
/* Highcharts Elements ----------------------------------------------------- */
/* ========================================================================= */

/* Make legend title layout controllable */
.highcharts-legend-title span{
  white-space: normal !important;  /* override nowrap for the title only */
}
/* HTML legend title */
.wp-legend-title{
  text-align: center;
  width: 150px;
}
.wp-legend-logo{
  display: block;
  width: 140px;
  height: auto;
}
.wp-legend-name{
  margin-top: 12px;
}
.wp-legend-spacer{
  height: 6px;
}

/* ========================================================================= */
/* Media Screen Adjustments ------------------------------------------------ */
/* ========================================================================= */

@media screen and (max-width: 1400px) {
    .buttonBar {
        height: fit-content;
    }
    .button{
    	width: 31%;
	    margin: auto;
        padding-top: 2px;
        /*padding-left: 1%;
        padding-right: 1%;*/
    	}
    #rButton{
        width: 31%;
        padding-bottom: 2px;
    }
    #d1Button{
        width: 31%;
        padding-top: 2px;
        padding-left: 1%;
        padding-right: 1%;
    }
    #d2Button{
        width: 31%;
        padding-top: 2px;
        padding-left: 1%;
        padding-right: 1%;    
    }
    #d3Button{
        width: 31%;

    }
  }

  @media screen and (max-width: 800px) {
    .buttonBar {
        height: fit-content;
    }
    .buttonBar3 {
      display: flex;
      justify-content: space-between;
      margin-top: 2px;
    }
    .button{
    	width: 49.5%;
	    margin: auto;
        padding-top: 2px;
        /*padding-left: 1%;
        padding-right: 1%;*/
    	}
      #sButton, #cButton {
        margin: 0;
      }
    #rButton{
        width: 100%;
        padding-bottom: 2px;
    }
    #d1Button{
        width: 100%;
        padding-top: 2px;
        padding-left: 1%;
        padding-right: 1%;
    }
    #d2Button{
        width: 100%;
        padding-top: 2px;
        padding-left: 1%;
        padding-right: 1%;    
    }
    #d3Button{
        width: 100%;
    }
  }

  /* @media screen and (max-width: 517px) {
      .button{
        width: 49.4%;
      }
   }
   @media screen and (max-width: 439px) {
      .button{
        width: 49.3%;
      }
   }
   @media screen and (max-width: 383px) {
      .button{
        width: 49.2%;
      }
   }
   @media screen and (max-width: 341px) {
      .button{
        width: 49.3%;
      }
   }*/

  /* Tablet + below */
@media screen and (max-width: 800px) {

  /*.button {
    min-width: 0;
    white-space: nowrap;
  }*/

  /* Let map fill the screen width cleanly */
  #mapContainer {
    margin-left: 0;
    margin-right: 0;
    height: 60vh;
    min-height: 360px;
  }
  .buttonBar2 {
    width: 100%;
  }
  [data-simplebar] { position: relative !important; }

  /* Turn the year menu into a normal block instead of overlaying the map */
  .yearMenu {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-height: 160px;
    margin: 10px 0;
    z-index: 1;
  }

  /* Make year buttons wrap nicely */
  .yearButton,
  .yearButtonSelected {
    width: auto;
    min-width: 72px;
    display: inline-block;
  }

  /* HTML legend title */
    .wp-legend-title{
        width: 100%;
        display: flex;
        flex-flow: row wrap;
        gap: 10px;
        align-items: center;
    }
    .wp-legend-name,
    .wp-legend-units{
        margin-top: 0;
        white-space: nowrap;
    }
    .wp-legend-spacer{
        height: 0;
        width: 0;
    }
}


