/* ============================================================
   NOTES LAYOUT
   ============================================================ */

.notes-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  min-height: 0;
  gap: 1rem;
}

.notes-editor {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

#noteTitle {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--light);
  background: var(--mid);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

#noteTitle:focus {
  border-color: var(--accent);
}

#status {
  position: fixed;
  left: 50%;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
}

/* ============================================================
   NESTED BOX / WRITE AREA
   ============================================================ */

.box {
  overflow-wrap: anywhere;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.write {
  height: 100%;
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- Notes Panel (bottom bar) --- */

.notes-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  overflow: hidden;
}

.notebuttons {
  display: flex;
  flex-direction: row;
  gap: 4px;
  flex-shrink: 0;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--light);
  background: var(--mid);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
  cursor: pointer;
  white-space: nowrap;
  gap: 1px;
}

.notebuttons:hover {
  background-color: var(--dark);
}

.notebuttons img {
  height: 20px;
}

/* --- Note List (horizontally scrollable) --- */

#noteList {
  display: flex;
  flex-direction: row;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
}

#noteList::-webkit-scrollbar {
  display: none;
}

.note-item {
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  background: var(--mid);
  transition:
    background 0.2s,
    color 0.2s;
  display: flex;
  align-items: center;
  /* gap: 6px; */
  flex-shrink: 0;
}

.note-item:hover {
  background: var(--light);
}

.note-item.active {
  background: var(--accent);
  color: #fff;
}

.note-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  max-width: 120px;
}

.note-delete {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0;
  transition:
    opacity 0.15s,
    color 0.15s;
  flex-shrink: 0;
  line-height: 1;
}

.note-item:hover .note-delete {
  opacity: 1;
}

.note-item.active .note-delete {
  color: #fff;
  opacity: 0.7;
}

.note-delete:hover {
  color: #ff0000;
}

.note-meta {
  font-size: 0.75rem;
  color: var(--text);
  padding: 6px 10px;
  opacity: 0.7;
  flex-shrink: 0;
  border-top: 1px solid var(--mid);
}

.right {
  margin-left: auto;
}
