/* ─── notes module styles (v10.19) ────────────────────────────────
   Panel chrome (overlay, header, close) comes from module-lib.css.
   This file styles only what's INSIDE the panel body. */

/* PIN screen */
.notes-pin-screen {
  margin: auto;
  padding: 32px 16px;
  text-align: center;
  display: flex; flex-direction: column; gap: 10px;
  align-items: center;
  max-width: 320px;
}
.notes-pin-screen input {
  width: 100%; box-sizing: border-box;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 8px 12px;
  font-family: var(--mono, monospace);
  font-size: 1.1em;
  text-align: center;
}
.notes-pin-screen .btn {
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 6px 14px;
  font-family: var(--mono, monospace);
  cursor: pointer;
  border-radius: 2px;
}
.notes-pin-screen .btn.primary {
  color: var(--accent);
  border-color: var(--accent);
}
.notes-pin-screen .btn.primary:hover { background: rgba(176,230,176,0.15); }

/* two-pane layout */
.notes-two-pane {
  display: grid;
  grid-template-columns: 240px 1fr;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.notes-pane-left {
  border-right: 1px solid var(--accent2);
  overflow-y: auto;
  padding: 8px;
  background: rgba(0,0,0,0.15);
}
.notes-pane-right {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 720px) {
  .notes-two-pane { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .notes-pane-left { max-height: 35vh; }
}

/* toolbar + breadcrumb */
.notes-toolbar {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.notes-action {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  padding: 3px 8px;
  font-size: 0.85em;
  color: var(--fg);
  border: 1px solid var(--accent2);
  border-radius: 2px;
}
.notes-action:hover { background: rgba(176,230,176,0.12); }
.notes-action.dirty { color: var(--brass, #ffd070); border-color: var(--brass, #ffd070); }
.notes-breadcrumb {
  font-size: 0.85em;
  margin: 8px 0;
  color: var(--dim);
  padding: 0 2px;
  word-break: break-all;
}
.notes-bc-link {
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.notes-bc-link:hover { text-decoration: underline; }

/* tree */
.notes-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}
.notes-tree-item {
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 2px;
}
.notes-tree-item:hover { background: rgba(176,230,176,0.06); }
.notes-tree-item.open { background: rgba(176,230,176,0.12); }
.notes-tree-item.up { font-style: italic; color: var(--dim); }
.notes-folder-link, .notes-file-link, .notes-tree-up {
  flex: 1;
  cursor: pointer;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notes-folder-link:hover, .notes-file-link:hover, .notes-tree-up:hover { color: var(--accent); }
.notes-folder-del, .notes-folder-move, .notes-file-move {
  cursor: pointer;
  color: var(--dim);
  text-decoration: none;
  padding: 0 4px;
  font-size: 0.85em;
  opacity: 0.6;
}
.notes-tree-item:hover .notes-folder-del,
.notes-tree-item:hover .notes-folder-move,
.notes-tree-item:hover .notes-file-move {
  opacity: 1;
}
.notes-folder-del:hover { color: #e07a7a; }
.notes-folder-move:hover, .notes-file-move:hover { color: var(--accent); }

/* editor */
.notes-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--accent2);
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.notes-editor-name {
  font-family: var(--mono, monospace);
  color: var(--accent);
  font-size: 0.9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.notes-editor-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.notes-editor-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--mono, monospace);
  font-size: 0.95em;
  padding: 12px;
  resize: none;
  outline: none;
  box-sizing: border-box;
  line-height: 1.5;
}
.notes-editor-empty {
  margin: auto;
  padding: 24px;
  text-align: center;
}

/* markdown preview */
.notes-md-preview {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  color: var(--fg);
  font-family: var(--mono, monospace);
  font-size: 0.92em;
  line-height: 1.5;
}
.notes-md-preview .md-h1,
.notes-md-preview .md-h2,
.notes-md-preview .md-h3 {
  color: var(--accent);
  margin: 14px 0 8px;
}
.notes-md-preview .md-h1 { font-size: 1.3em; }
.notes-md-preview .md-h2 { font-size: 1.15em; }
.notes-md-preview .md-h3 { font-size: 1.05em; }
.notes-md-preview .md-code {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--accent2);
  padding: 8px;
  border-radius: 2px;
  overflow-x: auto;
  font-size: 0.9em;
}
.notes-md-preview code {
  background: rgba(176,230,176,0.08);
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 0.95em;
}
.notes-md-preview blockquote {
  border-left: 3px solid var(--accent2);
  margin: 8px 0;
  padding-left: 10px;
  color: var(--dim);
}
.notes-md-preview ul, .notes-md-preview ol {
  padding-left: 22px;
}
.notes-md-preview a {
  color: var(--accent);
}
.notes-md-preview hr {
  border: 0;
  border-top: 1px dashed var(--accent2);
  margin: 14px 0;
}

/* upload modal */
.notes-upload-area {
  border: 2px dashed var(--accent2);
  border-radius: 4px;
  padding: 30px 16px;
  text-align: center;
  cursor: pointer;
  margin: 10px 0;
  transition: background 0.15s, border-color 0.15s;
}
.notes-upload-area:hover {
  background: rgba(176,230,176,0.05);
  border-color: var(--accent);
}
.notes-upload-area.drop {
  background: rgba(176,230,176,0.1);
  border-color: var(--accent);
}
.notes-upload-area p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9em;
}

/* settings modal */
.notes-settings-sub code {
  background: rgba(176,230,176,0.08);
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 0.9em;
}

/* shared button styles inside ml-submodal (used by Notes settings) */
.ml-submodal-body .btn {
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 5px 12px;
  font-family: var(--mono, monospace);
  font-size: 0.88em;
  cursor: pointer;
  border-radius: 2px;
}
.ml-submodal-body .btn:hover {
  background: rgba(176,230,176,0.1);
  border-color: var(--accent);
}
.ml-submodal-body .btn.small {
  padding: 4px 10px;
  font-size: 0.82em;
}

/* helpers (work on both dashboard and chat pages) */
.notes-pin-screen .dim,
.notes-pane-left .dim,
.ml-submodal-body .dim { color: var(--dim); }
.notes-pin-screen .hint,
.notes-pane-left .hint,
.ml-submodal-body .hint { font-style: italic; font-size: 0.88em; }

/* ─── v10.34: notes search bar + results ─────────────────────────── */
.notes-search-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--accent2);
  background: rgba(176,230,176,0.03);
  flex-wrap: wrap;
}
.notes-search-input {
  flex: 1;
  min-width: 120px;
  padding: 4px 8px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--accent2);
  border-radius: 2px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.92em;
}
.notes-search-input:focus {
  outline: none;
  border-color: var(--accent);
}
.notes-search-mode {
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--fg);
  padding: 3px 4px;
  font-family: var(--mono, monospace);
  font-size: 0.78em;
  border-radius: 2px;
}
.notes-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--accent2);
  border-radius: 2px;
  text-decoration: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 1.05em;
  line-height: 1;
}
.notes-search-clear:hover { color: var(--fg); border-color: var(--accent); }

