* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.popup-menu {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-flex-wrap: nowrap;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -webkit-box-pack: center;
  -moz-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-align-content: stretch;
  -ms-flex-line-pack: stretch;
  align-content: stretch;
  -webkit-box-align: start;
  -moz-box-align: start;
  -webkit-align-items: flex-start;
  -ms-flex-align: start;
  align-items: flex-start;

  position: absolute;
  border: 2px solid #888888;
  border-radius: 10px;
  padding: 0;
  background-size: auto;
  min-width: 300px;
  min-height: 30px;
  box-sizing: border-box;
  max-width: 350px;
}

.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 */
}

.popupheader {
  /* flexbox item properties */
  -webkit-box-ordinal-group: 1;
  -moz-box-ordinal-group: 1;
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  -webkit-align-self: center;
  -ms-flex-item-align: center;
  align-self: center;

  /* flexbox container properties */
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-direction: normal;
  -moz-box-direction: normal;
  -webkit-box-orient: horizontal;
  -moz-box-orient: horizontal;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  -ms-flex-wrap: nowrap;
  flex-wrap: nowrap;
  -webkit-box-pack: justify;
  -moz-box-pack: justify;
  -webkit-justify-content: space-around;
  -ms-flex-pack: distribute;
  justify-content: space-around;
  -webkit-align-content: flex-start;
  -ms-flex-line-pack: start;
  align-content: flex-start;
  -webkit-box-align: stretch;
  -moz-box-align: stretch;
  -webkit-align-items: stretch;
  -ms-flex-align: stretch;
  align-items: stretch;

  margin: 0px;
  padding: 5px;
  border-bottom: 1px solid #ddd;
  width: 100%;
  box-sizing: border-box;
}

.popupheader-title {
  line-height: 30px;
  font-weight: bold;
  text-align: center;
  -webkit-box-ordinal-group: 1;
  -moz-box-ordinal-group: 1;
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  -webkit-flex: 1 1 auto;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  -webkit-align-self: flex-start;
  -ms-flex-item-align: start;
  align-self: flex-start;
}

.popupheader-leftbtn {
  -webkit-box-ordinal-group: 1;
  -moz-box-ordinal-group: 1;
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  -webkit-align-self: flex-start;
  -ms-flex-item-align: start;
  align-self: flex-start;
}

.popupheader-leftbtn .bw-icon {
  font-size: 30px;
  line-height: 30px;
}

.popupheader-rightbtn {
  -webkit-box-ordinal-group: 1;
  -moz-box-ordinal-group: 1;
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  -webkit-align-self: flex-start;
  -ms-flex-item-align: start;
  align-self: flex-start;
}

.popupheader-rightbtn .bw-icon {
  font-size: 30px;
  line-height: 30px;
}

.popupcontent {
  -webkit-box-ordinal-group: 1;
  -moz-box-ordinal-group: 1;
  -webkit-order: 0;
  -ms-flex-order: 0;
  order: 0;
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  -webkit-flex: 0 1 auto;
  -ms-flex: 0 1 auto;
  flex: 0 1 auto;
  -webkit-align-self: center;
  -ms-flex-item-align: center;
  align-self: center;

  padding: 0px;
  margin: 0px;

  max-height: 350px;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.triangle {
  width: 23px;
  height: 12px;
  position: absolute;
  overflow: hidden;
  border: none;
}

.triangle:after {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  transform: rotate(45deg);
  -webkit-transform: rotate(45deg);
  )box-shadow: -1px -1px 10px -2px rgba(0, 0, 0, 0.5);
  border: 1px solid #888888;
}

.lefttriangle:after {
  top: 3px;
  left: 3px;
}
.righttriangle:after {
  top: 3px;
  left: 3px;
}
.toptriangle:after {
  top: 3px;
  left: 3px;
}
.bottomtriangle:after {
  top: 3px;
  left: 3px;
}

.menuitem {
  cursor: pointer;
  margin-left: 5px;
  margin-right: 5px;
  margin-top: 4px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  overflow: hidden;
  height: 60px;
}

[role="button"] {
  cursor: pointer;
}

.menuitem:last-child {
  margin-bottom: 4px;
}

.menuitem table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

td.menuitem-label {
  background: white;
}

.menuitem-icon {
  padding: 0;
  background: white;
  width: 60px;
  height: 60px;
  padding-right: 10px;
  vertical-align: top;
}

.menuitem-icon img {
  max-width: 60px;
  display: block;
}

.menuitem-colorbar {
  width: 6px;
}

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

td.planner-item-icon {
  width: 150px;
  background: #f5f5f5;
  position: relative;
  vertical-align: top;
}

td.planner-item-icon .link-icon {
  right: 34px !important;
}

#cardlist {
  max-width: 100%;
}

.planner-item-image {
  width: 130px;
  height: 130px;
  background-size: cover;
  background-position: center;
  position: relative;
  left: -1px;
  top: -1px;
}

td.planner-item-checkbox {
  width: 40px;
  background: #f5f5f5;
}

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

