/* Dedicated Checkbox Fix CSS - Ensures proper checkbox display */

/* Universal checkbox styling override */
input[type="checkbox"],
.form-check-input,
.custom-checkbox input,
.filter-checkbox {
  /* Remove all default appearances */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  
  /* Basic styling */
  width: 1rem;
  height: 1rem;
  background-color: #fff;
  border: 2px solid #6c757d;
  border-radius: 0.25rem;
  position: relative;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Checked state with visible tick mark */
input[type="checkbox"]:checked,
.form-check-input:checked,
.custom-checkbox input:checked,
.filter-checkbox:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
  
  /* White tick mark SVG */
  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");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Focus states */
input[type="checkbox"]:focus,
.form-check-input:focus,
.custom-checkbox input:focus,
.filter-checkbox:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Hover states */
input[type="checkbox"]:hover,
.form-check-input:hover,
.custom-checkbox input:hover,
.filter-checkbox:hover {
  border-color: #0d6efd;
}

/* Dark theme support */
[data-theme="dark"] input[type="checkbox"],
[data-theme="dark"] .form-check-input,
[data-theme="dark"] .custom-checkbox input,
[data-theme="dark"] .filter-checkbox,
body.dark-theme input[type="checkbox"],
body.dark-theme .form-check-input,
body.dark-theme .custom-checkbox input,
body.dark-theme .filter-checkbox {
  background-color: #2d3748;
  border-color: #4a5568;
}

[data-theme="dark"] input[type="checkbox"]:checked,
[data-theme="dark"] .form-check-input:checked,
[data-theme="dark"] .custom-checkbox input:checked,
[data-theme="dark"] .filter-checkbox:checked,
body.dark-theme input[type="checkbox"]:checked,
body.dark-theme .form-check-input:checked,
body.dark-theme .custom-checkbox input:checked,
body.dark-theme .filter-checkbox:checked {
  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 10 3 3 6-6'/%3e%3c/svg%3e");
}

/* Special handling for login page */
#account .form-check-input,
.login-container .form-check-input {
  margin-top: 0.125rem;
  margin-right: 0.5rem;
}

/* Ensure labels don't interfere */
.form-check-label {
  cursor: pointer;
  margin-left: 0.25rem;
}
