/* Custom form control fixes */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    margin-top: -4px;
    line-height: 1.5;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: #adb5bd solid 1px;
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.custom-checkbox .custom-control-label::before {
    border-radius: 0.25rem;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.custom-radio .custom-control-label::before {
    border-radius: 50%;
}

.custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.custom-switch {
    padding-left: 2.25rem;
}

.custom-switch .custom-control-label::before {
    left: -2.25rem;
    width: 1.75rem;
    pointer-events: all;
    border-radius: 0.5rem;
}

.custom-switch .custom-control-label::after {
    top: calc(0.25rem + 2px);
    left: calc(-2.25rem + 2px);
    width: calc(1rem - 4px);
    height: calc(1rem - 4px);
    background-color: #adb5bd;
    border-radius: 0.5rem;
    transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    background-color: #fff;
    transform: translateX(0.75rem);
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: #007bff;
    background-color: #007bff;
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.custom-control-input:focus:not(:checked) ~ .custom-control-label::before {
    border-color: #80bdff;
}

.custom-control-input:not(:disabled):active ~ .custom-control-label::before {
    color: #fff;
    background-color: #b3d7ff;
    border-color: #b3d7ff;
}

.custom-control-input:disabled ~ .custom-control-label {
    color: #6c757d;
}

.custom-control-input:disabled ~ .custom-control-label::before {
    background-color: #e9ecef;
}

/* Fixed mobile enroll bar — course single (below Bootstrap lg) */
@media (max-width: 991.98px) {
    #course-single-page {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    }

    .course-mobile-enroll-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10050;
        background-color: #ffffff;
        border-top: 2px solid rgb(237, 239, 247);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        padding-top: 12px;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .course-mobile-enroll-bar-inner {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .course-mobile-enroll-price {
        flex: 1 1 auto;
        min-width: 0;
        text-align: left;
    }

    .course-mobile-enroll-label {
        display: block;
        font-size: 13px;
        font-family: "Open Sans", sans-serif;
        color: rgb(79, 79, 79);
        line-height: 1.3;
    }

    .course-mobile-enroll-amount {
        display: block;
        font-size: 22px;
        font-family: "Nunito", sans-serif;
        font-weight: bold;
        color: #0a0a0a;
        line-height: 1.2;
    }

    .course-mobile-enroll-bar .course-mobile-enroll-btn.cart_btnss {
        flex: 0 0 auto;
        margin-top: 0;
        margin-bottom: 0;
        max-width: none;
        min-width: 9rem;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        white-space: nowrap;
    }
} 