* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #faf8ef;
  overflow: hidden; /* Hide scrollbars */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,
    Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, sans-serif;
}

.hover-info {
  min-width: 250px;
  width: max-content;
  z-index: 10001;
  position: absolute;
  /* background: aliceblue; */
  background: #faf8ef;

  border: 2px solid white;
  border-radius: 4px;
  overflow: visible;
  padding: 5px;
}

.triangle {
  position: absolute;
  z-index: -1;
  width: 10px;
  height: 10px;
  left: 5px;
  transform: rotate(45deg);
  background: #faf8ef;
  border-left: 2px solid white;
  border-top: 2px solid white;
}

#chartIntW {
  width: 100vw;
  height: 100vh;
}

#legend {
  width: 100%;
}

/* .info-text {
  margin: 20px 0;
} */

#chartIntW svg {
  width: 100%;
  height: 100%; /* overflows */
  /* height: 99%; does not overflow*/
  display: block;
  /* margin-bottom:-5px;  will work also*/
}

.dot {
  height: 10px;
  width: 10px;
  margin-right: 8px;
  line-height: 40px;
  border-radius: 50%;
  display: inline-block;
}

.card-body {
  padding: 5px;
  background-color: #faf8ef;
}

.resp-sharing-button__link,
.resp-sharing-button__icon {
  display: inline-block;
}

.resp-sharing-button__link {
  text-decoration: none;
  color: #fff;
  margin: 0.5em;
}

.resp-sharing-button {
  border-radius: 5px;
  transition: 25ms ease-out;
  padding: 0.5em 0.75em;
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}

.resp-sharing-button__icon svg {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: top;
}

.resp-sharing-button--small svg {
  margin: 0;
  vertical-align: middle;
}

/* Non solid icons get a stroke */
.resp-sharing-button__icon {
  stroke: #fff;
  fill: none;
}

/* Solid icons get a fill */
.resp-sharing-button__icon--solid,
.resp-sharing-button__icon--solidcircle {
  fill: #fff;
  stroke: none;
}

.resp-sharing-button--twitter {
  background-color: #55acee;
}

.resp-sharing-button--twitter:hover {
  background-color: #2795e9;
}

.resp-sharing-button--pinterest {
  background-color: #bd081c;
}

.resp-sharing-button--pinterest:hover {
  background-color: #8c0615;
}

.resp-sharing-button--facebook {
  background-color: #3b5998;
}

.resp-sharing-button--facebook:hover {
  background-color: #2d4373;
}

.resp-sharing-button--tumblr {
  background-color: #35465c;
}

.resp-sharing-button--tumblr:hover {
  background-color: #222d3c;
}

.resp-sharing-button--reddit {
  background-color: #5f99cf;
}

.resp-sharing-button--reddit:hover {
  background-color: #3a80c1;
}

.resp-sharing-button--google {
  background-color: #dd4b39;
}

.resp-sharing-button--google:hover {
  background-color: #c23321;
}

.resp-sharing-button--linkedin {
  background-color: #0077b5;
}

.resp-sharing-button--linkedin:hover {
  background-color: #046293;
}

.resp-sharing-button--email {
  background-color: #777;
}

.resp-sharing-button--email:hover {
  background-color: #5e5e5e;
}

.resp-sharing-button--xing {
  background-color: #1a7576;
}

.resp-sharing-button--xing:hover {
  background-color: #114c4c;
}

.resp-sharing-button--whatsapp {
  background-color: #25d366;
}

.resp-sharing-button--whatsapp:hover {
  background-color: #1da851;
}

.resp-sharing-button--hackernews {
  background-color: #ff6600;
}
.resp-sharing-button--hackernews:hover,
.resp-sharing-button--hackernews:focus {
  background-color: #fb6200;
}

.resp-sharing-button--vk {
  background-color: #507299;
}

.resp-sharing-button--vk:hover {
  background-color: #43648c;
}

.resp-sharing-button--facebook {
  background-color: #3b5998;
  border-color: #3b5998;
}

.resp-sharing-button--facebook:hover,
.resp-sharing-button--facebook:active {
  background-color: #2d4373;
  border-color: #2d4373;
}

.resp-sharing-button--twitter {
  background-color: #14171a;
  border-color: #55acee;
}

.resp-sharing-button--twitter:hover,
.resp-sharing-button--twitter:active {
  background-color: black;
  border-color: #2795e9;
}

.resp-sharing-button--reddit {
  background-color: #5f99cf;
  border-color: #5f99cf;
}

.resp-sharing-button--reddit:hover,
.resp-sharing-button--reddit:active {
  background-color: #3a80c1;
  border-color: #3a80c1;
}

.resp-sharing-button--whatsapp {
  background-color: #25d366;
  border-color: #25d366;
}

.resp-sharing-button--whatsapp:hover,
.resp-sharing-button--whatsapp:active {
  background-color: #1da851;
  border-color: #1da851;
}

/* .top-ten-modal {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(5, 1fr);
  height: 100%;
  grid-gap: 0.3em;
  perspective: 100vw;
} */

