@import 'Buttons';
@import 'Fonts';
@import 'Layout';

$main-width: 960px;
$sidebar-header-padding: 24px;
$header-height: 60px;

.sidebarHeader {
  padding: $sidebar-header-padding;
  padding-top: $sidebar-header-padding * 2;
}

.sidebarH1 {
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 18px 0;
}

.overview {
  margin-bottom: $sidebar-header-padding;

  h1 {
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 24px;
    font-family: $roboto-slab;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: initial;
  }

  table {
    color: #2c2e3b;
    text-align: left;
    vertical-align: top;

    th, td {
      font-size: 12px;
      padding: 0 24px 4px 0;
      vertical-align: top;
      word-wrap: break-word;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    th {
      font-weight: normal;
      white-space: nowrap;
    }

    td {
      width: 99%;
      word-wrap: break-word;
      word-break: break-all;
    }
  }
}

.makeClaimButton {
  @extend %buttonA;
  border-radius: 0;
  font-size: 16px;
  padding: 18px 36px;
  text-transform: uppercase;
}

.work {
  height: 100%;
  max-height: 100%;
  background-color: #fff;
  display: flex;
  flex-direction: row;
  flex: 1;

  a {
    text-decoration: underline;
    color: #36b074;
  }

  .graph {
    background-color: #F5F5F5;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0;
    justify-content: space-between;

    header {
      height: 80px;
      display: flex;
      flex-direction: column;

      figcaption {
        align-self: center;
        background: white;
        border: 1px solid #D0D0D0;
        padding: 12px;
        margin-top: 24px;

        h1 {
          margin: 0;
          font-weight: bold;
          font-size: 12px;
        }

        >div {
          color: #434343;
          font-size: 10px;
        }
      }
    }
  }
}

.links {
  h1 {
    @extend .sidebarH1;
    margin-top: 0px;
  }

  >main {
    display: flex;

    >a {
      text-decoration: none;
      color: #333;
      display: flex;
      align-items: center;
      background: white;
      border: 1px solid black;
      border-radius: 6px;
      font-size: 15px;
      font-weight: 600;
      padding: 6px 8px;
      margin-right: 8px;

      >img {
        width: 27px;
        margin-right: 8px;
      }
    }
  }
}

.content {
  h1 {
    @extend .sidebarH1;
    margin-top: 4px;
  }

  >main {
    display: flex;
    background-color: white;
    padding: 10px;
    font-family: Inconsolata, monospace;
    font-size: 14px;
    word-break: break-all;
    overflow-y: scroll;
    border: 1px solid #dfdfdf;
    height: 400px;
    line-height: 25px;

    > iframe {
      flex: 1 1 auto;
      border: none;
    }
  }

  >img {
    background-color: white;
    padding: 10px;
    overflow: scroll;
    border: 1px solid #dfdfdf;
    height: 400px;
  }
}

.sidebar {
  width: 35%;
  overflow-y: scroll;
}

.invertScroll {
  max-height: 100vh;
  margin-top: -$header-height;
  padding-top: $header-height;
}

.badgePreview {
  margin-top: 36px;

  h1 {
    @extend .sidebarH1;
  }
}

.badgeUrl {
  $base-color: #dfdfdf;

  display: flex;
  flex-direction: column;
  background-color: white;
  border: 1px solid $base-color;
  border-radius: 5px;
  font-family: monospace;
  color: darken($base-color, 35%);
  margin-bottom: 24px;

  textarea {
    border: none;
    color: inherit;
    display: block;
    font-family: monospace;
    font-size: 14px;
    height: 150px;
    overflow: scroll;
    line-height: 20px;
    padding: 8px;
    resize: none;
  }

  button {
    display: block;
    height: 26px;
    border: none;
    border-top: 1px solid $base-color;
    background-color: lighten($base-color, 5%);
    color: inherit;
    cursor: pointer;
  }
}

.badge {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto;
  grid-column-gap: 8px;
  align-items: center;
  background-color: white;
  padding: 8px 10px;
  border: 1px solid #dfdfdf;
  border-radius: 4px;
  width: 190px;
  margin-bottom: 15px;

  >img {
    grid-row: 1 / 3;
    width: 39px;
    margin-right: 8px;
  }

  h1 {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
  }

  span {
    font-size: 10px;
  }
}

.noWork {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
}

.linkedClaims {
  h1 {
    @extend .sidebarH1;

    &:first-child {
      margin-top: 4px;
    }
  }

  ul {
    list-style: none;

    li {
      padding: 12px 0;

      + li {
        border-top: 1px solid #E7E7E7;
      }
    }

    >li >a {
      color: #36b074;
      font-weight: bold;
    }

    >li >time {
      display: block;
      font-size: 10px;
      color: #737373;
    }
  }
}

.metadata {
  h1 {
    @extend .sidebarH1;
  }

  pre {
    overflow: scroll;
    border: 1px solid #DEDEDE;
    padding: 12px;
    font-size: 10px;
  }
}

