@use '../partials/mixin' as mx;

.CSS_START_components_readerHeader {
    display: none;
}

[data-theme="dark"] {
    .toolbar_navigation, .picker_container {
        background-color: var(--color-secondary);
        // border-bottom: 2px solid var(--color-mediumdark-grey);
    }
}

[data-theme="system"] {
    @media (prefers-color-scheme: dark) {
        .toolbar_navigation, .picker_container {
        background-color: var(--color-secondary);
        // border-bottom: 2px solid var(--color-mediumdark-grey);
        }
    }
}

.toolbar_navigation {
    height: 70px;
    width: 100%;
    padding: 0;
    background-color: var(--color-extralight-grey);
    border-bottom: 3px solid var(--color-extralight-grey-alt);
    box-sizing: border-box;

    &.ttsAudioActivated .tts_toolbar::before {
            content: "";
            position: absolute;
            left: calc(50% - 105px);
            top: 42px;
            height: 1px;
            width: 210px;  /* or 100px */
            border-bottom: 2px solid var(--color-blue);
    }

    > ul {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: inherit;
        margin: 0;
        list-style-type: none;
        padding: 0 20px;

        .tts_toolbar {
            justify-content: center;
            position: relative;

            @media screen and (width <= 850px) {
                margin-right: 10px;
            }

        }

        .menu_option {
            justify-content: end;
            gap: 10px;
        }

        .pdf_options {
            max-width: 100px;
        }

        li {
            height: 40px;
            width: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 5px;

            &:has(input:disabled) {
                .menu_button {
                    background-color: transparent;
                    cursor:auto;

                    &:not(:has(.active_svg)):hover,
                    &:not(:has(.active_svg)):focus {
                        border-color: transparent;
                        background-color: transparent;
                    }

                    svg {
                    fill: var(--color-medium-grey);
                    color: var(--color-medium-grey);
                    }
                }
            }

            .my_combobox_container {
                width: unset;
            }

            .menu_button {
                height: 42px;
                width: 42px;
                cursor: pointer;
                padding: 5px;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                justify-content: center;
                border: 1px solid transparent;
                transition: .2s;
                border-radius: 5px;

                &:not(:has(.active_svg)):hover {
                    border-color: var(--color-blue);
                    background-color: var(--color-light-blue);
                }

                svg {
                    height: 20px;
                    width: 30px;
                    fill: var(--color-blue-alt);
                    color: var(--color-blue-alt);

                    // @media (prefers-color-scheme: dark) {
                    //     fill: #FEFEFE;
                    //     color: #FEFEFE;
                    // }
                }
            }

            input {
                position: relative;
                opacity: 0;
            }

            label {
                position: absolute;
                display: block;
                align-items: center;


                svg {
                    width: inherit;
                    height: inherit;
                    fill: var(--color-blue);
                }
            }
        }

        > ul {
            display: flex;
            padding: 0;
            flex: 1;
            gap: 5px;
        }
    }
}

.active_svg {
    fill: var(--color-secondary)!important;
    color: var(--color-secondary)!important;

    // @media (prefers-color-scheme: dark) {
    //     fill: black!important;
    //     color: black!important;
    // }
}

.picker_container {
    display: flex;
    align-items: center;
    padding: 0;
    width: 100vw;
    height: 48px;
    background-color: var(--color-extralight-grey);
    z-index: 100;
    top: 70px;
    right: 0;
    left: unset;
    border-bottom: 2px solid var(--color-extralight-grey-alt);
    position: absolute;

    button[title="Close"] {
        width: 15px;
        height: 15px;
        padding: 4px;
        margin: 0;

        svg {
            height: 15px;
        }
    }

    .form_group {
        width: 200px!important;
        height: 24px!important;

        input {
            opacity: 1;
        }

        label {
        top: -18px;
        background-color: var(--color-extralight-grey);
        }

        button {
            svg {
                fill: var(--color-blue);
            }
        }
    }
}