.stateSquare {
  display: flex;
  justify-content: center;
  align-items: center;
  /* width: 40px; */
  height: 40px;
  cursor: pointer;
  /* background-color: red; */
  border-radius: 5px;
  /* min-width: 30px;
  flex-grow:1 */
  flex-basis: 10%;
}

.top-ten-modal-row {
  display: flex;
  gap: 0.2rem;
  /* justify-content: space-evenly; */
  margin: 0.2rem 0;
  align-content: stretch;
}

.modal-content {
  background-color: #faf8ef;
}

.usa-row {
  margin-top: 20px;
}

.usa-row .stateSquare {
  margin: 0.2rem 0;
}

.info {
  position: fixed;
  top: 90px;
  left: 5px;
  cursor: pointer;
}

.topTen {
  position: fixed;
  top: 130px;
  left: 5px;
  cursor: pointer;
}

.social-networks {
  position: fixed;
  top: 90px;
  right: 5px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 650px) {
  .info {
    position: fixed;
    top: 40px;
    left: 5px;
    cursor: pointer;
  }

  .topTen {
    position: fixed;
    top: 80px;
    left: 5px;
    cursor: pointer;
  }

  .social-networks {
    position: fixed;
    top: 40px;
    right: 5px;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 1024px) {
  .high-low {
    background-color: #faf8ef;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 4px 10px;
    /* border-radius: 0.4rem; */
    font-size: 0.8rem;
  }

  .top-bar {
    position: fixed;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    /* pointer-events: none; */
    /* background-color: rgba(250, 248, 239, 0.4); */
    /* opacity: 0.6; */
    background-color: #faf8ef;
  }

  h1 {
    /* text-align: center; */
    /* padding: 50px 0; */
    font-family: "Grandstander";
    margin-top: 10px;
    font-size: 2rem;
    /* filter: drop-shadow(2px 2px #faf8ef); */

    margin-bottom: 0;
    text-align: center;
  }

  .hover-info {
    width: 250px;
    /* width: max-content; */
    z-index: 10001;
    position: absolute;
    /* background: aliceblue; */
    background: #faf8ef;

    border: 2px solid white;
    border-radius: 4px;
    overflow: visible;
    padding: 5px;
  }

  .excessiveDrinkers {
    display: none;
  }

  .info-footer {
    padding: 10px 0;
    text-align: center;
  }
}

@media (min-width: 1025px) {
  .high-low {
    background-color: #faf8ef;
    position: fixed;
    top: 170px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 0.4rem;
    font-size: 0.8rem;
  }

  .top-bar {
    position: fixed;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    /* pointer-events: none; */
    /* background-color: rgba(250, 248, 239, 0.4); */
    /* opacity: 0.6; */
    background-color: #faf8ef;
  }

  h1 {
    /* text-align: center; */
    padding: 30px 0;
    font-family: "Grandstander";
    margin-top: 10px;
    font-size: 3em;
    /* filter: drop-shadow(2px 2px #faf8ef); */

    margin-bottom: 0;
    text-align: center;
  }

  .info {
    position: fixed;
    top: 90px;
    left: 5px;
    cursor: pointer;
  }

  .topTen {
    position: fixed;
    top: 130px;
    left: 5px;
    cursor: pointer;
  }

  .social-networks {
    position: fixed;
    top: 90px;
    right: 5px;
    display: flex;
    flex-direction: column;
  }

  /* if (width < 1280) {
    const topbarHeight = d3
      .select(".top-bar")
      .node()
      .getBoundingClientRect().height;

    d3.select(".social-networks").style("top", () => {
      return `${topbarHeight}px`;
    });

    d3.select(".info").style("top", () => {
      return `${topbarHeight}px`;
    });

    d3.select(".topTen").style("top", () => {
      return `${topbarHeight + 45}px`;
    });
  } else {
    d3.select(".social-networks").style("top", () => {
      return `${15}px`;
    });

    d3.select(".info").style("top", () => {
      return `${15}px`;
    });

    d3.select(".topTen").style("top", () => {
      return `${80}px`;
    });
  } */

  .hover-info {
    min-width: 250px;
    width: max-content;
    z-index: 10001;
    position: absolute;
    /* background: aliceblue; */
    background: #faf8ef;

    border: 2px solid white;
    border-radius: 4px;
    overflow: visible;
    padding: 5px;
  }

  .footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #faf8ef;
    text-align: center;
    font-size: 0.8rem;
    padding: 5px 0;
  }

  .info-footer {
    display: none;
  }
}

@media (min-width: 1280px) {
  .high-low {
    background-color: #faf8ef;
    position: fixed;
    top: 160px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 0.4rem;
    font-size: 0.8rem;
  }

  .info {
    position: fixed;
    top: 15px;
    left: 10px;
    cursor: pointer;
  }

  .topTen {
    position: fixed;
    top: 80px;
    left: 10px;
    cursor: pointer;
  }

  .social-networks {
    position: fixed;
    top: 15px;
    right: 10px;
  }
}
