.darkMode .conceptEditorContainer,
.conceptEditorContainer.darkMode {
    --conceptEditorBackgroundColor: #222;
}
.conceptEditorContainer {
    --conceptEditorBackgroundColor: #FFF;
    position: relative;
    background-color: var(--conceptEditorBackgroundColor);
    border: 1px solid #ccc; 
    
    border-radius: 1em;
    box-sizing: border-box;

    &.fullscreen {
        position: fixed;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 10;
    }
}

.conceptEditorContainer .highlight {
    color: rgb(0 66 242);
    /* font-weight: 700; */
}

.conceptEditorContainer .divCodeFeatureContainer {
    border-radius: .5em;
    overflow: hidden;
    position: relative;
}

.conceptEditorContainer .divCodeFeatureOptions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;

    & select {
        background-color: unset;
        color: #DDD;
        border: none;
    }
}

.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContent > .addedFeature.code,
.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContentHighlight > .addedFeature.code {
    position: relative;

    white-space: pre-wrap;
    outline: none;
    width: 100%; 
    display: block; 
    background-color: #222; 
    color: #CCC; 
    font-family: monospace;
    min-height: 1em; line-height: 1em; 
    padding: 0 2.25em; 
    padding-inline: 2.25em !important;
    box-sizing: content-box;
}

.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContentHighlight .code::before {
    content: none !important;
}

.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContentHighlight {
    position: absolute;
    pointer-events: none;
    mix-blend-mode: color;
    left: 0;
    top: 0;
    padding: inherit;
}

.conceptEditorContainer .divCodeFeatureContainer {
    counter-reset: item;
}

.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContent > .addedFeature.code::before {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #FFFFFF40;
    width: 2em;
    text-align: center;
    padding-top: inherit;
    padding-bottom: inherit;

    counter-increment: item;
    content: counter(item);
}

.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContent > .addedFeature.code:first-of-type,
.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContentHighlight > .addedFeature.code:first-of-type {
    padding-top: 1em;
}
.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContent > .addedFeature.code:last-of-type,
.conceptEditorContainer .divCodeFeatureContainer .divCodeFeatureContentHighlight > .addedFeature.code:last-of-type {
    padding-bottom: 1em;
}

.conceptEditorContainer .addedFeature.code * {
    display: inline;     /* evita blocos indesejados */
    white-space: pre-wrap;    /* evita quebras automáticas */
}

.conceptEditorContainer .addedFeature.code * {
    display: inline;
}

.conceptEditorContainerFeatures {
    display: flex; 
    align-items: start; 
    flex-wrap: nowrap;
    border-radius: .75em;

    margin: .25em;
    padding: .25em;

    gap: .5em;

    background-image: linear-gradient(45deg, #88888810, #88888840, #88888810);
}

.conceptEditorContainerFeatures__items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    overflow: hidden;
    min-height: fit-content;

    flex-grow: 1;

    z-index: 2;
    
    user-select: none;
    position: sticky;
    top: 0;
    gap: .25em;
}

.conceptEditorContainerFeatures__items .feature p {
    font-size: .75em;
    margin: 0;
    width: 0; 
    overflow: hidden; 
    text-wrap: nowrap; 
}
.darkMode .conceptEditorContainerFeatures .feature  {
    color: #ffffff;
}
.conceptEditorContainerFeatures .feature  {
    border: none;
    /* background-color: #f8f8f8; */
    background-color: #ffffff20;
    border-radius: .25em;
    
    max-width: min-content;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    
    padding: .5em;
    width: 2em;
    height: 2em;
    transition-delay: 1s;
    transition: .25s;
    
    &.active {
        box-shadow: none;
        background-color: #ccc;
    }
    &:hover {
        background-color: #ccc !important;
    }

    /* &.hover {
        background-color: #ccc;
        box-shadow: none;
        width: 300px;
        max-width: min-content;
        transition: .25s;
    }
    
    &.hover p {
        text-align: left;
        width: 100% !important;
        max-width: min-content;
        margin-inline: 1em !important;
        transition: .25s;
    } */
}
.conceptEditorContainer__content {
    height: inherit;
    padding: 1em 2em;
    /* border: 1px solid #ccc;  */
    outline: none;
    overflow: auto;
}

