.btw-toggle {
    display: flex;
    align-items: center;
}

div.btw-toggle p {
    color: #67bed9;
    margin: 0;
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    min-width: 45px;
    width: 45px;
    height: 22px;
    margin: 0 5px 0;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    border: 2px solid #24347a;
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 24px;
    left: 0;
    top: 0;
    background-color: #EB600A;
    transition: transform 0.3s ease;
}

.switch input:checked+.slider {
    background-color: #fff;
}

.switch input:checked+.slider:before {
    transform: translateX(19px);
}

/* Rounded sliders */
.switch .slider.round {
    border-radius: 11px;
}

.switch .slider.round:before {
    border-radius: 11px;
}

/* Loading spinner styles */
.loading-spinner {
    border: 2px solid #f3f3f3;
    /* Light grey */
    border-top: 2px solid #eb600a;
    /* Orange */
    border-radius: 50%;
    width: 22px;
    height: 22px;
    animation: spin 2s linear infinite;
    display: none;
    margin: 0 5px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hide the slider after the animation */
.btw-toggle.hide-slider .switch.toggle-container {
    opacity: 0;
    visibility: hidden;
    display: none;
}

.btw-toggle.hide-slider .loading-spinner {
    display: inline-block;
    opacity: 1;
    visibility: visible;
    transition: none;
}

/* Animation to hide slider and show spinner */
@keyframes hideSliderAndShowSpinner {
    0% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Trigger the animation on .btw-toggle */
.btw-toggle.animate-slider .slider {
    animation: hideSliderAndShowSpinner 0s forwards 300ms;
}

.btw-toggle.hide-slider .loading-spinner {
    display: inline-block;
    opacity: 1;
    visibility: visible;
}

/* Added by Sergio Winter 03/25 - Mobile-specific changes */
@media (max-width: 768px) {
    .btw-toggle.mobile-only {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .btw-toggle.mobile-only p {
        color: #67bed9;
        margin: 0;
    }

    .btw-toggle.mobile-only .switch {
        width: 67.5px;
        height: 33px;
    }

    .btw-toggle.mobile-only .switch .slider:before {
        height: 29px;
        width: 36px;
        left: 0;
        top: 0;
    }

    .btw-toggle.mobile-only .switch input:checked+.slider:before {
        transform: translateX(28.5px);
    }

    .btw-toggle.mobile-only .switch .slider.round {
        border-radius: 16.5px;
    }

    .btw-toggle.mobile-only .switch .slider.round:before {
        border-radius: 16.5px;
    }

    .btw-toggle.mobile-only .loading-spinner {
        width: 33px;
        height: 33px;
        margin: 0 5px;
    }
}
/* Added by Sergio Winter 03/25 - Tablet-specific changes */
@media (max-width: 1024px) {
    .btw-toggle.tablet-only {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .btw-toggle.tablet-only p {
        color: #67bed9;
        margin: 0;
    }
}



