.cws-ce-restricted{
    max-width:1080px;
    width: 100%;
    margin: auto;
}

.cws-ce-restricted .cws-ce-panel{
    flex: 1 0 50%;
}

.cws-ce-restricted .cws-ce-resize-bar.cws-ce-restricted-bar {
    left: 50%;
    transform: translateX(-50%);
}

/* ----------------- CSS For Restricted Message -------------------------- */

.cws-gradient-mask {
    position: absolute; 
    display: grid;
    background: linear-gradient(to bottom, transparent 0%, #00000040 30%, #000000ad 60%, #040404 90%);
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    z-index: 5;
    place-content: center;
}

.cws-ce-restricted-msg {
    padding: 2rem;
    background: #191919;
    border-radius: 10px;
    color: #e7e7e7;
    box-shadow: 0px 0px 25px 0px #000000;
    text-align: center;
    margin: 10px;
}


.cws-ce-restrict-links {
    display: grid;
    justify-items: center;
    gap: 1rem;
}

.cws-ce-restricted  .cws-ce-upgrade-btn {
    background: var(--cws-primary);
    color: white;
    border-radius: 5px;
    padding: 5px 10px;
    font-weight: bold;
    font-size: .8rem;
}

/*-------------------------------------Scrollbar CSS--------------------------------*/

.CodeMirror-sizer {
    min-width: 300px;
}

.CodeMirror-simplescroll-horizontal {
    height: 10px; /* 1rem = 10px */
    background: transparent;
}

.CodeMirror-simplescroll-vertical {
    width: 10px; /* 1rem = 10px */
    background: transparent;
}

.CodeMirror-simplescroll-horizontal div,
.CodeMirror-simplescroll-vertical div {
    background: #484848;
    border-radius: 2px;
    border: none;
}

.cws-code-area:hover ::-webkit-scrollbar-thumb {
    background: #3c3c3c;
}

.CodeMirror-gutter-filler,
.CodeMirror-scrollbar-filler {
    background-color: transparent;
}

.CodeMirror {
    height: 100%;
    background: transparent;
}

.cm-s-material-darker .CodeMirror-activeline-background {
    background: rgba(0, 0, 0, .127);
}

/*---------------------------------------------------------------------------------------------------*/

.cws-ce-panel-wrapper {
    position: relative;
    display: flex;
    height: 550px;  
    border-radius: 5px; 
    overflow: hidden;
}

.cws-ce-panel-wrapper button {
    border-radius: 4px; 
    font-size: 13px; 
    cursor: pointer;
    padding: 0 10px; 
    transition: .3s;
    background: #2e2e2e;
    color: #fffffff5;
    border: none;
    width: 45px; 
    height: 25px;
}

.cws-ce-panel {
    overflow: hidden;
}

.cws-ce-actions-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: #212121;
}


.cws-ce-options {
    gap: 10px; 
    background: #171717;
    padding: 0 20px; 
    height: 50px; 
    color: #fff;
    display: grid;
    justify-content: space-between;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
}

.cws-ce-tab-container {
    display: flex;
    height: 100%;
    align-items: flex-end;
    width: 100%;
    overflow: hidden;
    padding-left: 10px; 
}

.cws-ce-tab {
    display: grid;
    grid-template-columns: auto 1fr;
    padding: 5px 0 8px 10px;
    color: #dedede;
    border-bottom: none;
    position: relative;
    height: 65%;
    font-size: 14px;
    min-width: 96px;
    align-items: flex-end;
    margin-right: 15px;
    letter-spacing: 1px;
    width: 130px;
    gap: 10px;
    font-weight: 700;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
}

.cws-ce-tab:hover {
    background: #21212156;
    border-radius: 10px;
}

.cws-ce-active-tab {
    background: #212121;
    pointer-events: none;
}

.cws-ce-active-tab::before {
    content: '';
    background: #171717;
    width: 13px;
    height: 10px;
    border-radius: 0 0 19px 0;
    left: -13px;
    position: absolute;
    box-shadow: 4px 2px 0 1px #212121;
    bottom: 0;
}

.cws-ce-active-tab::after {
    content: '';
    background: #171717;
    width: 13px;
    height: 10px;
    border-radius: 0 0 0 20px;
    right: -13px;
    position: absolute;
    box-shadow: -3px 2px 0 1px #212121;
    bottom: 0;
    z-index: 1;
}

.cws-ce-tab:not(.active-tab)::after {
    top: 50%;
    border-radius: 12px;
    content: '';
    position: absolute;
    width: 3%;
    transform: translateY(-50%);
    height: 60%;
    right: 0;
    background: #212121e0;
}

.cws-ce-tab-icon {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    width: 18px;
    height: 100%;
}

.cws-ce-html-tab-icon{
    background-image: url(../icons/html.svg);
}

.cws-ce-css-tab-icon{
    background-image: url(../icons/css.svg);
}

.cws-ce-js-tab-icon{
    background-image: url(../icons/js.svg);
}

