﻿/* Container for the toggle switch in the journal entry footer */
.entry-footer {
    display: flex;
    justify-content: flex-end; /* Aligns toggle to the right */
    align-items: center;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
    gap: 10px;
}

.toggle-switch-label {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

/* The toggle switch container */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px; /* Width of the switch */
    height: 28px; /* Height of the switch */
}

    /* Hide the default HTML checkbox */
    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

/* The slider (the track) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444; /* Off state background */
    -webkit-transition: .4s;
    transition: .4s;
}

    /* The circle handle */
    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }

/* Checked state (ON) */
input:checked + .slider {
    background-color: var(--accent-color); /* Green background for ON */
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--accent-color);
}

/* Checked state (handle moved) */
input:checked + .slider:before {
    -webkit-transform: translateX(22px);
    -ms-transform: translateX(22px);
    transform: translateX(22px);
}

/* Rounded corners for the switch */
.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }
