/* Russ here. I have no idea where much of this CSS came from or why it is in here.
   Audits show about half of it isn't being used by any elements and I intend to
   clean it out later of unused stuff. Bruce tended to used underscores and my stuff
   tends to be CamelCase.
*/

/*
 * Reset CSS
 */
* {
  margin: 0;
  padding: 0;
}

/* make unselectable so when dragging selection box, can't accidentally leave map */
/* if not on BODY try on various DIVs like sidebar and header */
/* another way: have noselectText class here and use it in HTML */

#header,
#sidebar,
#mapDiv,
#title,
.notselectable {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a img,
iframe {
  border: 0;
}


/* fixes strange Webkit bottom margin
   too big in the HTML table export */
h2 {
  display: inline;
}

/* Lists */

ul,
ol,
dl,
li,
dt,
dd {
  list-style: none;
}

/* Forms */

form,
fieldset {
  border: 0;
}

legend {
  color: #000;
}

input,
textarea,
select,
button {
  font-size: 100%;
  font-family: serif;
}

/* made more specific */
div#sidebar form#evtFilterForm select {
  margin: 0;
  /* was inherit */
  z-index: 2;
}

/* Tables */

table {
  border-collapse: collapse;
  border: 0;
}

td,
th,
caption {
  font-size: 100%;
  font-weight: normal;
  text-align: left;
}

.right {
  text-align: right;
}


.moreEvents {
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-weight: bold;
  color: #FF0000;
  text-align: center;
}

a.links {
  text-decoration: none;
  padding-left: 4px;
  display: block;
}

a.links:hover {
  background-color: #FF9900;
}

div#viewas a.links {
  text-decoration: none;
  font-size: 11pt;
  line-height: 12pt;
  color: blue;
  padding: 2px;
  display: inline;
}

div#exports a.links {
  text-decoration: none;
  font-size: 11pt;
  line-height: 12pt;
  color: blue;
  padding: 2px;
  display: inline;
}

#header {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  height: 50px;
  background-color: #CCCCFF;
  text-align: center;
  font-family: sans-serif;
  font-size: 26px;
  border: 1px solid #aaaaaa;
  overflow: hidden;
}

#title {
  position: relative;
  text-align: center;
  top: 10px;
  display: inline;
  padding: 4px;
  z-index: 99;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 7px;
  cursor: pointer;
}

#title:hover {
  border: 1px solid blue;
}

#greyMapDiv {
  z-index: 201;
  background-color: #CCCCCC;
  opacity: 0.5;
  visibility: hidden
}

#mapDiv,
#greyMapDiv {
  position: absolute;
  top: 60px;
  left: 5px;
  right: 270px;
  bottom: 5px;
  border: 1px solid #979797;
}


/* up top inside header in front of title see showMsg() */
#message {
  border-radius: 7px;
  border: 1px solid #979797;
  color: white;
  display: none;
  font-size: 18px;
  left: 160px;
  position: absolute;
  right: 132px;
  text-align: left;
  top: 15px;
  visibility: hidden;
  width: 70%;
  z-index: 999;
  padding: 5px 10px;
}

#debug {
  position: absolute;
  top: 800px;
  left: 5px;
  right: 132px;
  border: 1px solid #979797;
}

#sidebar {
  visibility: visible;
  position: fixed;
  top: 60px;
  right: 5px;
  width: 260px;
  background-color: #CCCCCC;
  border: 1px solid #777777;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: "Times New Roman", Times, serif;
  font-size: 14px;
  font-style: normal;
  bottom: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.checkbox_label {
  font-size: 12px;
}

#status {
  position: absolute;
  top: 40%;
  left: 20%;
  width: 40%;
  z-index: 500;
  background-color: white;
  border: 2px solid grey;
  text-align: center;
  color: black;
  opacity: 0.9;
  padding: 10px;
}

#latlon_info {
  text-align: center;
  font-family: "Times New Roman", Times, serif;
  font-size: 12px;
  margin-top: 30px;
}

#mouselatlng {
  background-color: #FF9900;
  text-align: center;
  font-size: 15px;
  margin-top: 20px;
  padding: 3px;
}

#menuLine {
  position: absolute;
  top: 25px;
  right: 67px;
}