.cws-ce-tab-label{
    line-height: 0.8;
}

.cws-ce-options-menu-wrapper {
    position: relative;
    display: flex;
    gap: 10px; 
    height: 100%;
    align-items: center;
}

.cws-ce-run-btn {
    font-size: 14px;  
    width: max-content;
}

.cws-ce-tabs-mm-btn {
    display: none;
}


.cws-ce-max-min-btn {
    font-size: 12px; /* 1.2rem = 12px */
}

.cws-ce-hide-preview,
.cws-ce-show-preview {
    display: none;
    width: max-content !important;
}

#cws-ce-zoom-in:hover,
#cws-ce-zoom-out:hover,
.cws-ce-menu-btn:hover,
.cws-ce-run-btn:hover {
    opacity: .8;
}


.cws-ce-menu-list {
    position: absolute;
    width: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: .3s;
    list-style: none;
    background: #141414;
    top: 55px;  
    right: 0;
    border-radius: 5px; 
    color: #fff;
    visibility: hidden;
    transform: scale(0);
    user-select: none;
    transform-origin: 100% 0;
    z-index: 2;
}

.cws-ce-menu-item {
    display: flex;
    align-items: center;
    font-size: 14px;  
    gap: 10px; 
    padding-right: 10px;  
}

.bi-info-circle {
    font-size: 14px; 
    color: #ffffffc2;
    cursor: pointer;
}

.cws-ce-menu-list .cws-ce-menu-item:hover {
    background: #01010140;
}

.cws-ce-menu-item label {
    display: flex;
    gap: 5px; 
    color: #d6d6d6;
    padding: 8px 12px;
    width: 100%;
    font-weight: 600;
}

.cws-ce-menu-item input,
.cws-ce-menu-item label {
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

.cws-ce-menu-item button {
    background: transparent;
    color: #d6d6d6;
    font-size: 14px; 
    height: auto;
    width: 100%;
    text-align: left;
    padding: 8px 12px; 
}


.cws-code-editor {
    height: calc(100% - 50px);  
    width: 100%;
    position: relative;
    background: #1e1e1e;
}

.cws-code-area {
    position: absolute;
    resize: none;
    border: none;
    background-color: transparent;
    width: 100%;
    line-height: 1.5;
    font-size: 14px; 
    height: 100%;
    font-family: monospace;
}

.cws-ce-tab-invisible{
    visibility: hidden;
}

.cws-ce-preview-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cws-ce-preview-wrapper .cws-ce-options {
    grid-template-columns: auto auto !important;
}

.cws-ce-zoom-btns-wrapper {
    padding-left: 10px; 
    display: flex;
    gap: 10px;
}

.cws-ce-disable-btn {
    pointer-events: none;
    opacity: .5;
}

#cws-ce-preview {
    width: 100%;
    background: #1e1e1e;
    height: calc(100% - 50px); 
    padding-left: 14px;
}

#cws-ce-output-window {
    width: 100%;
    border: none;
    height: 100%;
    box-sizing: border-box;
}

.cws-ce-resize-bar {
    position: absolute;
    height: 100%;
    z-index: 1 !important;
    width: 14px;
    top: 0;
    cursor: col-resize;
    background: #000;
    border: 1px solid #fff3;
    border-bottom: none;
    border-top: none;
}

.cws-ce-show {
    visibility: visible !important;
    transform: scale(1) !important;
}

@media screen and (max-width: 1000px) {
    .cws-ce-resize-bar {
        display: none;
    }

    .cws-ce-max-min-btn {
        display: none;
    }

    .cws-ce-hide-preview,
    .cws-ce-show-preview {
        display: block;
    }

    div#cws-ce-left-panel {
        flex-basis: 100%;
    }

    div#cws-ce-right-panel {
        flex-basis: 0%;
    }

    #cws-ce-preview {
        padding-left: 0;
    }

    .cws-ce-tab:hover {
        background: #212121;
        border-radius: 5px 5px 0 0; 
    }
}

@media screen and (max-width: 600px) {
    .cws-ce-options {
        position: relative;
    }

    .cws-ce-tabs-mm-btn {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .cws-ce-tab-container {
        position: absolute;
        overflow: visible;
        visibility: hidden;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;  
        padding: 10px; 
        height: max-content;
        width: 180px; 
        transition: .3s;
        background: #141414;
        top: 55px;  
        left: 15px; 
        border-radius: 5px;  
        color: #fff;
        transform: scale(0);
        transform-origin: 0 0;
        z-index: 2;
    }

    .cws-ce-active-tab::after,
    .cws-ce-active-tab::before {
        display: none;
    }

    .cws-ce-tab-container .tab {
        font-size: 15px;  
        padding: 5px;  
        font-weight: 600;
        border-radius: 5px; 
        width: 100%;
        margin: 0;
        letter-spacing: normal;
        min-width: unset;
    }

    .cws-ce-tab:not(.cws-ce-active-tab)::after {
        display: none;
    }

    .cws-ce-active-tab {
        opacity: .85;
    }
}