.notes-search-meta {
  padding: 6px 10px;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notes-search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  max-height: 100%;
}
.notes-search-result {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(176,230,176,0.08);
}
.notes-search-result.open {
  background: rgba(176,230,176,0.06);
  border-left: 2px solid var(--accent);
}
.notes-search-result-h {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.notes-search-result-link {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95em;
  cursor: pointer;
}
.notes-search-result-link:hover { color: var(--accent); }
.notes-search-folder {
  font-size: 0.78em;
}

.notes-search-snippets {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notes-search-snippet {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.82em;
  padding: 2px 6px;
  background: rgba(176,230,176,0.03);
  border-left: 2px solid rgba(176,230,176,0.15);
  cursor: pointer;
  border-radius: 1px;
  line-height: 1.4;
}
.notes-search-snippet:hover {
  background: rgba(176,230,176,0.08);
  border-left-color: var(--accent);
}
.notes-search-line {
  font-size: 0.78em;
  margin-right: 4px;
}

.notes-search-mark {
  background: rgba(240,200,120,0.35);
  color: var(--fg);
  padding: 0 1px;
  border-radius: 1px;
}

@media (max-width: 700px) {
  .notes-search-bar { padding: 4px 6px; }
  .notes-search-input { font-size: 0.85em; }
  .notes-search-mode { font-size: 0.72em; }
  .notes-search-result { padding: 5px 8px; }
  .notes-search-snippet { font-size: 0.78em; }
}