#menuLine .item {
  background-color: #CCCCFF;
  padding: 3px 5px;
  border: 1px solid #00000042;
  cursor: pointer;
  margin-right: 5px;
  box-shadow: 3px 2px 3px #00000080;
  border-radius: 3px;
}

#menuLine .item a {
  text-decoration: none;
}

@media screen and (max-height: 523px) {
  #depthscale {
    display: none;
  }

  #magscale {
    display: none;
  }

  #platesLegend {
    display: none;
  }
}

@media screen and (max-width: 772px) {

  #title {
    display: none;
  }
}

.legend {
  position: absolute;
  z-index: 99;
  background-color: #FFFFFF;
  opacity: 0.6;
  padding: 2px;
  border-radius: 5px;
  border: 1px solid black;
}

#magscale,
#depthscale {
  left: 12px;
}

#magscale {
  bottom: 35px;
}

#depthscale {
  bottom: 100px;
}

#platesLegend {
  left: 70px;
  bottom: 100px;
  visibility: hidden;
}

#downloads {
  background-color: transparent;
  text-align: left;
}

/* orange box for earthquake count and #visible.
   til recently this was eventsdisplayed, but eventsvisible was added
   and a container for both of them needed */
#eventsContainer {
  padding: 2px;
  margin: 15px 3px;
  background-color: #FF9900;
  color: #000000;
  border: 1px solid #000000;
  text-align: center;
  font-size: 12px;
  font-family: sans-serif;
}

#invalidEvents {
  color: red;
  display: none;
  visibility: hidden;
}

#dzIcon {
  vertical-align: middle;
}

#selectTip {
  font-size: 1.2em;
}

#dzControlsDiv {
  max-width: 220px;
  margin-left: 8px;
  margin-top: 4px;
  background-color: white;
  opacity: 0.7;
  border: 1px solid #0000AA;
  text-align: left;
  vertical-align: middle;
  font-family: sans-serif;
}

a.dzSelBoxLinks {
  font-size: 11pt;
  line-height: 12pt;
  text-decoration: none;
  padding-top: 2px;
  padding-right: 4px;
  padding-left: 4px;
  padding-bottom: 2px;
  color: blue;
  display: block;
}

a.dzSelBoxLinks:hover {
  background-color: #FF9900;
}

#filterlabel {
  font-family: sans-serif;
  font-style: italic;
  font-size: 11px;
  text-align: center;
}

#otherstuff {}

.small_italics {
  font-family: sans-serif;
  font-style: italic;
  font-size: 11px;
  padding-left: 4px;
}

#orderby_text {
  padding-left: 4px;
}

#orderby_selector {
  width: 95px;
  max-width: 115px;
}

#max_display_text {
  padding-left: 4px;
}

#max_display_selector {
  width: 80px;
  max-width: 110px;
}

#area_display_selector {
  width: 120px;
  max-width: 120px;
}

.normal {}

#start_text {
  width: 100px;
  text-align: center;
}

#end_text {
  width: 100px;
  text-align: center;
}

.niceborder {
  border: 1px solid #000000;
  background-color: #CCCCCC;
  z-index: 2;
  margin: 3px;
  padding: 5px 2px 5px 2px;
  font-family: sans-serif;
  overflow: hidden;
}

#magtextimg,
#depthtextimg {
  vertical-align: bottom;
}

#mag_min_text {
  width: 35px;
}

#mag_max_text {
  width: 35px;
}

#depth_min_text {
  width: 35px;
}

#depth_max_text {
  width: 35px;
}

.centerit {
  text-align: center;
}

#apply_button_div {
  text-align: center;
  padding-top: 5px;
}

#apply_button {
  font-family: sans-serif;
  font-size: 12pt;
  background-color: #FFFFFF;
  padding: 3px 28px 3px 28px;
}

div#depthRangeSection {
  display: none;
}

div#magnitudeRangeSection {
  display: none;
}

div#timeRangeSection {
  display: none;
}

div#datasourceSection {
  display: none;
}

div#eventsNumberWarning {
  display: none;
  margin-top: 3px;
  margin-left: 3px;
  margin-right: 3px;
  text-align: justify;
  font-size: 9pt;
}

#selectControlDiv {
  visibility: visible;
  padding-top: 5px;
  z-index: 999999;
}

#deselectControlDiv {
  visibility: hidden;
  padding-top: 5px;
  z-index: 999999;
}

