.cell__title {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  font-size: var(--font-size-20);
  letter-spacing: 0.5px;
  color: $c-black;
  margin: 0 0 5px;
  padding: 5px 5px 5px 0;
  line-height: 0.9;
  position: relative;
  border-bottom: 2px solid $c-black;

  a,
  button {
    color: $c-black;
  }

  .item-controls {
    position: absolute;
    right: 0;
    bottom: 4px;
    width: 50px;
  }

  button {
    background: $c-white;
    border: 1px solid $c-black;
    line-height: 1;

    &:hover,
    &:focus {
      background-color: $c-black;
      color: $c-white;
    }
  }

  &.error,
  &.warning {
    background: #d68888;
    font-size: var(--font-size-16);
    font-family: $font-stack-base;
    font-weight: normal;
    justify-content: center;
    display: block;
    text-align: center;

    &::before {
      content: '\f057';
      display: inline-block;
      font-family: "Font Awesome 5 Free";
      margin-right: 5px;
      font-weight: 900;
    }

    &.small-text {
      font-size: var(--font-size-13);
    }
  }

  &.warning {
    background: #e6ad54;

    &::before {
      content: "\f071";
    }
  }
}

.cell--Track .cell__title:empty {
  display: none;
}

.cell {
  input.input--cell-title[type="text"] {
    text-align: left;
    font-family: $font-stack-secondary;
    font-weight: bold;
    font-size: var(--font-size-20);
    height: auto;
    border: 0;
    border-bottom: 2px solid;
    border-radius: 0;
    background: transparent;
    margin-top: 15px;
    padding-bottom: 6px;
  }
}

.resource {
  .cell__title {
    background: $c-navy;
    color: $c-white;

    a {
      color: $c-white;
    }
  }
}

.cell--image {
  background: rgba(0, 0, 0, 0.5);
  flex: 0 0 auto;

  img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    max-height: 160px;
  }
}

.cell__counter,
.cell__clock {
  align-items: center;
  justify-content: space-between;
}

.cell__clock {
  &:has(input[type=checkbox]) {
    margin: 0 5px;
  }

  input[type=checkbox] {
    margin: 3px 0;
  }
  input[type=radio] {
    margin: 0;
  }
}

.cell__counter {
  flex-wrap: nowrap;

  > span {
    flex: 0;
    font-size: 30px;
    font-weight: bold;
    padding: 0 14px;
  }
}

.cell__roll {
  display: flex;
  flex-direction: row;
  align-items: center;

  .attr-rollable {
    flex: 0 0 32px;
    cursor: pointer;
  }

  .input--roll {
    flex: 1;
  }
}

.cell__checkboxes,
.cell__radio {
  padding-left: 0;

  input[type="radio"] {
    margin: 1px 5px;
    flex: 0 0 18px;
  }

  label.flexrow {
    align-items: center;

    &:has(.attr-list) {
      flex-wrap: nowrap;
    }

    .input-title {
      text-align: left;
    }
  }
}

.cell__description--attr {
  font-size: var(--font-size-12);
}

.cell {
  input[type="text"] {
    text-align: center;
  }

  .showable:hover, .rollable:hover {
    cursor: pointer;
  }
}

.roll-dialog {
  .cell {
    margin: $padding-sm;

    + .cell {
      border-top: 2px solid $ct-gray;
    }
  }

  .cell--token {
    flex-wrap: nowrap;
    align-items: center;

    label {
      flex: 4;
      font-weight: bold;
    }

    .cell__wrapper {
      flex: 1;
    }

    .resource-control {
      position: absolute;
      top: 0;
      bottom: 0;
      width: 16px;
      height: 16px;
      padding: 0;
      line-height: 1;
      text-align: center;
      margin: auto;
      border: 1px solid #bcc8de;
    }

    .resource-decrease {
      left: 5px;
    }

    .resource-increase {
      right: 5px;
    }

    input {
      margin: 0;
      background-color: $ct-gray;
      display: block;
      text-align: center;
      width: 100%;
    }

  }

  .cell--roll-resources label,
  .cell--conditions label {
    align-items: center;
  }
}

.cell__track {
  display: grid;
  grid-auto-rows: 1fr;
  grid-auto-columns: 1fr;
  grid-auto-flow: row;
  align-items: center;
  justify-items: center;
  text-align: center;
  gap: 2px;

  > input[type=checkbox] {
    width: 14px;
    height: 14px;
    margin-right: unset;
  }

  .attr-track-value {
    width: 24px;
    height: 24px;
    line-height: 22px;
    border: 2px solid transparent;
    border-radius: 50%;

    &[aria-checked="true"] {
      border-color: #4878a8;
    }
  }

  .cell__track__element {
    grid-row: 1;
  }

  .cell__track__label {
    grid-row: 2;
    border-top: 3px solid #4878a8;
    color: #4878a8;
    justify-self: stretch;
  }
}