/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  /*font-size: 1em;
  line-height: 1.4;*/
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */
.raleway-body{
  font-family: "Raleway", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
.raleway-header {
  font-family: "Raleway", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-optical-sizing: auto;
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}

/** Core Styles **/
html, body { margin: 0 auto; height: 100%; padding: 0; }
#mapApp {
  height: 100vh;
  width: 100%;
}
#monithon-logo {
  position: absolute;
  right: 1rem; top: 1rem;
  z-index:9000;
}
h1 {
  position: absolute;
  top: 0;
  left: 15%;
  width: 70%;
  z-index: 8000;
  text-align: center;
  margin-top: 0;
  padding: 1rem 0;
  background: rgba(255,255,255,1);
  backdrop-filter: blur(10px);
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
 /* box-shadow: rgba(255, 255, 255, 0.1) 0px 1px 1px 0px inset, rgba(50, 50, 93, 0.25) 0px 50px 100px -20px, rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;*/

}
.lang-switch{
  position: absolute;
  bottom: 2rem;
  right: 1rem;
  z-index: 8002;
  cursor: pointer;

  button {
    margin: 0;
    width: 40px;
    height: 40px;
    display: block;
    float: left;
    border: 1px solid black;
    background: rgba(255,255,255,1);
    cursor: pointer;
    &.active {
      background: rgba(0 0 0 / 1);
      color: #fff;
    }
  }
  button#en{
    border-bottom-left-radius: 20px;
    border-top-left-radius: 20px;
  }
  button#it{
    border-bottom-right-radius: 20px;
    border-top-right-radius: 20px;
  }
}

button#help-modal {
  border: 1px solid #ed9b2d;
  color: #ed9b2d;
  font-family: "Raleway", sans-serif;
  font-style: normal;
  font-weight: 600;
  font-optical-sizing: auto;
  width: 36px;
  height: 36px;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.6rem;
  position: absolute;
  top: 8rem;
  right: 1.8rem;
  z-index: 8450;
  background-color: #ffea01;
  box-shadow: 0 1rem 2rem rgba(0,0,0,.8);
}

.geoSwitches {
  position: absolute;
  left: 0;
  top: 30%;
  min-width: 5vw;
  z-index: 8001;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
}

.indexSwitches {
  z-index: 8002;
  top: 4.5rem;
  position: absolute;
  width: 70%;
  left: 15%;
  /*height: 3rem;*/
  flex-direction: column;
  display: flex;
  align-items: center;
  justify-content: center;
  .main-buttons {
    display: flex;
    flex-direction: row;
    width: 100%

  }
  .sub-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
  }
  .btn { margin: 0 1rem; }
}

