/**
 * Checkboxes for the contact's availabilities.
 *
 * Based on: https://codepen.io/BuddyLReno/pen/boGRPO
 * Via: https://freefrontend.com/css-checkboxes/
 */
.crm-availability-wrapper {
  display: block;
  margin: 10px 0;
  position: relative;
}
.crm-availability-wrapper label {
  padding: 12px 30px;
  width: 100%;
  display: block;
  text-align: left;
  color: #3C454C;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 200ms ease-in;
  overflow: hidden;
}
.crm-availability-wrapper label:after {
  width: 32px;
  height: 32px;
  content: '';
  border: 2px solid #D1D7DC;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.414 11L4 12.414l5.414 5.414L20.828 6.414 19.414 5l-10 10z' fill='%23fff' fill-rule='nonzero'/%3E%3C/svg%3E ");
  background-repeat: no-repeat;
  background-position: 2px 3px;
  border-radius: 40%;
  z-index: 2;
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: all 200ms ease-in;
}
.crm-availability-wrapper input:checked ~ label {
  color: #fff;
}
.crm-availability-wrapper input:checked ~ label:after {
  background-color: #09f;
  border-color: #09f;
}
.crm-availability-wrapper input {
  width: 32px;
  height: 32px;
  order: 1;
  z-index: 2;
  position: absolute;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  visibility: hidden;
}

/**
 * Table view
 */
.crm-table-availability {
  border: 1px solid #ccc;
}
.crm-table-availability tr:nth-child(odd) {
  background: #efefef;
}
.crm-table-availability td.selected {
  background: #09f !important;
  color: #fff !important;
  text-align: center;
  border: 2px solid #fff;
}
.crm-table-availability tr.crm-form-availability-weekdays:not(.crm-availability-data) td {
  text-align:center;
}

/**
 * Formatting for labels
 */
.crm-form-availability-period > td {
  vertical-align:middle!important;
}
.crm-availability-processed tr.crm-form-availability-weekdays > td:not(:first-child),
.crm-availability-processed tr.crm-form-availability-period > td {
  cursor:pointer;
}
.crm-availability-processed td.html-adjust {
  display:none;
}