@media screen and (max-width: 500px) {
    .conceptEditorContainer__content {
        padding: 1em;
    }
    
}
.conceptEditorContainer__content > * {
    max-width: 100%;
}
.conceptEditorContainer__content p {
    margin-bottom: 0;
}
.conceptEditorContainer__content iframe,
.conceptEditorContainer__content img {
    max-width: 100%;
    border-radius: .75em;
}
.conceptEditorContainer__content .divConceptEditorImageContentContainer.fullscreen {
    position: fixed !important;
    height: 100% !important;
    width: 100% !important;
    background-color: #00000088;
    backdrop-filter: blur(4px);
    padding: 2em;
    top: 0;
    left: 0;
    z-index: 10;

    display: flex !important;
}
.conceptEditorContainer__content img {
    max-width: 100%;
    background-color: var(--conceptEditorBackgroundColor);
}

.conceptEditorContainer__content .divConceptEditorImageContentContainer.fullscreen img {
    width: fit-content !important;
    object-fit: contain;
}

.conceptEditorContainer__content pre {
    background-color: #222;
    color: #FFF;
    border-radius: .5em;
    width: 100%;
    padding: 1em;
}
.conceptEditorContainer__content pre * {
    background-color: unset !important;
}

.conceptEditorContainer__extra {
    position: absolute;
    max-height: 200px;
    width: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #FFF;
    box-shadow: 0 .25em .5em #00000020;
    z-index: 1;
}
.conceptEditorContainer__extra > div {
    padding: .5em;
    display: flex;
    align-items: center;
    gap: .5em;
    transition: .25s;

    &.active, &:hover {
        backdrop-filter: brightness(.9);
        scale: 1.01;
        cursor: pointer;
        transition: .25s;
    }
}

.conceptEditorContainer .divConceptEditorImageContentContainer {
    z-index: 1;
}

.conceptEditorContainer .divConceptEditorImageContentContainer:not(:has(img)) .btnResizeConceptEditorImage {
    display: none !important;
}

.conceptEditorContainer .btnResizeConceptEditorImage {
    display: block !important;
    cursor: se-resize !important;
    position: absolute; 
    bottom: -.25em; 
    right: -.25em; 
    height: 2em; 
    width: 2em; 
    z-index: -1; 
    border-bottom-right-radius: 0;
}

@media screen and (max-width: 500px) {
    .conceptEditorContainer .btnResizeConceptEditorImage {
        bottom: -.5em; 
        right: -.5em; 
    }
}

.conceptEditorContainer .divConceptEditorImageContentContainer:not(.fullscreen) img:hover, .conceptEditorContainer iframe:hover {
    cursor: pointer;
}
.conceptEditorContainer .divConceptEditorImageContentContainer.fullscreen {
    cursor: pointer;
}
.conceptEditorContainer .divConceptEditorImageContentContainer.fullscreen img {
    cursor: default;
}

.conceptEditorContainer .divHtmlElementsContainer {
    font-family: sans-serif;
    line-height: 1.5em;
    position: relative;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    border: none;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    margin: .5em;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    border: none;
    
    overflow: hidden;
}


.darkMode .divHtmlElementsContainer textarea {
    color: #FFF;
}

.conceptEditorContainer .divHtmlElementsContainer textarea {
    width: 100%;
    
    padding: 0px !important;
    height: inherit;
    white-space: pre;
    font-family: monospace;
    field-sizing: content;
    resize: none;
    overflow: hidden;
    /* font-size: inherit; */
    margin: 0;
    cursor: text;
    text-wrap: auto;

    background-color: inherit;

    outline: none;
}

.conceptEditorContainer .divHtmlElementsContainer .conceptEditorHtmlHightlight {
    position: absolute;
    display: block !important;
    padding: 0em !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* font-size: inherit; */
    text-wrap: auto;
    line-height: inherit;

    /* Cor transparente por padrão, porque o que importa é os elementos com highlight */
    color: #FFFFFF00;

    highlight {
        font-weight: 700;
    }
}

.conceptEditorContainer .divHtmlElementsContainer textarea,
.conceptEditorContainer .divHtmlElementsContainer .conceptEditorHtmlHightlight {
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.4;  
    border: none;
    overflow: visible;
}