/* Notlarım (personal notebook): list grid + single-note editor. */

.note-filter-panel .form-input {
  max-width: 320px;
}
.note-filter-panel .form-select {
  max-width: 220px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.note-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.note-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.note-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.note-card-title {
  font-size: 15px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-card-delete {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--color-text-muted);
}
.note-card-delete:hover {
  color: var(--color-danger);
  background: var(--color-danger-soft);
}

.note-card-preview {
  flex: 1;
  margin: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

.note-card-date {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

/* --- Single-note editor --------------------------------------------------- */

.note-back-link {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 600;
}
.note-back-link:hover {
  color: var(--color-primary);
}

.note-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.note-save-status {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  white-space: nowrap;
}

.note-editor-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.note-title-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  padding: 0 0 12px;
  border-bottom: 1px solid var(--color-border);
}
.note-title-input::placeholder {
  color: var(--color-text-muted);
}

.note-body-textarea {
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  min-height: 420px;
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  line-height: 1.7;
  color: var(--color-text-primary);
}
.note-body-textarea::placeholder {
  color: var(--color-text-muted);
}

@media (max-width: 900px) {
  .note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .note-grid {
    grid-template-columns: 1fr;
  }
  .note-header-actions {
    flex-wrap: wrap;
  }
}
