@import "./common.scss";

#poststuff {
    .inside {
        &:has(.stlms-course-settings) {
            padding: 0;
            margin: 0;
        }
        &:has(.stlms-quiz-qus-wrap) {
            padding: 10px;
            margin: 0;
        }
    }
}
td {
    &.column-thumbnail {
        .column-thumb-img {
            width: 80px;
            height: 80px;
            background: #c1c1c1;
        }
    }
}
.column-post_author {
	.post-author {
		display: flex;
		align-items: center;
		gap: 8px;
		img {
			border-radius: 100%;
			flex-shrink: 0;
		}
	}
}
.column-employees {
    span {
        background: #c1c1c1;
        padding: 5px 15px;
        border-radius: 150px;
        &.has-employees {
            background: #2271b1;
            color: #fff;
        }
    }
}

.stlms-course-settings{
    .stlms-tab-container{
        .stlms-tabs-nav{
            margin-bottom: 0;
            padding-bottom: 0;
            .stlms-tab{
                padding: 10px 15px
            }
        }
        .stlms-tab-content{
            .stlms-cs-row{
                &:last-child{
                    border-bottom: 0
                }
            }
            .stlms-cs-download{
                padding: 10px 10px 0;
            }
        }
    }
}

.stlms-cs-drag-list{
    ul.cs-drag-list{
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-bottom: 10px;
        margin: 0;
        li{
            margin: 0
        }
        .cs-drag-list{
            padding: 10px;
            border: 1px solid #A0A0A0;
        }
    }
}
.stlms-cs-row{
    padding: 10px;
    display: flex;
    border-bottom: 1px solid #DDDDDD;
    &.hidden {
        display: none;
    }
    .stlms-cs-col-left{
        width: 180px;
        flex-shrink: 0;
        font-size: 12px;
        font-weight: 600;
    }
    .stlms-cs-col-right{
        width: 100%;
    }
    .stlms-cs-passing-grade{
        background: #F5F6F6;
        border: 1px solid #0073AA;
        padding: 10px;
        border-radius: 2px;
        font-size: 12px;
        font-weight: 500;
        margin: 10px 0;        
    }
    input[type="number"]{
        width: 70px;
        padding-right: 0;
    }
}
.stlms-author-box{
	padding: 10px;
    .stlms-media-choose:nth-child(2){
        padding-top: 15px;
    }
    span{
        &:not(.stlms-media-name){
            margin-top: 5px;
            color: #A0A0A0;
            font-size: 12px;
        }
    }
	.stlms-or{
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 5px 0;
		span{
			text-transform: uppercase;
			color: #A0A0A0;
			font-size: 12px;
			font-weight: 600;
			flex-shrink: 0;
		}
		&:after{
			content: "";
			background: #DDDDDD;
			width: 100%;
			height: 1px;
			display: block;
		}
	}
}
.stlms-cs-drag-field{
    border: 1px solid #A0A0A0;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    .stlms-options-drag{
        flex-shrink: 0;
        cursor: move;
    }    
    input.stlms-cs-input, textarea.stlms-cs-input{
        width: 100%;
        height: 36px;
        border: 0;
        border-radius: 0;
        padding: 0 8px;
        &:focus{
            box-shadow: none
        }
    }
    textarea.stlms-cs-input{
        height: 56px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .stlms-cs-action{
        flex-shrink: 0;
        a{
            display: inline-block;
            padding: 0;
            border: 0;
            box-shadow: none;
            color: #86888D;
            svg{
                fill: #86888D;
            }
        }
    }
}

.stlms-materials-box{
    border: 1px solid #DDDDDD;
    margin-bottom: 10px;
    &__header{
        padding: 10px;
        border-bottom: 1px solid #DDDDDD;
        display: flex;
        align-items: center;
        justify-content: space-between;
        h3{
            font-size: 12px;
            font-weight: 600;
            color: #23282D;
            margin: 0
        }
        p{
            margin: 0;
            font-size: 12px;
            color: #272D31;
        }
    }

    &.brd-0 &{
        &__header{
            border: 0;
        }
    }

    &__footer{
        padding: 10px;
    }
    .stlms-materials-list{
        ul {
            display: flex;
            margin: 0;
            &.hidden{
                display: none;
            }
            li{
                font-size: 12px;
                line-height: 1.361;
                color: #23282D;
                width: 33.333%;
                padding: 10px;
                margin: 0;
                position: relative;
                border-bottom: 1px solid #DDDDDD;
                &:not(:last-child):after{
                    content: "";
                    position: absolute;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    width: 1px;
                    height:16px;
                    margin: auto 0;
                    background: #DDDDDD;
                }
                &:not(:first-child){
                    padding-left: 35px;
                }
                .stlms-materials-list-action{
                    display: flex;
                    gap: 20px;
                    > a {
                        display: flex;
                        align-items: center;
                        text-decoration: none;
                        color: #0073aa;
                        font-size: 12px;
                        font-weight: 600;
                        gap: 10px;
                        &.stlms-delete-link {
                            color: #a53934;
                        }
                    }
                }
            }
        }
    }
}
.stlms-media-choose{
    display: flex;
    align-items: center;
    &.hidden {
        display: none !important;
    }
    label{
        width: 178px;
        font-size: 12px;
        font-weight: 600;
        flex-shrink: 0;
    }
    input:not([type="checkbox"]){
        width: 226px
    }
    .stlms-media-file{
        width: 100%;
        display: flex;
        align-items: center;
        gap: 16px;
        span.stlms-media-name{
            font-size: 14px;
            a {
                text-decoration: none;
            }
        }
    }
    &.show-certificate{
        padding-bottom: 8px;
    }
}
.stlms-materials-item{
    .stlms-media-choose{
        padding: 10px;
        border-bottom: 1px solid #DDDDDD;
    }
    .stlms-remove-material{
        color: #A53934;
        background: transparent;
        border: 0;
        padding: 0 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
    }
}

