.hidden:not(.almostvisible) {
  display: none;
}
.hidden.almostvisible {
  opacity: 0.01; /* Used to be able to calc size/pos in javascript, which won't work if fully hidden */
}

.scrolling-container {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
  position: absolute;
  width: 100%;
  min-height: 100%;
}

body {
  counter-reset: itemcounter;
}

td.checklist-item-number {
  width: 50px;
  text-align: center;
}

td.checklist-item-number::before {
  content: counter(itemcounter);
  counter-increment: itemcounter;
}

td.checklist-item-min-height-setter > div {
  min-height: 50px;
  width: 0px;
}

td.checklist-item-checkbox {
  width: 40px;
  background: #f5f5f5;
  padding-left: 8px;
  box-sizing: border-box;
}

.bwcard.nested td.checklist-item-checkbox {
  vertical-align: top;
}

td.checklist-item-label {
  background: #f5f5f5;
}

.bwcard.nested tr:first-child td.checklist-item-label {
  padding-left: 8px;
}

.bwcard.nested tr:first-child {
  counter-reset: subitemcounter;
}

tr.checklist-subitem td.checklist-item-number::before {
  content: counter(subitemcounter, lower-alpha);
  counter-increment: subitemcounter;
}

tr.checklist-subitem td.checklist-item-min-height-setter > div {
  min-height: 30px;
}

.bwcard {
  overflow: hidden;
  color: black;
  margin: 10px;
  position: relative;
  background: #f5f5f5;
}

/* Avoid overflow:hidden bug when animating the speaker button in some browsers */
html:not([class*="preview"]) .bwcard {
  will-change: transform; /* Fixes recent Chrome and Firefox versions */
  -webkit-backface-visibility: hidden; /* Fixes older Chrome versions and Safari */
  -moz-backface-visibility: hidden; /* Fixes older Firefox versions */
  -webkit-transform: translate3d(
    0,
    0,
    0
  ); /* Fixes older Chrome versions and Safari */
  -moz-transform: translate3d(0, 0, 0); /* Fixes older Firefox versions */
}

.bwcard.completed,
.bwcard:not(.completed) tr.checklist-subitem.completed {
  opacity: 0.3;
}

.bwcard table {
  min-width: 50%;
  max-width: 700px;
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  border-width: 0;
  border: 0;
}

.bwcard-placeholder {
  height: 130px;
  margin: 20px;
  background: black;
  opacity: 0.2;
  border-color: black !important;
}

.bwcard-draghandle {
  position: absolute;
  font-size: 32px;
  width: 32px;
  height: 32px;
  display: inline-block;
  bottom: -10px;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  color: rgba(0, 0, 0, 0.15);
  cursor: move;
  padding: 5px; /* Make touch surface area large enough */
}

.empty-message {
  text-align: center;
  opacity: 0.4;
}

.no-scrollbars {
  overflow: hidden;
}

.swipewrapper {
  position: relative;
}