.btn {
  width: 100%;
  height: 100%;
  clear: both;
  border-radius: 1rem;
  font-size: 0.75rem;
  line-height: 1;
  text-transform: uppercase;
  font-weight: bold;
  backdrop-filter: blur(5px);
  background-color: transparent;
  padding: 0.5rem 1rem;
  outline: none;
  margin-block-end: 1rem;
  &.geo-button {
    --button-color: royalblue;
    color: var(--button-color);
    border: 1px solid  var(--button-color);
    &:hover {
      cursor: pointer;
      background-color: rgba(65, 105, 225, 0.25);
      color: var(--button-color);
    }
    &.active {
      border: 1px solid #459ded;
      background-color: #459ded;
      color: #fff;
    }

    &.hydro {
      --button-color: #3182bd;
      color: var(--button-color);
      border: 1px solid  var(--button-color);
      &:hover {
        cursor: pointer;
        background-color: rgba(49, 130, 189, 0.25);
        color: var(--button-color);
      }
      &.active {
        border: 1px solid var(--button-color);
        background-color: var(--button-color);
        color: #fff;
      }
    }

    &.health {
      --button-color: #D95F0E;
      color: var(--button-color);
      border: 1px solid  var(--button-color);
      &:hover {
        cursor: pointer;
        background-color: rgba(22, 73, 110, 0.25);
        color: var(--button-color);
      }
      &.active {
        border: 1px solid var(--button-color);
        background-color: var(--button-color);
        color: #fff;
      }
    }

    &.economics {
      --button-color: #dd1c77;
      color: var(--button-color);
      border: 1px solid  var(--button-color);
      &:hover {
        cursor: pointer;
        background-color: rgba(221, 28, 119, 0.25);
        color: var(--button-color);
      }
      &.active {
        border: 1px solid var(--button-color);
        background-color: var(--button-color);
        color: #fff;
      }
    }

  }
  &.data-button {
    --button-color: #990534;
    color: var(--button-color);
    border: 1px solid  var(--button-color);

    &:hover {
      cursor: pointer;
      background-color: rgba(153, 5, 52, 0.25);
      color: var(--button-color);
    }
    &.active {
      border: 1px solid #d32159;
      background-color: #d32159;
      color: #fff;
    }

    &#hydrogeo {
      --button-color: #3182bd;
      color: var(--button-color);
      border: 1px solid  var(--button-color);
      &:hover {
        cursor: pointer;
        background-color: rgba(22, 73, 110, 0.25);
        color: var(--button-color);
      }
      &.active {
        border: 1px solid #3182bd;
        background-color: #3182bd;
        color: #fff;
      }
    }

    &#health {
      --button-color: #D95F0E;
      color: var(--button-color);
      border: 1px solid  var(--button-color);
      &:hover {
        cursor: pointer;
        background-color: rgba(217, 95, 14, 0.25);
        color: var(--button-color);
      }
      &.active {
        border: 1px solid #D95F0E;
        background-color: #D95F0E;
        color: #fff;
      }
    }

    &#economics {
      --button-color: #dd1c77;
      color: var(--button-color);
      border: 1px solid  var(--button-color);
      &:hover {
        cursor: pointer;
        background-color: rgba(221, 28, 119, 0.25);
        color: var(--button-color);
      }
      &.active {
        border: 1px solid #dd1c77;
        background-color: #dd1c77;
        color: #fff;
      }
    }



  }

  &.indicator-button, &.reset-button {
    --button-color: #292727;
    color: var(--button-color);
    border: 1px solid  var(--button-color);
    &:hover {
      cursor: pointer;
      background-color: rgba(153, 5, 52, 0.25);
      color: var(--button-color);
    }
    &.active {
      border: 1px solid #4a4747;
      background-color: #4a4747;
      color: #fff;
    }
  }
}
.btn#hydrogeo-reset, .btn#economics-reset, .btn#health-reset {
  text-transform: none !important;
}
.btn#hydrogeo-reset.active {
  background-color: #3182bd;
}
.btn#health-reset.active {
  background-color: #D95F0E;
}
.btn#economics-reset.active {
  background-color: #dd1c77;
}
.symbol {
  padding: 0.5rem 0.2rem;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 600;
}
#main-index.active {
  font-weight: bold;
  &.hydrogeo-reset {
    background-color: #3182bd;
  }
  &.health-reset {
    background-color: #D95F0E;
  }
  &.economics-reset {
    background-color: #dd1c77;
  }
}
#se-index {
  &.active {
    font-weight: bold;
    background-color: #bcbddc;
  }
}
#en-index {
    &.active {
      font-weight: bold;
      background-color: #99d8c9;
    }
  }
#po-index {
    &.active {
      font-weight: bold;
      background-color: #bdbdbd;
    }
  }

.data-box {
  position: absolute;
  opacity: 0;
  bottom: 0;
  left: 0;
  width: 50%;
  padding: 2rem;
  min-height: 20vh;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  z-index: -1;
  transition: all 0.5s ease-in-out;
  border-top-right-radius: 4rem;
  &.visible {
    opacity: 1;
    z-index: 8500;
  }
  h2 { margin-top: 0; }
  h2#risk-type {
    &.hydro {
      color: #3182bd;
    }
    &.health {
      color: #D95F0E;
    }
    &.economics {
      color: #dd1c77;
    }
  }
  table {
    border-collapse: collapse;
    thead tr th {
      text-align: left;
      color: white;
      background-color: dimgray;
      padding: 0.5rem;
      border: 0.1rem solid dimgray;
    }
    tbody tr td {
      text-align: left;

      padding: 0.5rem;
      border: 0.1rem solid dimgray;
    }
  }
}
.map {
  position: relative;
}

footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  z-index: 8001;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  background: white;
  box-sizing: border-box;
  padding: 1rem;
}
dialog {
  width: 50%;
  border-radius: 32px;
  border: 1px solid white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 20px 0 rgba(0, 0, 0, 0.19);
  padding: 2rem;
  h2 {
    border-bottom: 1px solid black;
  }
}
dialog::backdrop {
  background-image: linear-gradient(
    45deg,
    #3182bd,
    #d95f0e,
    #dd1c77
  );
  opacity: 0.75;
}
.hide { display: none !important; }

.img-fluid {
  max-width: 100%;
  object-fit: contain;
}

@media only screen and (max-width: 600px) {
  .geoSwitches {
    max-width: 3rem;
  }
  .indexSwitches {
    width: 100%;
    left: 0;
    flex-wrap: wrap;
    .sub-buttons {
      flex-wrap: wrap;
      .symbol { display: none;}
    }
    button.btn {
      font-size: 0.5rem;
    }
  }
  .data-box {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    thead, tbody {  display: block; float: left; box-sizing: border-box; }
    thead { width: 65%; }
    tbody { width: 35%; }
    tr { display: block;  }
    th { font-weight: normal;  }
    th, td { display: block; float: left; width: 100%; box-sizing: border-box; font-size: 0.75rem;}
  }
  #monithon-logo { max-width: 32px; max-height: 32px; img { width: 32px; height: 32px; }}
  dialog { box-sizing: border-box; width: 90%; margin: 0 auto; }
  button#help-modal { top: auto; bottom: 5rem; }
}