.planner-item-label-wrapper {
  max-height: 130px;
  overflow: auto;
}

td.planner-item-colorbar {
  width: 15px;
  border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.bwcard {
  height: 130px;
  overflow: hidden;
  color: black;
  margin: 20px;
  position: relative;
}

/* 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 {
  opacity: 0.3;
}

.bwcard table {
  width: 480px;
  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;
}

.image-preview {
  display: inline-block;
  width: 100px;
  height: 100px;
  background: #eee;
  border: 1px dashed #999;
  margin: 10px;
  text-align: center;
  line-height: 100px;
  font-size: 50px;
  color: #999;
  position: relative;
}

.image-preview img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  display: none;
}

.image-preview.hasimage img {
  display: initial;
}

.image-preview.hasimage {
  border-style: solid;
}
.image-preview.hasimage.bw-icon-camera:before {
  content: "";
}

input.item-label {
  vertical-align: top;
  margin-top: 10px;
  padding: 4px;
  margin-right: 10px;
}

.no-scrollbars {
  overflow: hidden;
}

.bwcard .swipebutton {
  position: absolute;
  top: 46px;
  right: -48px;
  font-size: 32px;
  width: 32px;
  height: 32px;
  display: inline-block;
  padding: 8px;
  color: white;
}

html[class*="ibw-platform-osx"]
  .bwcard:hover
  .swipewrapper:not(.delete-opened)
  .swipebutton,
html[class*="ibw-platform-chromebook"]
  .bwcard:hover
  .swipewrapper:not(.delete-opened)
  .swipebutton,
html[class*="ibw-platform-win"]
  .bwcard:hover
  .swipewrapper:not(.delete-opened)
  .swipebutton {
  right: 14px;
  top: 90px;
  color: #555;
  cursor: pointer;
}

html[class*="ibw-platform-osx"] .menuitem:hover .swipebutton,
html[class*="ibw-platform-chromebook"] .menuitem:hover .swipebutton,
html[class*="ibw-platform-win"] .menuitem:hover .swipebutton {
  right: 0px;
  color: #555;
  cursor: pointer;
}
html[class*="ibw-platform-osx"] .menuitem .swipebutton[disabled="disabled"],
html[class*="ibw-platform-chromebook"]
  .menuitem
  .swipebutton[disabled="disabled"],
html[class*="ibw-platform-win"] .menuitem .swipebutton[disabled="disabled"] {
  display: none;
}

.swipewrapper {
  position: relative;
  left: 0;
}

.swipewrapper.snapping {
  -webkit-transition: left 200ms ease-out;
  -moz-transition: left 200ms ease-out;
  -o-transition: left 200ms ease-out;
  transition: left 200ms ease-out;
}

.collapsing {
  -webkit-transition: all 200ms ease-out;
  -moz-transition: all 200ms ease-out;
  -o-transition: all 200ms ease-out;
  transition: all 200ms ease-out;
  height: 0;
  opacity: 0;
}

.menuitem .swipebutton {
  position: absolute;
  top: 6px;
  right: -44px;
  font-size: 32px;
  width: 32px;
  height: 32px;
  display: inline-block;
  padding: 8px;
  color: white;
}

.bwcard-music-indicator {
  position: absolute;
  top: 5px;
  right: 27px;
  font-size: 22px;
  width: 22px;
  height: 22px;
  display: inline-block;
  cursor: pointer;
}

@keyframes pound {
  to {
    transform: scale(1.1);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(180deg);
  }
}

.bwcard-music-indicator:after {
  content: "";
  transition: all 0.5s;
  display: inline-block;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  position: absolute;
  left: -4px;
  top: -3px;
  opacity: 1;
  transform: scale(1);
}
.bwcard-music-indicator.pound {
  animation: pound 0.25s infinite alternate;
  animation-delay: 0.1s;
}
.bwcard-music-indicator.pound:after {
  transform: scale(0.1);
  opacity: 0;
}
.bwcard-music-indicator.collapse:after {
  transform: scale(0.1);
  opacity: 0;
}
.bwcard-music-indicator.rotate {
  color: #999;
  transform: scale(0.9);
}
.bwcard-music-indicator.rotate:after {
  border-bottom-color: transparent;
  border-top-color: transparent;
  animation: rotate 0.5s infinite;
  animation-timing-function: linear;
  animation-delay: 0.5s;
}
.bwcard-music-indicator.disable {
  pointer-events: none;
  color: rgba(255, 0, 0, 0.5);
}

/* spectrum customization */
.sp-palette {
  max-width: 144px;
}
.sp-palette .sp-thumb-el {
  width: 32px;
  height: 32px;
}

@media only screen and (max-width: 500px) {
  html .bwcard {
    margin: 10px;
  }

  html .bwcard table {
    width: 100%;
  }
}

@media print {
  body.bw-use-border-when-wide,
  .bw #container,
  #bottom-container,
  .scrolling-container {
    overflow: visible;
    display: block;
    height: initial;
    position: relative;
  }
}