span#red {
  color: #FF0000;
}

#socialLinks {
  vertical-align: middle;
  text-align: left;
  padding: 0 0 1px 3px;
}

#irisIcon {
  position: absolute;
  left: 12px;
  top: 6px;
  border: 0;
}

#iebLogo {
  position: absolute;
  right: 0;
  top: 6px;
  opacity: 0.5;
  z-index: 0;
}

#usage {
  position: absolute;
  top: 33px;
  left: 67px;
  height: 15px;
  background-color: transparent;
  color: blue;
  text-align: right;
  font-size: 18px;
}

#nearbyEventsWindow {
  overflow: auto;
  max-height: 800px;
  font-size: 12pt;
}

#mcount {
  position: absolute;
  bottom: 15px;
  left: 80px;
  font-size: 12px;
  color: black;
  font-family: sans-serif;
  opacity: 1.0;
  background: rgba(255, 255, 255, 0.7);
  visibility: hidden;
}

#minfo {
  position: absolute;
  bottom: 15px;
  left: 195px;
  font-size: 12px;
  /*width: 600px;
      height: 20px;*/
  color: black;
  font-family: sans-serif;
  opacity: 1.0;
  background: rgba(255, 255, 255, 0.7);
  visibility: hidden;
}

#usingThreeDV {
  visibility: hidden;
  display: none;
  position: absolute;
  top: 70px;
  left: 120px;
  border: 5px solid grey;
  background: grey;
}


/*.goog-te-banner-frame, .skiptranslate { */
.goog-te-banner-frame {
  display: none !important
}

#curURL {
  background: lightgrey;
  margin-left: 3px;
}

/* from clipboard.js file was "primer.css" from
 * https://clipboardjs.com/
 * this class "btn" is used in the Share map" section,
 * it's the little icon of a clipboard with an arrow.
 */
.btn {
  position: relative;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  background-color: #eee;
  background-image: linear-gradient(#fcfcfc, #eee);
  border: 1px solid #d5d5d5;
  border-radius: 3px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-appearance: none;
  background: transparent;
  /* added rcw */
}

.btn i {
  font-style: normal;
  font-weight: 500;
  opacity: .6
}

.btn .octicon {
  vertical-align: text-top
}

.btn .counter {
  text-shadow: none;
  background-color: #e5e5e5
}

.btn:focus {
  text-decoration: none;
  border-color: #51a7e8;
  outline: 0;
  box-shadow: 0 0 5px rgba(81, 167, 232, .5)
}

.btn:focus:hover,
.btn.selected:focus {
  border-color: #51a7e8
}

.btn:hover,
.btn:active,
.btn.zeroclipboard-is-hover,
.btn.zeroclipboard-is-active {
  text-decoration: none;
  background-color: #ddd;
  background-image: linear-gradient(#eee, #ddd);
  border-color: #ccc
}

.btn:active,
.btn.selected,
.btn.zeroclipboard-is-active {
  background-color: #dcdcdc;
  background-image: none;
  border-color: #b5b5b5;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15)
}

.btn.selected:hover {
  background-color: #cfcfcf
}

.btn:disabled,
.btn:disabled:hover,
.btn.disabled,
.btn.disabled:hover {
  color: rgba(102, 102, 102, .5);
  cursor: default;
  background-color: rgba(229, 229, 229, .5);
  background-image: none;
  border-color: rgba(197, 197, 197, .5);
  box-shadow: none
}

/* from clipboard.js file was "main.css" from
 * https://clipboardjs.com/
 */
.clippy {
  margin-top: -3px;
  position: relative;
  top: 3px
}

.btn[disabled] .clippy {
  opacity: .3
}


/* initially not visible */
div#animateSection {
  display: none;
  overflow: hidden;
}

/* slider's blue draggable handle: */
.niceborder-toggle-title {
  color: blue;
  cursor: pointer;
}

div#anim_btns {
  margin-top: 6px;
  padding: 4px;
  margin-left: 10px;
}

div#anim_btns button {
  padding: 0px;
  margin: 0px;
  border: none
}

div#anim_btns button:active {
  opacity: 0.8 !important;
}

/* slider needs to NOT go all the way to right edge of div */
#anim_border {
  padding-right: 15px;
}

