@use '../utils' as *;

/*----------------------------------------*/
/*  2.2 Theme Settings
/*----------------------------------------*/

.#{$theme-prifix}-theme{
    $self : &;
    &-settings{
        &-area{
            position: fixed;
            top: 50%;
            left: 0;
            width: 240px;
            background-color: #fff;
            border: 1px solid #EAEAEF;
            @include transform(translateY(-50%) translateX(-100%));
            z-index: 991;
            direction: ltr;
            border-bottom-right-radius: 4px;
    
            &.settings-opened{
                @include transform(translateY(-50%) translateX(0%));

                #{$self}{
                    &-settings-gear{
                        opacity: 0;
                    }
                    &-settings-close{
                        opacity: 1;
                    }
                }
            }
        }
        &-open{
            position: absolute;
            top: -1px;
            left: 100%;
            
            
            & button{
                background-color: var(--tp-common-white);
                border: 1px solid #EAEAEF;
                border-left: 0;
                width: 60px;
                height: 60px;
                line-height: 60px;
                text-align: center;
                font-size: 24px;
                color: var(--tp-common-black);
                position: relative;
                border-top-right-radius: 4px;
                border-bottom-right-radius: 4px;
            }
        }
        &-gear{
            display: inline-block;
            @include animation((tp-theme-setting-spin 4s linear infinite));
            @at-root{
                @include keyframes(tp-theme-setting-spin){
                    100%{
                        -webkit-transform:rotate(360deg);
                        transform:rotate(360deg);
                    }
                }
            }
        }
        &-close{
            display: inline-block;
            position: absolute;
            top: 50%;
            left: 50%;
            @include transform(translate(-50%, -50%));
            opacity: 0;
        }
    }
    &-header{
        &-title{
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 30px;
        }
    }
    &-wrapper{
        padding: 20px 30px 30px;
    }
    &-toggle{
        text-align: center;
        &-main{
            display: inline-block;
            width: 160px;
            margin: auto;
            position: relative;
            z-index: 1;
            background-color: #f0f0f5;
            padding: 4px;
            border-radius: 20px;
        }
        &-light,
        &-dark{
            display: inline-block;
            width: calc(100% - 52%);
            height: 26px;
            line-height: 26px;
        }
        & input{
            display: none;
        }
        
        &:hover{
            cursor: pointer;
        }

        & label{
            color: var(--tp-common-black);
            font-size: 14px;
            font-weight: 500;
            &:hover{
                cursor: pointer;
            }
        }
        & #tp-theme-toggler{
            display: none;

            &:checked + i{
                right: calc(50% - 4px);
            }
        }
        &-slide{
            position: absolute;
            top: 50%;
            right: 4px;
            @include transform(translateY(-50%));
            width: calc(100% - 50%);
            height: 26px;
            color: var(--tp-common-black);
            background-color: var(--tp-common-white);
            border-radius: 30px;
            -webkit-transform: translate3d(0, 0);
            transform: translate3d(0, 0);
            @include tp-transition(all, .2s, cubic-bezier(0.25, 1, 0.5, 1));
            z-index: -1;
        }

    }
    &-dir{
        text-align: center;
        &-main{
            display: inline-block;
            width: 160px;
            margin: auto;
            position: relative;
            z-index: 1;
            background-color: #f0f0f5;
            padding: 4px;
            border-radius: 20px;
        }
        &-ltr,
        &-rtl{
            display: inline-block;
            width: calc(100% - 52%);
            height: 26px;
            line-height: 26px;
        }
        & input{
            display: none;
        }
        
        &:hover{
            cursor: pointer;
        }

        & label{
            color: var(--tp-common-black);
            font-size: 14px;
            font-weight: 500;
            &:hover{
                cursor: pointer;
            }
        }
        & #tp-dir-toggler{
            display: none;

            &:checked + i{
                right: calc(50% - 4px);
                
            }
        }
        &-slide{
            position: absolute;
            top: 50%;
            right: 4px;
            @include transform(translateY(-50%));
            width: calc(100% - 50%);
            height: 26px;
            color: var(--tp-common-black);
            background-color: var(--tp-common-white);
            border-radius: 30px;
            -webkit-transform: translate3d(0, 0);
            transform: translate3d(0, 0);
            @include tp-transition(all, .2s, cubic-bezier(0.25, 1, 0.5, 1));
            z-index: -1;
        }

    }
    &-color{
        &-item{
            &.active{    
                & button{
                    &::before{
                        opacity: 1;
                        visibility: visible;
                    }
                }
            }
        }
        &-btn{
            width: 100%;
            height: 40px;
            line-height: 40px;
            text-align: center;
            position: relative;

            &::before{
                position: absolute;
                content: '\f00c';
                font-weight: 600;
                font-family: var(--tp-ff-fontawesome);
                color: var(--tp-common-white);
                font-size: 16px;
                left: 50%;
                top: 50%;
                @include transform(translate(-50%, -50%));
                @include tp-transition();
                opacity: 0;
                visibility: hidden;
            }

            &.#{$theme-prifix}-color-settings-btn{
                            
                &[data-color="#F50963"]{
                    background-color: #F50963;
                }
                &[data-color="#008080"]{
                    background-color: #008080;
                }
                &[data-color="#F31E5E"]{
                    background-color: #F31E5E;
                }
                &[data-color="#AB6C56"]{
                    background-color: #AB6C56;
                    color: black;
                }
                &[data-color="#4353FF"]{
                    background-color: #4353FF;
                }
                &[data-color="#3661FC"]{
                    background-color: #3661FC;
                }
                &[data-color="#2CAE76"]{
                    background-color: #2CAE76;
                }
                &[data-color="#FF5A1B"]{
                    background-color: #FF5A1B;
                }
                &[data-color="#03041C"]{
                    background-color: #03041C;
                }
                &[data-color="#ED212C"]{
                    background-color: #ED212C;
                }
            }

           
        }
        &-input{
            margin-top: 15px;

            & h6{
                font-size: 14px;
                font-weight: 600;
                margin-bottom: 5px;
            }

            & label{
                display: inline-block;
                width: 100%;
                height: 40px;
                line-height: 40px;
                text-align: center;
                background-color: var(--tp-theme-1);
                @include tp-transition(all);
                &:hover{
                    cursor: pointer;
                }
            }

            & input{
                display: none;
            }
        }
    }
}

