/* Modernise WHMCS Bootstrap Switch controls */

.bootstrap-switch {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: 62px !important;
    min-width: 62px !important;
    height: 30px !important;
    margin-right: 8px;
    border: 1px solid #d7dee7 !important;
    border-radius: 999px !important;
    background: #f3f6fa !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

.bootstrap-switch .bootstrap-switch-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    margin-left: 0 !important;
    transition: none !important;
}

.bootstrap-switch .bootstrap-switch-handle-on,
.bootstrap-switch .bootstrap-switch-handle-off {
    position: absolute !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    line-height: 28px !important;
    padding: 5px 12px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .03em !important;
    text-transform: uppercase !important;
    box-sizing: border-box !important;
    pointer-events: none !important;
}

.bootstrap-switch .bootstrap-switch-handle-on {
    left: 0 !important;
    text-align: left !important;
    color: #ffffff !important;
    opacity: 0 !important;
}

.bootstrap-switch .bootstrap-switch-handle-off {
    left: 0 !important;
    text-align: right !important;
    color: #607086 !important;
    opacity: 1 !important;
}

.bootstrap-switch .bootstrap-switch-label {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18) !important;
    box-sizing: border-box !important;
    z-index: 2 !important;
    transition: left .18s ease !important;
}

.bootstrap-switch .bootstrap-switch-label::before,
.bootstrap-switch .bootstrap-switch-label::after {
    display: none !important;
    content: none !important;
}

.bootstrap-switch.bootstrap-switch-on {
    background: #22c55e !important;
    border-color: #16a34a !important;
}

.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-on {
    opacity: 1 !important;
}

.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-handle-off {
    opacity: 0 !important;
}

.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label {
    left: 37px !important;
}

.bootstrap-switch.bootstrap-switch-off {
    background: #f3f6fa !important;
    border-color: #d7dee7 !important;
}

.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-on {
    opacity: 0 !important;
}

.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-handle-off {
    opacity: 1 !important;
}

.bootstrap-switch.bootstrap-switch-focused {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16) !important;
}

.bootstrap-switch.bootstrap-switch-disabled,
.bootstrap-switch.bootstrap-switch-readonly {
    opacity: .6 !important;
    cursor: not-allowed !important;
}

.bootstrap-switch input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-group .bootstrap-switch,
.panel-body .bootstrap-switch,
.card-body .bootstrap-switch {
    margin-top: 2px;
}
