button {
  padding: 30px 50px;
}
.red-bg {
  background-color: red !important;
  color: white !important;
}

.green-bg {
  background-color: green !important;
  color: white !important;
}

h1 {
  font-size: 1.8rem;
  color: white;
}

.topnav {
  overflow: hidden;
  background-color: #0a1128;
}

body {
  margin: 0;
}
p {
  text-align: center;
}
.content {
  padding: 50px;
}

.card-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background-color: white;
  box-shadow: 2px 2px 12px 1px rgba(140, 140, 140, 0.5);
}

.card-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #034078;
}

.reading {
  font-size: 1.2rem;
  color: #1282a2;
}

.button {
  padding: 15px 50px;
  font-size: 24px;
  text-align: center;
  outline: none;
  color: #fff;
  background-color: #0f8b8d;
  border: none;
  border-radius: 5px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/*.button:hover {background-color: #0f8b8d}*/
.button:active {
  background-color: #0f8b8d;
  box-shadow: 2px 2px #cdcdcd;
  transform: translateY(2px);
}

.state {
  font-size: 1.5rem;
  color: #8c8c8c;
  font-weight: bold;
  text-align: center;
}

.content {
  padding: 30px;
  max-width: 600px;
  margin: 0 auto;
}

.map-image {
  img {
    height: 100%;
    width: 100%;
  }
  .card-state {
    width: 100%;
    height: 100%;
    position: relative;
  }
  .state {
    position: absolute;
    color: red;
    &.t1 {
      top: 5%;
      left: 10%;
    }
    &.t2 {
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
    &.t3 {
      top: 5%;
      left: 50%;
      transform: translate(-50%);
    }
    &.t4 {
      top: 47%;
      right: 12%;
    }
    &.t5 {
      top: 88%;
      left: 50%;
      transform: translate(-50%);
    }
    &.t6 {
      top: 47%;
      left: 5%;
      width: 100px;
      .alarm-text-off {
        width: 100px !important;
      }
    }
  }

  .sensor-on {
    width: 30px;
    height: 30px;
    position: absolute;
    background: linear-gradient(#ff0000, #c70039);
    display: flex !important;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    img {
      z-index: 9;
    }
    &:before,
    &:after {
      position: absolute;
      content: "";
      width: 100%;
      height: 100%;
      background: #ff0000;
      border-radius: 50%;
      z-index: 1;
    }

    &:before {
      animation: sensor-on 2s ease-out infinite;
    }

    &:after {
      animation: sensor-on 2s 1s ease-out infinite;
    }
  }
  .sensor-off {
    display: inline-block;
  }
  @keyframes sensor-on {
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }
}
.alarm-text {
  font-size: 10px;
  padding: 2px 4px;
  width: 100px;
  margin-top: 10px;
  margin-left: -22px;
  border-radius: 2px;
  &-off {
    background: #bfe9f4;
    color: #004aad;
  }
  &-on {
    background: #f11e1e;
    color: #fff;
  }
}
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tooltiptext {
  text-align: start;
  font-size: 10px;
  visibility: hidden;
  width: 300px;
  padding: 10px;
  background-color: #eee;
  color: black;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: -50%;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  cursor: pointer;
}
a {
  color: blue;
}
