<div class="custom-checkbox-container"> <input class="custom-checkbox-input" id="modernCheckbox" type="checkbox" /> <label class="custom-checkbox-label" for="modernCheckbox"> <span class="custom-checkbox-text">Accept Terms</span> </label> </div>
.custom-checkbox-container { position: relative; display: inline-flex; align-items: center; cursor: pointer; user-select: none; padding: 8px; } .custom-checkbox-input { position: absolute; opacity: 0;