* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 
 * Theme variables are defined in App.vue
 * This file only contains component styles
 */

#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* Note list */
.note-list {
  list-style: none;
}

.note-item {
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

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

.note-item.active {
  background: var(--color-border);
  border-left-color: var(--color-primary);
}

.note-item-title {
  font-weight: 500;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-item-meta {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* Main content */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-header {
  height: var(--header-height);
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-header h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.main-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Editor */
.editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor {
  flex: 1;
  width: 100%;
  padding: 16px 24px;
  border: none;
  resize: none;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.6;
  background: var(--color-bg);
  color: var(--color-text);
  outline: none;
}

.editor:focus {
  outline: none;
}

/* Empty state */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--color-text-secondary);
  padding: 32px;
}

.empty-state h2 {
  margin-bottom: 8px;
  font-weight: 500;
}

/* Buttons */
button {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

button:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-text-secondary);
}

button.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

button.primary:hover {
  opacity: 0.9;
}

button.danger {
  color: var(--color-danger);
}

button.danger:hover {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: white;
}

/* Status indicators */
.status {
  font-size: 12px;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status.saving {
  color: var(--color-primary);
}

.status.saved {
  color: var(--color-success);
}

.status.error {
  color: var(--color-danger);
}

/* Loading */
.loading {
  padding: 16px;
  color: var(--color-text-secondary);
  text-align: center;
}

/* Error */
.error-message {
  padding: 12px 16px;
  background: var(--color-danger);
  color: white;
  font-size: 13px;
}

/* Button group */
.button-group {
  display: flex;
  gap: 8px;
}

/* Type badge */
.type-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--color-border);
  color: var(--color-text-secondary);
}