.button {
    &_close {
        width: 20px;
        height: 20px;
    }

    &_arrow {
        fill: var(--color-extralight-grey);
        width: 15px;
        height: 10px;
    }
}

.Tts_popover_container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    height: fit-content;
    background-color: var(--color-extralight-grey);
    border-radius: 6px;
    list-style-type: none;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--color-verylight-grey-alt);
    /* gap: 20px; */
    color: var(--color-primary);

    @media only screen and (width <= 980px) {
        max-height: 520px;
        overflow-y: auto;
        flex-wrap: wrap;
        max-width: 680px;
        gap: 5px;

        @include mx.scrollbar_styling;

/*
        .colorPicker div input {
            display: none;
        }
*/
    }


    .react_aria_ComboBox{
        .react_aria_Input {
            background-color: var(--color-secondary)!important;
            color: var(--color-primary)!important;
        }

        select {
            width: fit-content;
            height: 30px;
            border-radius: 6px;
            padding: 0 10px;
            background-color: var(--color-secondary);
            color: var(--color-primary);
        }

        .react_aria_ComboBox {
            margin: 0;
        }
    }

    .ttsSelectRate {
        .react_aria_ComboBox {
            margin-bottom: 5px;
            padding: 0;
        }
    }

    .ttsSelectVoice {
        margin-top: 2em;
        border: 2px dotted var(--color-verylight-grey-alt);
        border-radius: 1em;
        padding: 0.4em;

        .react_aria_ComboBox {
            padding-bottom: 0;
        }
    }

    .ttsSelectRate, .ttsSelectVoice {
        input {
            padding-left: 10px;
        }

        .my_combobox_container {
            width: 280px;
        }
    }
}

.popover_arrow {
    border-top: 2px solid var(--color-extralight-grey);
    fill: var(--color-extralight-grey);
    width: 15px;
    height: 10px;
}

.bookmarkButton:focus + label {
    outline: var(--color-blue) solid 2px !important;
    outline-offset: -2px;
}

#bookmarkLabel .bookmarkRemove{
    display: none;
    height: 24px;
    zoom: 1.2;
}

#bookmarkLabel .bookmarkIcon{
    display: block;
    zoom: 1.2;
}

#bookmarkLabel .bookmarkRemove,
#bookmarkLabel .bookmarkAdd{
    display: none;
}

#bookmarkLabel .bookmarkAdd{
    zoom: 0.6;
}

#bookmarkLabel .bookmarkRemove.active_svg_option,
#bookmarkLabel .bookmarkAdd.active_svg_option{
    display: block;
}

#bookmarkLabel:has(.bookmarkRemove.active_svg_option) .bookmarkIcon{
    display: none;
}

#bookmarkLabel:has(.bookmarkIcon.active_svg_option){
    background-color: var(--color-blue) !important;
}

#bookmarkLabel:has(.bookmarkIcon.active_svg_option) .bookmarkRemove.active_svg_option,
#bookmarkLabel:has(.bookmarkIcon.active_svg_option) .bookmarkIcon.active_svg_option{
    color: var(--color-secondary) !important;
}

#bookmarkLabel:has(.bookmarkIcon.active_svg_option) .bookmarkAdd.active_svg_option{
    fill: var(--color-secondary) !important;
}

.annotationsIcon svg {
    width: 22px!important;
    height: 25px!important;
}

.searchHeader_container {
    display: flex;
    align-items: center;

    // padding: 20px 0;
    width: 400px;
    margin-right: 10%;

    .searchActions {
        display: flex;
        align-items: center;
        gap: 10px;

        &::before {
            content: "";
            position: absolute;
            margin-right: 10%;
            top: 47px;
            height: 1px;
            width: 200px;
            border-bottom: 2px solid var(--color-blue);
        }
    }

    form::before {
        content: "";
        position: absolute;
        margin-right: 10%;
        top: 37px;
        height: 1px;
        width: 100%;
        border-bottom: 2px solid var(--color-blue);
    }
}

.CSS_END_components_readerHeader {
    display: none;
}