span#speed_btns {
  /*opacity: 0.5;  will make 1.0 when enabled */
  margin-left: 10px;
  vertical-align: top;
}

#playPause_btn {
  cursor: pointer;
  background-color: transparent;
}

#speedUp_btn {
  background-image: url('../imgs/upArrow.png');
  background-color: transparent;
  width: 30px;
  height: 30px;
}

#slowDown_btn {
  background-image: url('../imgs/downArrow.png');
  background-color: transparent;
  width: 30px;
  height: 30px;
}

div#anim_btns button#autorepeat_btn {
  margin-left: 15px;
  background-image: url('../imgs/autorepeat.png');
  background-color: transparent;
  width: 30px;
  height: 30px;
  vertical-align: top;
}

#zbtn:hover {
  border: 1px solid black;
  background: none;
  cursor: pointer;
}


#sliderDiv {
  width: 100%;
  margin-top: 7px;
  margin-bottom: 8px;
}

#binSlider {
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;
  background: #dfdfdf;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

#binSlider::-moz-focus-outer {
  border: 0;
}

#binSlider:hover {
  opacity: 1;
}

#binSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: blue;
  cursor: pointer;
}

#binSlider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: blue;
  cursor: pointer;
}

#anim_date_div {
  margin-top: 4px;
  margin-bottom: 8px;
  text-align: center;
  width: 100%;
}

#anim_date_txt {
  font-size: 14px;
}

#histgraph {
  height: 40px;
  width: 100%;
  margin: 0px;
  padding: 1px 15px 1px 15px;
}

#histgraph ul {
  margin-left: 0px;
  -moz-transform: scale(1, -1) translatey(-36px);
  -webkit-transform: scale(1, -1) translatey(-36px);
  -o-transform: scale(1, -1) translatey(-36px);
  -ms-transform: scale(1, -1) translatey(-36px);
  transform: scale(1, -1) translateY(-36px);
}

#histgraph li {
  position: absolute;
  list-style: none;
  background: blue;
  visibility: hidden;
  background-repeat: repeat-y;
}


/*
    move google map style control ("Terrain label") up, so "terrain" dropdown is visible.
*/
.gm-style-mtc div+div {
  top: -40px !important;
}


/* tooltips for the Options - only if hovering is available on device */

/* @media (any-hover: hover) { */

#datasource_border,
#datasource_text,
#datasource_selector {
  font-size: 14px;
  font-style: italic;
  font-weight: lighter;
  line-height: 14px;
  padding: 8px 8px 0px 8px;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  font-style: normal;
  width: 242px;
  background-color: #555;
  color: #fff;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 5;
  right: -84px;
  top: -163px;
  transition: opacity 0.6s;
  opacity: 0;
  visibility: hidden;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.ad-new {
  color: red;
  font-weight: 400;
  font-size: 16px;
}

#td-viewer {
  background-color: red;
  position: fixed;
  z-index: 0;
  top: 60px;
  left: 5px;
  height: calc(100vh - 65px);
  width: calc(100vw - 10px - 260px);
  display: none;
  outline: none;
}

.scene {
  width: 246px;
  height: 132px;
  border: 1px solid #CCC;
  perspective: 600px;
  margin-top: 10px;
}

.card {
  width: 100%;
  height: 100%;
  transition: transform 1s;
  transform-style: preserve-3d;
  cursor: pointer;
  position: relative;
}

.card input {
  /* margin: 3px 0px;
  font-family: sans-serif;
  font-size: 12pt;
  background-color: #FFFFFF;
  padding: 2px 0px;
  border-radius: 1px;
  width: 100%; */
}

.card label {
  display: inline-block;
}

.card .d-title {
  font-family: sans-serif;
  margin-bottom: 10px;
  border-bottom: 1px solid black;
  padding-bottom: 5px;
}

.card.is-flipped {
  transform: rotateY(180deg);
}

.card__face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.card__face--front {
  /* background: red; */
}

.card__face--back {
  background: #e6e6e6;
  border: 1px solid black;
  transform: rotateY(180deg);
}

.bins-item {
  display: inline-block;
  font-size: small;
  background: #ececec;
  padding: 1px 5px;
  margin: 2px;
  border: 1px solid #8e8e8e;
  border-radius: 3px;
  text-align: center;
}