@import url('../main.css');

@font-face {
    font-family: 'Open Sans';
    src: url('../../fonts/OpenSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../../fonts/OpenSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

.settings-btn{
    display: flex;
    padding-inline: 0px;
    padding-block: 0px;
    position: relative;
    width: clamp(1px,6.5vw,100px);
    height: clamp(1px,1.625vw,25px);
}

.settings-btn__track {
    position: absolute;
    inset: 0;
    border-radius: var(--fs-border-radius);
    overflow: hidden;
    z-index: 0;
    background-color: #1D162E;
}

.settings-btn__track::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    left: 50%;
    transform: translateX(-100%);
    z-index: 0;
    border-radius: var(--fs-border-radius);
    overflow: hidden;
    transition: 0.3s ease;
    background-color: #999999;
}

.settings-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
    transition: 0.3s ease;
}

.settings-btn input:not(:checked) + .settings-btn__track {
    box-shadow: inset 0 0 0 var(--fs-border2px) #999999;
}

.settings-btn input:checked + .settings-btn__track {
    box-shadow: inset 0 0 0 var(--fs-border2px) #921545;
}

.settings-btn input:checked + .settings-btn__track::before {
    transform: translateX(0%);
    background-color: #921545;
}


.read-settings.is-open {
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.read-settings.not-open {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


.read-settings strong{
    display: flex;
}

.text-and-checkbox{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-and-range{
    display: flex;
    flex-direction: column;
    gap: var(--fs-gap10);
}

.label-and-range label{
    display: flex;
    justify-content: center;
    gap: var(--fs-gap10);
}


input[type="range"] {
    -webkit-appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 7px;
    background: #1D162E;
    border-radius: var(--fs-border-radius);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #921545;
    border-radius: 50%;
    margin-top: -3.5px;
    cursor: pointer;
}


input[type="range"]::-moz-range-track {
    height: 4px;
    background: #1D162E;
    border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #921545;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]:focus {
    outline: none;
}




html.nav-hidden .read-nav,
html.nav-hidden .mobile-bottom-nav {
    transform: translateY(10vh);
    pointer-events: none;
    opacity: 0;
}

.dd-buttons{
    display: flex;
    justify-content: center;
    gap: var(--fs-gap10);
}

.dropdown-content{
    top: unset;
    bottom: calc(100% + var(--fs-gap10));
}

.side-menu{
    bottom: calc(var(--fs-gap20) + 18.05vw + 9.345vw + var(--fs-gap10));
}

.mobile-bottom-nav {
    transition: transform 0.35s ease, opacity 0.35s ease;
}


#themeDdContent .dropdown-list-value{
    padding: var(--fs-gap10);
    font-weight: 400;
}

#fontDdContent .dropdown-list-value{
    font-weight: 400;
}

#themeDdContent #standart-theme{
    background-color: rgb(7, 18, 32) !important;
    color:#e9e9e9;
}

#themeDdContent #dark-theme{
    background-color: #0a0a0a !important;
    color:#bfbfbf;
}

#themeDdContent #grey-theme{
    background-color: #434751 !important;
    color:#dbdbdb;
}

#themeDdContent #light-theme{
    background-color: #f2f2f3 !important;
    color:#212529;
}

#themeDdContent #book-theme{
    background-color: #e5cf9d !important;
    color: #262425;
}



.read-nav.desktop{
    display: flex;
    flex-direction: column;
    gap:var(--fs-gap10);
    position: fixed;
    bottom:var(--fs-gap20);
    right:clamp(1px,4.225vw,65px);
    align-items: center;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.read-nav.desktop .nav-icon{
    display: block;
    width: auto;
    height: clamp(1px,1.625vw,25px);
}

.read-nav.desktop .read-item{
    width: clamp(1px,3.25vw,50px);
    height: clamp(1px,3.25vw,50px);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1D162E;
    box-shadow: inset 0 0 0 var(--fs-border2px) #921545;
    border-radius: var(--fs-border-radius);
    padding: 0px;
}

.read-nav.desktop .read-item:hover{
    background-color: #921545 !important;
}

.read-settings{
    background: rgb(78, 28, 57);
    border-radius: var(--fs-border-radius);
    padding: var(--fs-padding);
    display: flex;
    flex-direction: column;
    gap: var(--fs-gap20);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, opacity;
    position: fixed;
    z-index: 850;
    width: 21vw;
    right: calc(clamp(1px,4.225vw,65px) + clamp(1px,3.25vw,50px) + var(--fs-gap10));
    bottom: var(--fs-gap20);
}


.read-nav.mobile{
    display: none;
}


@media (max-width: 768px) {
    .footer-nav {
        padding-bottom: calc(var(--fs-gap20) + 18.05vw + 9.345vw + var(--fs-gap10));
    }

    .account-dropdown-any{
        bottom: calc(var(--fs-gap20) + 18.05vw + 9.345vw + var(--fs-gap10));
    }

    .toast-container{
        bottom: calc(var(--fs-gap20) + 18.05vw + 9.345vw + var(--fs-gap10));
    }

    .settings-btn{
        width: clamp(1px,26.7vw,200px);
        height: clamp(1px,6.675vw,100px);
    }

    .read-settings{
        bottom: calc(var(--fs-gap20) + 18.05vw + 9.345vw + var(--fs-gap10));
        width: calc(100% - 2 * clamp(1px, 2.67vw, 100px));
        left: 0;
        right: 0;
        margin: 0 auto;
        max-height: calc(100dvh - ((18.05vw + 9.345vw + var(--fs-gap20) + var(--fs-gap20))));
        overflow-y: auto;
    }

    .read-nav.desktop{
        display: none;
    }

    .read-nav.mobile{
        display: flex;
        justify-content: space-between;
        background: rgb(78, 28, 57);
        border-radius: var(--fs-border-radius);
        width: 84%;
        position: fixed;
        left: 0;
        right: 0;
        margin: 0 auto;
        bottom: calc(var(--fs-gap20) + 18.05vw);
        z-index: 900;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    .read-nav .center-items{
        display: flex;
        gap:0;
    }

    .read-nav .nav-icon{
        display: block;
        width: auto;
        height: clamp(1px,4vw,100px);
    }

    .read-nav .arrow{
        width: clamp(1px,3.2vw,100px);
    }

    .read-nav .read-item{
        display: flex;
        align-items: center;
        justify-content: center;
        padding-inline: var(--fs-gap20);
        padding-block: var(--fs-gap10);
    }


    .read-settings .dropdown-icon {
        rotate: 180deg;
    }

    .read-settings .dropdown-select-btn.is-open .dropdown-icon{
        rotate: 0deg;
    }
}