$enable-rounded: true !default;
$enable-gradients: false !default;
$variable-prefix: bs- !default; // Deprecated in v5.2.0 for the shorter `$prefix`
$prefix: $variable-prefix !default;
$primary: var(--bs-body-color) !default;
$secondary: var(--bs-link-hover-color-rgb) !default;
$font-weight-normal: 400 !default;
$link-color: $primary !default;
$link-decoration: underline !default;
$link-shade-percentage: 20% !default;
$link-hover-color: shift-color($link-color, $link-shade-percentage) !default;
$link-hover-decoration: null !default;
$border-radius: .375rem !default;

@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
    @if $enable-rounded {
        border-radius: valid-radius($radius);
    } @else if $fallback-border-radius != false {
        border-radius: $fallback-border-radius;
    }
}

@mixin gradient-bg($color: null) {
    background-color: $color;

    @if $enable-gradients {
        background-image: var(--#{$prefix}gradient);
    }
}

.dropdown-item {
    display: block;
    width: 100%; // For `<button>`s
    padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
    clear: both;
    font-weight: $font-weight-normal;
    color: var(--#{$prefix}dropdown-link-color);
    text-align: inherit; // For `<button>`s
    text-decoration: if($link-decoration == none, null, none);
    white-space: nowrap; // prevent links from randomly breaking onto new lines
    background-color: transparent; // For `<button>`s
    border: 0; // For `<button>`s
    @include border-radius(var(--#{$prefix}dropdown-item-border-radius, 0));

    &:hover,
    &:focus {
        color: var(--#{$prefix}dropdown-link-active-color);
        text-decoration: none;
        @include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
    }

    &.active,
    &:active {
        color: var(--#{$prefix}dropdown-link-active-color);
        text-decoration: none;
        @include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
    }

    &.disabled,
    &:disabled {
        color: var(--#{$prefix}dropdown-link-disabled-color);
        pointer-events: none;
        background-color: transparent;
        // Remove CSS gradients if they're enabled
        background-image: if($enable-gradients, none, null);
    }
}