$cf-theme-color: #4b1bce;

.cf-settings-wrapper {
    display: flex;
    margin-top: 30px;
    background-color: #f7f7f7;

    @media screen and (max-width: 600px) {
       flex-direction: column;
    }

    &__sidebar {
        width: 230px;
        background: #f7f7f7;
        border-right: 1px solid #ECEAFF;

        @media screen and (max-width: 600px) {
            width: 100%;
        }

        ul {
            list-style: none;
            margin: 0;
            padding: 0;

            .cf-tab-btn {
                cursor: pointer;
                border-bottom: 1px solid #ECEAFF;
                position: relative;
                display: flex;
                align-items: center;
                gap: 8px;
                padding: 14px 15px;
                overflow: hidden;
                transition: background 0.3s ease, color 0.3s ease;
                color: #5B6064;
                font-size: 15px;
                line-height: 22px;
                margin-bottom: 0;

                &::before{
                    content: "";
                    position: absolute;
                    left: 0;
                    top: 0;
                    width: 3px;
                    height: 100%;
                    background-color: $cf-theme-color;
                    transform: scaleY(0);
                    transform-origin: top;
                    transition: transform 0.3s ease-in-out;
                }


                &.cf-tab-active {
                    background: #fff;
                    color: $cf-theme-color;
                    margin-right: -1px;

                    &::before {
                        transform: scaleY(1);
                    }
                    
                    svg {
                        fill: $cf-theme-color;
                        stroke: $cf-theme-color;

                        #check-svgrepo-com {
                            stroke: $cf-theme-color;
                        }

                        #publishing-icon {
                            fill: $cf-theme-color;
                        }
                    }
                }

                &:last-child{
                    margin-bottom: 0;
                    border-bottom: none;
                }
            }
        }
        
    }
    &__content {
        flex: 1;
        background-color: #fff;

        .cf-tab-content {
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
            height: 0;
            overflow: hidden;

            &.cf-tab-active {
                opacity: 1;
                visibility: visible;
                height: auto;
                overflow: visible;
            }
            
        }
        .cf-settings-wrap__repeater {
            padding: 15px 20px;

            &-header {
                padding: 20px;
                text-align: center;
                background-color: #fcfcfc;
                margin-bottom: 25px;
                border: 1px solid #edecec;
                border-radius: 6px;
    
                p {
                    margin-bottom: 0;
                    color: #5B6064 !important;
                    line-height: 22px;

                    a {
                        outline: none;
                        box-shadow: none;
                        margin-left: 5px;
                        text-decoration: none;

                        &:hover {
                            text-decoration: underline;
                        }
                    }

                    .cf-external-link-icon {
                        width: 11px;
                        margin-left: 4px;
                        position: relative;
                        top: 0px;
                        display: inline-block;
                    }
                }
            }

           .cf-settings-panel__repeater-body {
                padding: 0 !important;
            }

            a:not(.cf_premium_star) {
                color: $cf-theme-color;
                text-decoration: none;
                &:hover {
                    text-decoration: underline;
                }
            }

            .cf_disabled_input {
                a:not(.cf_premium_star) {
                    color: #939393;
                }
                .cf-settings-row input[type=checkbox]:checked + .cf-settings-td-slider {
                    border-color: #939393;
                    background: #939393;
                }
                .cf-settings-role-section__header a {
                    background: #ebe9e9;
                }
                .cf-permissions-controls .button {
                    background-color: transparent;
                    color: #C3C4C7;
                    border-color: #E2E4E7;
                }
                .cf-settings-role-section {
                    h3, h4 {
                        color: #939393; 
                    }
                }
            }

            .cf-settings-row {
                display: flex;
                align-items: flex-start;
                gap: 20px;

                @media screen and (max-width: 768px) {
                    flex-wrap: wrap;
                    flex-direction: column;
                    gap: 15px;
                }

                span.select2-selection.select2-selection--multiple {
                    min-width: 280px;
                    display: flex;
                    align-items: center;
                    min-height: 37px;
                    border: 1px solid #dbdbdb;
                    padding: 4px 60px 0px 10px;
                    border-radius: 0;
                    -webkit-border-radius: 3px;
                    -moz-border-radius: 0;
                    -ms-border-radius: 0;
                    -o-border-radius: 0;

                    .select2-selection__choice__remove {
                        border-right: 1px solid #4b1bce;
                        color: rgb(255 255 255 / 70%);
                    }

                    .select2-selection__choice {
                        background-color: #4b1bce;
                        color: #fff;
                        border: 1px solid #4b1bce;
                        font-size: 12px;
                        margin-top: 5px;
                        padding: 0 5px;
                        font-weight: 400;
                        float: inline-start !important;
                    }
                }
                .select2-container .select2-search--inline {
                    float: none;
                }

                .cf-settings-th {
                    width: 80%;
                    @media screen and (max-width: 768px) {
                       width: 100%;
                    }
                }
                
                .cf-settings-td {
                    width: 17%;
                    text-align: right;

                    @media screen and (max-width: 768px) {
                        width: 100%;
                        text-align: left;
                    }
                }

                h4 {
                    margin: 0;
                    font-size: 14px;
                    line-height: 20px;
                }

                &:not(:last-child) {
                    border-bottom: 1px solid #ECEAFF;
                    padding-bottom: 20px;
                    margin-bottom: 20px;

                    @media screen and (max-width: 768px) {
                        padding-bottom: 15px;
                        margin-bottom: 15px;
                    }
                }
                .cf-setting-desc {
                    color: #7E878D;
                    line-height: 22px; 

                    @media screen and (max-width: 768px) {
                       margin-bottom: 0;
                    }   
                }
                label.cf-settings-td-toggle {
                    position: relative;
                    display: inline-block;
                    width: 50px;
                    height: 24px;
                }
                .cf_post_types_lists {
                    width: 100%;
                }
                label.cf-settings-td-toggle input[type="checkbox"] {
                    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
                    border-color: transparent;
                    width: 100%;
                    margin: 0 5px 0 0;
                }
                
                .cf-settings-td-slider {
                    position: absolute;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    left: 0;
                    cursor: pointer;
                    border: 2px solid #6c7781;
                    border-radius: 34px;

                    &::before {
                        position: absolute;
                        bottom: 3px;
                        left: 4px;
                        width: 14px;
                        height: 14px;
                        content: '';
                        border-radius: 50%;
                        background-color: #6c7781;
                        transition: 0.3s;
                    }
                    
                }
                
                svg.toggle_on {
                    display: none;
                    border: 1px solid #fff;
                    border-radius: 2px;
                    outline: 1px solid transparent;
                    outline-offset: -1px;
                    background: #fff;
                    fill: #fff;
                }
                
                svg.toggle_off {
                    right: 6px;
                    left: auto;
                    color: #6c7781;
                    fill: currentColor;
                }
                
                .toggle_off, .toggle_on {
                    position: absolute;
                    top: 6px;
                    left: 10px;
                    -webkit-box-sizing: border-box;
                    box-sizing: border-box;
                }
                
                input[type=checkbox]:checked + .cf-settings-td-slider {
                    border-color: $cf-theme-color;;
                    background: $cf-theme-color;;
                
                }
                                
                input[type=checkbox]:checked + .cf-settings-td-slider::before {
                    -webkit-transform: translateX(24px);
                    transform: translateX(24px);
                    background: #fff;
                }
                
                input[type=checkbox]:checked + .cf-settings-td-slider .toggle_on {
                    display: block;
                }
                
                input[type=checkbox]:checked + .cf-settings-td-slider .toggle_off {
                    display: none;
                }                
                .cf-suggestion-option.label {
                    h4 {
                        float: left;
                    }
                    .md-plugin-tooltip {
                        svg {
                            position: relative;
                            top: 2px;
                            width: 13px;
                            height: 13px;
                        }
                    }
                    
                }
            }
            .submit {
                text-align: right;
            }
            .cf-license-setting-wrap {
                h4 {
                    width: 20%;
                    @media screen and (max-width: 768px) {
                        width: 100%;
                    }
                }
                
                .widefat.striped.fixed {
                    width: 77%;
                    border-color: #ECEAFF;
                    @media screen and (max-width: 768px) {
                        width: 100%;
                    }

                    thead th {
                        background-color: #F5F5F4;
                    }
                }
                
                .cf-license-settings {
                    width: 77%;

                    @media screen and (max-width: 768px) {
                        width: 100%;
                    }
                }

                .cf-license-notices {
                    .cf-notice {
                        background: #fff;
                        border: 0.5px solid #E2E4E7;
                        border-left: 1px solid #d63638;
                        border-left-width: 4px;
                        box-shadow: 0 1px 1px rgb(0, 0, 0, 0.04);
                        margin: 20px 15px 2px 0;
                        padding: 15px 12px;
                        p {
                            margin: 0;
                            font-size: 16px;
                        }
                        &.notice-expired {
                            border-left-color: #d63638;
                        }
                        &.notice-success {
                            border-left-color: #00a32a;
                        }
                    }
                }
                span {
                    &.cf-license-activator-input {
                        position: relative;
                        display: inline-block;
                        max-width: 75.5%;
                        width: 100%;
                
                        @media screen and (max-width:1200px){
                            max-width:50%;
                            width:100%;
                        }
                        @media screen and (max-width:782px) {
                            max-width:100%;
                            margin-bottom: 10px;
                        }
                        .dashicons {
                            &.dashicons-yes-alt {
                                position: absolute;
                                top: 50%;
                                right: 6px;
                                transform: translateY(-50%);
                                font-size: 21px;
                                color: #00a32a;
                            }
                        }
                        input#cf-license-activator {
                            width: 100%;
                            height: 40.5px;
                            box-shadow: none;
                            outline: none;
                            border-color: #e1e1e1;
                        }
                    }
                }
            }
                        
        }
        .cf-settings-role-section {
            border-radius: 6px;
            margin: auto;
            border: 1px solid #ECEAFF;
            margin-bottom: 20px;
            overflow: hidden;
            padding-bottom: 20px;
            &__header {
                display: flex;
                align-items: center;
                background-color: #f7f7f7;
                margin: 0 0 20px;
                padding: 18px 20px;
                gap: 12px;

                @media screen and (max-width: 768px) {
                    margin: 0 0 15px;
                    padding: 15px;
                }

                h3 {
                    margin-bottom: 0;
                    font-size: 16px;
                }

                span:not(:last-child) {
                    position: relative;
                    padding-right: 18px;

                    &::after {
                        content: "|";
                        position: absolute;
                        top: 0px;
                        left: auto;
                        right: 0;
                        color: #cdcdcd;
                        font-weight: 500;
                        font-size: 18px;                    
                    }
                }

                a {
                    font-size: 13px;
                    line-height: 22px;
                    text-transform: capitalize;
                    background-color: #efe9ff;
                    padding: 5px 10px;
                    text-decoration: none;
                    border-radius: 30px;
                    outline: none;
                    box-shadow: none;
                    border: none;
                }
            }
            
            .cf-settings-row {
                padding-inline: 20px;
            }

            .role-manager h2 {
                font-size: 24px;
                font-weight: 600;
                margin-bottom: 0.25rem;
              }
              
              .role-manager p {
                color: #6b7280;
                margin-bottom: 2rem;
              }
              
              .role-section h3 {
                font-size: 20px;
                font-weight: 600;
                margin-bottom: 1.5rem;
              }
              
              .setting-row {
                display: flex;
                align-items: flex-start;
                margin-bottom: 1.5rem;
              }
              
              .setting-label {
                width: 200px;
                font-weight: 500;
                padding-top: 6px;
              }
              
              .cf-setting-options {
                display: flex;
                flex-wrap: wrap;
                gap: 1rem;
              }
              
              .cf-setting-options label {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                background: #f9fafb;
                padding: 8px 12px;
                border-radius: 4px;
                border: 1px solid #e5e7eb;
                cursor: pointer;
                font-size: 14px;
                font-weight: 500;
                transition: background 0.2s, border 0.2s;
                min-width: 160px;
              }
              
              .cf-setting-options input[type="checkbox"]:checked + span,
              .cf-setting-options input[type="checkbox"]:checked {
                accent-color: #7c3aed;
              }
            
            h4 {
                width: 19%;
                @media screen and (max-width: 768px) {
                    width: 100%;
                }
            }
        }

        .cf-role-hidden {
            display: none;
        }
        
        .cf-role-visible {
            display: block;
        }
        
        .cf-permissions-controls {
            margin-bottom: 30px;
            padding-block-end: 30px;
            border-bottom: 1px solid #ECEAFF;
            text-align: center;
        
            .button {
                background-color: $cf-theme-color;
                border-color: $cf-theme-color;
                color: #fff;
                padding: 4px 15px;
                line-height: 24px;
                border-radius: 6px;
                transition: 0.2s ease-in-out;
            }
        }
        
        .cf-settings-role-section {
            transition: opacity 0.3s ease-in-out;
        }
        
        .cf-role-section-fade-in {
            animation: fadeIn 0.3s ease-in-out;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
          
    }
}
.cf-copyright-text {
    padding: 20px 10px;
    background: #ffffff;
    border: 1px solid #ECEAFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0 20px;
    gap: 6px;
    font-size: 14px;

    a {
        line-height: normal;
        outline: none;
        box-shadow: none;
        color: #4b1bce;
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }

    .cf-footer-link-icon {
        height: 20px;
        position: relative;
        top: 2px;
    }

    .cf-external-link-icon {
        position: relative;
        width: 12px;
        top: 1px;
        margin-left: 3px;
    }
}