﻿/* NOTES */
.note {
    position: absolute;
    min-width: 150px;
    min-height: 50px;
    background: var(--note-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    z-index: 10;
    border: 1px solid var(--grid-color);
    overflow: visible;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
    transform-origin: center center;
}

.note.selected {
    border: 1px solid var(--accent-color);
}

.note.clean-mode {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.note.clean-mode .note-header {
    display: none;
}

.note.clean-mode .note-body {
    background: transparent !important;
}

.note-header {
    height: 32px;
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: grab;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.note-header:active {
    cursor: grabbing;
}

.note-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: var(--note-bg);
    border-radius: 0 0 8px 8px;
}

.text-editor {
    width: 100%;
    height: 100%;
    outline: none;
    cursor: text;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    user-select: text;
    padding: 10px;
}

.code-container {
    display: flex;
    height: 100%;
    width: 100%;
    font-family: 'Consolas', monospace;
    background: var(--code-bg);
    color: var(--code-text);
    border-radius: 0 0 8px 0;
}

.line-numbers {
    width: 40px;
    background: var(--code-line-bg);
    color: var(--code-line-num);
    text-align: right;
    padding: 10px 5px;
    font-size: 13px;
    line-height: 20px;
    border-right: 1px solid var(--grid-color);
    flex-shrink: 0;
    user-select: none;
    overflow: hidden;
    border-radius: 0 0 0 8px;
}

.code-editor {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    line-height: 20px;
    overflow: auto;
    white-space: pre;
    outline: none;
    cursor: text;
}

.code-editor::-webkit-scrollbar {
    cursor: default;
}

.code-editor::-webkit-scrollbar-corner {
    background: var(--sb-track);
}

.kw {
    color: var(--kw-color);
    font-weight: bold;
}

.str {
    color: var(--str-color);
}

.def {
    color: var(--def-color);
}

.cmt {
    color: var(--comment-color);
    font-style: italic;
}

.img-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}