.stlms-quiz-qus-footer{
    padding: 20px 10px 10px;
    display: flex;
    justify-content: space-between;
}
.stlms-quiz-qus-list {
    margin: 0;
    padding: 0;
    > li {
        padding: 0;
        margin: 0;
    }
}
.stlms-quiz-qus-item {
    border: 1px solid #DDDDDD;
    &.active & {
        &__header {
            position: sticky;
            top: 24px;
            z-index: 1;
        }
    }
    &__header {
        padding: 20px 10px;
        display: flex;
        align-items: center;
        gap: 20px;
        background: #F5F6F6;        
        svg {
            display: block;
        }
        .stlms-options-drag {
            flex-shrink: 0;
            cursor: move;
        }
        .stlms-quiz-qus-name {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 14px;
            color: #272d31;
            font-weight: 600;
            input{
                width: 100%;
                background: transparent;
                border: 0;
                box-shadow: none;
                font-size: 14px;
                color: #272d31;
                padding: 0;
                &:focus{
                    box-shadow: none;
                }
            }
            .stlms-quiz-qus-point {
                font-size: 12px;
                font-weight: 400;
                ul{
                    display: flex;
                    li{
                        margin: 0;
                        padding-left: 10px;
                        display: flex;
                        align-items: center;
                        gap: 4px;
                        font-weight: 500;
                        &:not(:last-child){
                            border-right: 1px solid #DDDDDD;
                            padding-right: 10px;
                        }
                    }
                }
            }
        }
        .stlms-quiz-qus-toggle {
            flex-shrink: 0;
            cursor: pointer;
            svg {
                transition: all 0.3s ease-in-out;
            }
            &.active {
                svg {
                    transform: rotate(180deg);
                }
            }
        }
    }
    &__body {
        display: none;
        border-top: 1px solid #dddddd;        
    }
    &__footer {
        padding: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        justify-content: space-between;
        .stlms-item-footer-wrap{
            display: flex;
            align-items: center;
            gap: 10px;
        }
        a {
            display: flex;
            align-items: center;
            text-decoration: none;
            color: #0073aa;
            font-size: 12px;
            font-weight: 600;
            gap: 10px;
            &.stlms-delete-link {
                color: #a53934;
            }
            &:not(:first-child) {
                padding-left: 10px;
                border-left: 1px solid #dddddd;
            }
        }
        > #trimmer {
            font-weight: 600;
            display: flex;
            align-items: center;
            gap : 5px;
        }
    }
}

.stlms-curriculum-desc{
    border-bottom: 1px solid #DDDDDD;
    textarea{
        height: 76px;
        width: 100%;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        padding: 20px;
        &:focus{
            box-shadow: none;
        }
    }
}

.stlms-curriculum-item{
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border-bottom: 1px solid #DDDDDD;
    &:last-child {
        .stlms-curriculum-item-drag{
            cursor: pointer;
        }
    }
    .stlms-curriculum-item-drag{
        flex-shrink: 0;
        cursor: move;
    }    
    .stlms-curriculum-dd{
        width: 60px;
        flex-shrink: 0;
        position: relative;
        .stlms-curriculum-dd-button{
            border: 1px solid #0073AA;
            border-radius: 2px;
            padding: 5px 10px;
            display: flex;
            align-items: center;
            gap: 10px;
            background: #ffffff;
        }
        ul{
            position: absolute;
            top: 100%;
            left: 0;
            background: #ffffff;
            border-radius: 2px;
            border: 1px solid #ddd;
            display: none;
            margin-top: 2px;
            z-index: 12;
            li{
                padding: 5px 10px;
                display: flex;
                align-items: center;
                gap: 10px;
                font-size: 12px;
                font-weight: 500;
                cursor: pointer;
                &:not(:last-child){
                    border-bottom: 1px solid #ddd;
                }
                &.active{
                    background: #ddd
                }
            }
        }
        &.is-hide {
            &+ input {
                opacity: 0.5;
            }
            opacity: 0.5;
        }
    }
    input.stlms-curriculum-item-name{
        width: 100%;
        border: 0;
        font-size: 14px;
        font-weight: 500;
        &[readonly]{
            background: transparent;
            user-select: none;
            color: #272D31;
            &:focus{
                box-shadow: none;
            }
        }
    }
    .stlms-curriculum-item-action{
        flex-shrink: 0;
        display: flex;
        gap: 10px;
        &.hidden {
            display: none;
        }
    }
    &.searching {
		> div {
			opacity: 0.5;
			pointer-events: none;
		}
	}
}
.stlms-course-wrap .nav-tab-wrapper .nav-tab.active {
    background: #fff;
}