/* cookie based sorting posts custom styling */

.ar_cbs>.premium-badge {
    width: 100px;
    height: auto;
    margin-top: -50px;
    margin-bottom: -50px;
    margin-left: -40px;
    margin-right: 0;
    z-index: 30;
    position: relative;
}

.ar_cbs.post_single_loop {

    padding-left: 28px;
    padding-right: 28px;
}

.ar_cbs .post_thumbnail {

    width: 100%;
    max-width: 100%;
    height: auto;
    border: 5px solid white;
    border-radius: 8px;
    position: relative;
    filter: drop-shadow(0px 0px 14px rgba(0, 0, 0, 0.2));

}


.ar_cbs .post_title {

    color: var(--global-palette6);
    font-size: 18px;
    font-weight: 800;
    position: relative;
    text-align: center;
}

.ar_cbs a {
    text-decoration: none;
}

.ar_cbs a:hover {
    color: unset !important;
}

/* HTML: <div class="loader"></div> */
.sorting_loader {
    width: 60px;
    aspect-ratio: 2;
    --_g: no-repeat radial-gradient(circle closest-side, #f76a0c 90%, #0000);
    background:
        var(--_g) 0% 50%,
        var(--_g) 50% 50%,
        var(--_g) 100% 50%;
    background-size: calc(100%/3) 50%;
    animation: l3 1s infinite linear;

    margin-left: auto;
    margin-right: auto;
}

@keyframes l3 {
    20% {
        background-position: 0% 0%, 50% 50%, 100% 50%
    }

    40% {
        background-position: 0% 100%, 50% 0%, 100% 50%
    }

    60% {
        background-position: 0% 50%, 50% 100%, 100% 0%
    }

    80% {
        background-position: 0% 50%, 50% 50%, 100% 100%
    }
}

/* For woocommerce left sliding bar on mobiles */

/* Toggle Btn on archive pages */


/* Container for the toggle */

/* Container for the toggle buttons */

div#sorting_masterwrap {
    display: grid;
    max-width: var(--global-content-width);
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: 0.6fr 0.4fr;
    z-index: 30;
    position: relative;


}


#sorting-toggle-btns {
    display: flex;
    flex-wrap: wrap;
    /* Allows items to wrap on smaller screens */
    align-items: center;
    justify-content: end;
    /* Centers content on smaller screens */
    gap: 10px;
    /* Adjusts spacing between elements */
    font-size: 16px;
    font-family: inherit;
    font-weight: bold;
    padding: 10px;
    margin: 0 auto;
    /* Ensures proper centering */
    max-width: 100%;
}

#orderbypublished-toggle-btn {
    display: flex;
    flex-wrap: wrap;
    /* Allows items to wrap on smaller screens */
    align-items: center;
    justify-content: end;
    /* Centers content on smaller screens */
    gap: 10px;
    /* Adjusts spacing between elements */
    font-size: 16px;
    font-family: inherit;
    font-weight: bold;
    padding: 10px;
    margin: 0 auto;
    /* Ensures proper centering */
    max-width: 100%;
}

/* Labels for the toggle */
.toggle-label {
    white-space: nowrap;
    /* Prevents text from breaking onto new lines */
    font-size: 16px;
}

/* Toggle switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    min-width: 50px;
    /* Prevents shrinkage */
}

/* Hide the default checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The track */
.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 24px;
    width: 100%;
    height: 100%;
    transition: background-color 0.3s;
}

/* The circular slider */
.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

/* Toggled state */
.toggle-switch input:checked+.slider {
    background-color: #4caf50;
}

.toggle-switch input:checked+.slider::before {
    transform: translateX(26px);
}