@import "base";

#pending {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 360px;
  border: 2px solid $color1;
  background: white;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
  box-shadow:0px 0px 5px #333;
  padding: 5px;

  .buttons {
    text-align: center;
  }
  h {
    font-weight: bold;
  }
  ul {
    max-height: 100px;
    overflow: auto;
    padding-left: 1em;
    margin-bottom: 0.5em;
    list-style-type: square;
    li {
      font-style: italic;
      &.red {
        color: red;
      }
      &.yellow {
        color: #DAA520;
      }
    }
  }
}

#device-params {
  .search {
    width: 600px;
  }

  ul.list {
    height: 200px;
    min-height: 200px;
    resize: vertical;
    overflow-y: scroll;

    li {
      border-bottom: 1px dotted $color1;

      .param-path {
        color: rgb(70,60,0);
      }
      .value-writable {
        font-weight: bold;
      }
      .actions {
        float: right;
        a {
          visibility: hidden;
          margin-left: 5px;
          margin-right: 5px;
        }
      }
      &:hover {
        background-color: $color3;
        a {
          visibility: visible;
        }
      }
    }
  }
}

.status-green {
  &:before {
    color: #0c0;
    padding-right: 0.1em;
    content: "\25CF";
  }
}

.status-yellow {
  &:before {
    color: #cc0;
    padding-right: 0.1em;
    content: "\25CF";
  }
}

.status-red {
  &:before {
    color: #c00;
    padding-right: 0.1em;
    content: "\25CF";
  }
}

.param-value {
  white-space: nowrap;
  max-width: 80ex;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: bottom;
}

.param-value:empty:before {
  content: "blank";
  color: #aaa;
}

.tag {
  background-color: $color3;
  border: 1px $color1 solid;
  margin-left: 0.2em;
  margin-right: 0.2em;
  padding: 0.1em 0.2em;
  border-radius: 0.4em;

  a.delete {
    visibility: hidden;
    margin-left: 0.2em;
  }
  &:hover a.delete {
    visibility: visible;
  }
}

.tags {
  margin-bottom: 10px;
  strong {
    color: $color4;
  }
}

#map {
  float: right;
  width: 600px;
  height: 400px;
}

.modal-wrapper {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 100;

  .modal {
    background-color: white;
    border: 2px solid $color1;
    border-radius: 6px;
    padding: 10px;
    box-shadow: rgba(black, 0.2) 0 0 10px;

    position: absolute;
    left: 50%;
    top: 50%;
    width: 400px;
    margin-top: -75px;
    margin-left: -200px;
    word-wrap: break-word;

    p {
      margin-bottom: 0.5em;
    }

    .buttons {
      margin-top: 10px;
      text-align: center;
    }
  }

  .long-value-modal {
    margin: 0;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);

    textarea {
      font-family: monospace;
      margin: 0;
      min-width: 200px;
      max-width: 800px;
      height: 150px;
      min-height: 100px;
      max-height: 400px;
      border: 1px solid $color1;
      border-radius: 4px;
    }
  }
}
