/* Basic App Layout */
.app-container {
    display: flex;
    padding: 8px;
    /* Adjusting for the title bar (30px) and status bar (20px approx) */
    height: calc(100% - 30px); 
}

.notes-sidebar {
    width: 35%;
    min-width: 200px;
    margin-right: 8px;
    display: flex;
    flex-direction: column;
}

.notes-sidebar > p {
    font-weight: bold;
    font-size: 14pt;
    margin-bottom: 6px;
}

/* Notes List (using 98.css tree-view) */
.tree-view {
    flex-grow: 1;
    overflow-y: auto;
}

.note-item {
    cursor: pointer;
    padding: 4px 6px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11pt;
}

/* Active note styling */
.note-item.active {
    background-color: navy;
    color: white;
}

/* Style for the redirect note */
.redirect-note {
    color: #0000ff;
    font-style: italic;
    font-weight: bold;
}

.redirect-note.active {
    background-color: navy;
    color: white;
    font-style: normal;
}

/* Main Note Viewer - Container for the text area replacement */
.note-viewer {
    flex-grow: 1;
}

/* Wrapper provided by 98.css field-row to hold the sunken border */
.note-content-wrapper {
    width: 100%;
    height: 100%; 
    padding: 1px; 
    box-sizing: border-box; 
    overflow: hidden;
}

/* The actual note content container - MUST look like a textarea */
#note-content {
    background-color: white;
    width: 100%;
    height: 100%; 
    overflow-y: auto; /* Adds the scrollbar when content overflows */
    font-family: 'MS Sans Serif', 'Arial', sans-serif;
    font-size: 12pt;
    line-height: 1.4;
    padding: 8px;
    /* Use 'pre-line' to properly format the text content from the JS data */
    white-space: pre-line; 
    box-sizing: border-box; 
}

/* Styling for images inside the note content */
#note-content img {
    height: auto; 
    display: block; 
    margin: 10px 0; 
    border: 2px solid #c6c6c6; 
}

/* Ensure the app is contained nicely */
body {
    background-color: #008080;
}