/* 기본 스타일 초기화 및 폰트 설정 */
body {
  display: flex;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  height: 100vh;
  background-color: #fffffffd;
  color: #37352f;
  line-height: 1.5;
}

/* 게 햄버거 아이콘 크기 조절*/
.Icon {
  width: 40px;
  height: 40px;
}

.sidebar-title {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* 사이드바 (aside) 스타일 */
aside {
  width: 280px;
  background-color: #d1d3da60;
  padding: 10px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-right: 1px solid #e0e0e0;
  box-sizing: border-box;
  overflow-y: auto;
}

/* 사이드바 헤더 (너드호소인들의 Notion) */
aside > div:first-child h3 {
  font-size: 16px;
  font-weight: 500;
  color: #4a4a4a;
  padding: 10px;
  margin: 0;
}

/* 검색 컨테이너 */
.SearchContainer {
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.SearchContainer input[type="text"] {
  flex-grow: 1;
  border: none;
  background-color: #f1f1f1;
  padding: 8px 10px;
  border-radius: 5px;
  box-sizing: border-box;
  font-size: 14px;
  color: #37352f;
}

.SearchContainer button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #888;
  padding: 5px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.SearchContainer button:hover {
  background-color: #e0e0e0;
}

/* 개인 페이지 버튼 */
aside > div:nth-child(3) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

aside > div:nth-child(3):hover {
  background-color: #f1f1f1;
}

aside > div:nth-child(3) span {
  font-size: 14px;
  color: #37352f;
}

aside > div:nth-child(3) button {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

aside > div:nth-child(3) button:hover {
  background-color: #e0e0e0;
}

/* 문서 트리 (.doc-tree) */
.doc-tree {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  padding-top: 5px;
}

/* 각 문서 노드 (.doc-node) */
.doc-node {
  margin-left: 10px;
}

/* 문서 행 (.doc-row) - 클릭 가능한 영역 */
.doc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  color: #37352f;
  position: relative;
  white-space: nowrap;
}

.doc-row:hover {
  background-color: #e0e0e0;
}

/* 선택된 문서 행 스타일 */
.doc-row.selected {
  background-color: rgba(59, 130, 246, 0.1);
  font-weight: bold;
  color: #3b82f6;
}

/* 문서 액션 버튼들 (.doc-actions) */
.doc-actions {
  background: none;
  border: none;
  color: #888;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.doc-row:hover .doc-actions {
  opacity: 1;
  pointer-events: auto;
}

.doc-actions:hover {
  background-color: #d3d3d3;
}

.doc-actions-container {
  display: flex;
  gap: 5px;
  transition: opacity 0.2s;
  opacity: 0;
  pointer-events: none;
}

/* 문서 행에 호버 시 액션 버튼 표시 */
.doc-row:hover .doc-actions-container {
  opacity: 1;
  pointer-events: auto;
}

/* 메인 편집기 영역 */
main {
  flex-grow: 1;
  padding: 50px 70px;
  overflow-y: auto;
}

/* 문서 제목 입력창 (input.Title) */
input.Title {
  width: 100%;
  font-size: 36px;
  font-weight: 700;
  border: none;
  outline: none;
  padding: 10px 0;
  margin-bottom: 20px;
  color: #333;
  background-color: transparent;
}

input.Title::placeholder {
  color: #ccc;
}

/* 편집기 내용 입력창 (textarea.EditorContainer) */
textarea.EditorContainer {
  margin: 0;
  width: 100%;
  height: calc(100% - 120px);
  padding: 10px 0;
  background-color: #ffffff;
  border: none;
  outline: none;
  font-size: 16px;
  line-height: 1.6;
  color: #37352f;
  resize: none;
}

textarea.EditorContainer::placeholder {
  color: #ccc;
}
