.FreestyleUsage {
  --radius: 4px;
  --border-color: #eee;

  padding: 0 1rem 1rem;
  margin-bottom: 1rem;
  max-width: 1200px;

  &:last-child {
    border-bottom: 1px solid #ccc;
  }

  &-name {
    color: #333;
    margin-top: 1.5rem;
  }
  &-description {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #666;
  }

  &-api + &-cssVars {
    margin-top: 1rem;
  }

  &-apiTitle,
  &-cssVarsTitle {
    font-size: 0.9rem;
    font-weight: bold;
    margin: 0;
  }

  &-standaloneFocusCta {
    float: right;
    margin-right: 1rem;
  }

  &-preview {
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    position: relative;

    &:after {
      content: 'Preview';
      font-size: 0.7rem;
      position: absolute;
      right: 0;
      top: 0;
      background: #eee;
      color: #777;
      padding: 2px 8px;
      display: block;
      border-radius: 0 0 0 var(--radius);
    }
  }

  &-sourceContainer,
  &-apiTable,
  &-cssVarsTable {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  &-apiTable,
  &-cssVarsTable {
    width: 100%;
    padding: 0.5rem 0 0.2rem;
    border-collapse: collapse;

    th {
      text-align: left;
      font-size: 0.8rem;
      font-weight: 600;
      color: #777;
    }
    tr {
      border-bottom: 1px solid var(--border-color);
      vertical-align: top;
    }
    tr:nth-child(even) {
      background-color: #f9f9f9;
    }
    th,
    td {
      padding: 0.5rem 1rem;
    }
  }

  &-sourceContainer {
    margin-top: 1rem;
  }
}

/*
  FreestyleUsageArgument
*/
.FreestyleUsageArgument,
.FreestyleUsageCssVar {
  font-size: 0.8rem;

  &-name {
    font-weight: bold;
    width: 20%;
  }
  &-description {
    width: 40%;
  }

  &-required {
    color: #d81c38;
    font-style: oblique;
  }
  &-default {
    font-family: monospace;
  }

  &-jsonViewer {
    background-color: #222;
    min-width: 300px;
    padding: 1rem;
  }
}

.FreestyleUsageBoolean {
  position: relative;
  display: flex;

  &:after {
    content: 'False';
    display: block;
    position: absolute;
    top: 2px;
    left: 27px;
    font-family: monospace;
    color: #999;
  }
  &.is-checked:after {
    content: 'True';
    color: #333;
    font-weight: 700;
  }
}

.FreestyleUsageArray {
  &-item {
    margin: 0 0 0.5em 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }
  &-removeItem,
  &-addItem {
    background: transparent;
    border: 0;
    outline: 0;
    cursor: pointer;
    padding: 2px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8em;
    border-radius: 4px;
  }

  &-removeItem {
    color: #999;
    opacity: 0.5;
  }

  &-addItem {
    font-weight: 700;
    padding: 3px 8px;
    color: #666;
    background: #ddd;
  }

  &-item:hover &-removeItem {
    opacity: 1;
  }
}

.u-codePill {
  background-color: #eee;
  border-radius: 2px;
  color: #777;
  display: inline-block;
  font-family: monospace;
  margin-right: 0.2em;
  padding: 1px 7px;
}
