.night .code {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    box-shadow: 0 0 7em rgba(0, 26, 255, 0.5);
}

.night .CodeMirror {
    box-shadow: 0 0 7em rgba(0, 26, 255, 0.2);

}
.night .corner-buttons .design-button.icon-btn img.day{
    display: block;
}
.corner-buttons .design-button.icon-btn img.day{
    display: none;
}
.night .corner-buttons .design-button.icon-btn img.night{
    display: none;
}

.code {
    background-color: white;
    color: black;
    width: 100%;
}



.editor-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Editor actions toolbar above the editor */
.editor-actions {
    display: flex;
    gap: 0.25em;
    align-items: center;
    margin-bottom: 0.25em;
    flex-direction: row;
    justify-content: flex-end;

}
.editor-sizing{
    position: relative;
    flex-grow: 1;
}
.editor-wrapper {
    position: relative;
}

.CodeMirror {
    resize: both;
    /* overflow: auto !important; */
    min-width: 20em;
    max-width: 100%;
}

.CodeMirror {
    height: 100%;
}

.editor-wrapper .clear-button {
    position: absolute;
    top: .3em;
    right: .3em;
    padding: .3em .4em;
    margin: 0;
    border: 0.0625em solid #ccc;
    background-color: #f8f8f8;
    color: #666;
    border-radius: 3px;
    cursor: pointer;
    font-size: .9em;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    line-height: 1;
    display: block;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 6000;
}

.editor-wrapper .clear-button:hover {
    background-color: #e8e8e8;
    color: #333;
}





/* Ensure global button styles don't leak in */
.editor-actions .save,
.editor-actions .clear-button {
    /*background: transparent !important;*/
    /*border: none !important;*/
    /*min-width: 0 !important;*/
    /*padding: 0 !important;*/
    /*margin: 0 !important;*/
    /*color: #fff !important;*/
}

/* Corner buttons (top-right header) use same icon style */
.corner-buttons .icon-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6em;
    height: 1.6em;
    padding: 0.2em;
    border-radius: .1em;
    cursor: pointer;
}

.corner-buttons .icon-btn svg,
.corner-buttons .icon-btn img {
    width: 1.3em;
    height: 1.3em;
    display: block;
}


