﻿/* ASP.NET's checkboxlist doesn't allow us to edit the input and label CSS classes. We'll do it here */

/* Prevent label from starting below the checkbox when wordwrapping */

.custom-cblist-rblist > span {
    display: flex;
    align-items: top; /* This will vertically align the checkbox and text */
}

.custom-cblist-rblist .form-check-input {
    flex-shrink: 0; /* Prevent the checkbox from shrinking */
}

.custom-cblist-rblist .form-check-label {
    margin-left: 0.5em; /* Add some space between the checkbox and the label text */
    margin-top: -0.02em;
}

.custom-cblist-rblist tr td {
    display: flex;
}

.custom-cblist-rblist tr td input[type="checkbox"] {
    vertical-align: top;
    margin-top: 0;
    margin-right: 0.3em;
}

.custom-cblist-rblist tr td input[type="radio"] {
    vertical-align: top;
    margin-top: 0;
    margin-right: 0.3em;
}

.custom-cblist-rblist tr td label {
    display: inline-block;
    margin-top: -0.22em;
    max-width: 95%; /* Prevent the label from extending full width which can push it below the checkbox */
    margin-bottom: 0.3em;
}

/* Etc. */
/****
.custom-cblist-rblist label {
    padding-left: 0.3em;
    padding-top: 0.1em;
}
/****/

/****/
.custom-cblist-rblist input {
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px solid rgba(0, 0, 0, 0.25);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
  print-color-adjust: exact;
}
.custom-cblist-rblist input[type=checkbox] {
  border-radius: 0.25em;
}
.custom-cblist-rblist input[type=radio] {
  border-radius: 50%;
}
.custom-cblist-rblist input:active {
  filter: brightness(90%);
}
.custom-cblist-rblist input:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.custom-cblist-rblist input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}
.custom-cblist-rblist input:checked[type=checkbox] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.custom-cblist-rblist input:checked[type=radio] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}
.custom-cblist-rblist input[type=checkbox]:indeterminate {
  background-color: #0d6efd;
  border-color: #0d6efd;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}
.custom-cblist-rblist input:disabled {
  pointer-events: none;
  filter: none;
  opacity: 0.5;
}
.custom-cblist-rblist input[disabled] ~ .form-check-label, input:disabled ~ .form-check-label {
  cursor: default;
  opacity: 0.5;
}
/****/